|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.jscience.computing.ai.neurocomputing.NeuralNetwork
org.jscience.computing.ai.neurocomputing.FeedForwardNN
public class FeedForwardNN
A simple implementation of a feedforward network.
Field Summary | |
---|---|
protected FFNLayer[] |
nnLayers
The layers in this network. |
protected int |
numLayers
The number of layers in the feedforward network. |
Fields inherited from class org.jscience.computing.ai.neurocomputing.NeuralNetwork |
---|
activation, visualization |
Constructor Summary | |
---|---|
FeedForwardNN(int hiddenLayers)
Creates a new instance of FeedForwardNN |
Method Summary | |
---|---|
void |
initialize()
Initialize the network. |
static void |
main(java.lang.String[] args)
DOCUMENT ME! |
double |
run(double[] inputData)
Run the network with the given inputs. |
void |
setHiddenLayer(FFNLayer hidden,
int layer)
Set the given hidden layer. |
void |
setInputLayer(FFNInputLayer input)
Set the input layer for the network. |
void |
setOutputLayer(FFNLayer output)
Set the output layer. |
double |
train(double[] inputData,
double[] outputData)
This class does not implement a training algorithm. |
Methods inherited from class org.jscience.computing.ai.neurocomputing.NeuralNetwork |
---|
getVisualization, render, setActivation, setVisualization, train, train, writeImage |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected int numLayers
protected FFNLayer[] nnLayers
Constructor Detail |
---|
public FeedForwardNN(int hiddenLayers)
hiddenLayers
- the number of hidden layers to be in this network.Method Detail |
---|
public void setInputLayer(FFNInputLayer input)
input
- the input layer.public void setHiddenLayer(FFNLayer hidden, int layer)
hidden
- the hidden layer.layer
- the layer index.
java.lang.IllegalArgumentException
- DOCUMENT ME!public void setOutputLayer(FFNLayer output)
output
- the output layer.public void initialize() throws NeuralNetworkException
initialize
in class NeuralNetwork
NeuralNetworkException
- an exception is thrown if a layer is
missing.public double run(double[] inputData) throws NeuralNetworkException
run
in class NeuralNetwork
inputData
- the inputs.
NeuralNetworkException
- unused.public double train(double[] inputData, double[] outputData)
train
in class NeuralNetwork
inputData
- unused.outputData
- unused.
public static void main(java.lang.String[] args)
args
- the command line arguments
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |