|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object | +--net.openai.ai.nn.network.Layer
This class is a container for neurons and keeps state information for this layer.
| Field Summary | |
protected static int |
HIDDEN_LAYER
|
protected static int |
INPUT_LAYER
|
protected static int |
OUTPUT_LAYER
|
| Constructor Summary | |
Layer()
|
|
| Method Summary | |
void |
addBias()
Add the bias neuron. |
void |
addNeuron()
Creates and adds a single neuron to the layer. |
void |
addNeuron(Neuron neuron)
Adds a single neuron to the layer. |
void |
calculate()
Processes this layer, calling the input function, then the transfer function and sets all variables for the learning process to be completed. |
void |
clear()
Clears all the existing neurons. |
InputFunction |
getInputFunction()
Get the value of inputFunction. |
int |
getLayerType()
Get the layer type. |
LearningRule |
getLearningRule()
Get the value of learningRule. |
java.lang.String |
getName()
Gets the name for this layer. |
java.util.Vector |
getNeurons()
Get the neurons for this layer. |
int |
getSize()
Returns the number of neurons in this layer. |
TransferFunction |
getTransferFunction()
Get the value of transferFunction. |
void |
learn(TrainingElement trainingElement)
The learning method for the layer. |
boolean |
readyToLearn()
Calls the learning rule to see if it's ready to process this layer. |
void |
seedNeurons(java.util.Vector inputs)
Seed the neurons with input. |
void |
setInputFunction(InputFunction inputFunction)
Set the value of inputFunction. |
void |
setLayerType(int layerType)
Set the layer type. |
void |
setLearningRule(LearningRule learningRule)
Set the value of learningRule. |
void |
setName(java.lang.String name)
Sets the name for this layer. |
void |
setSize(int i)
Sets the number of neurons in this layer, this should behave much like the Vector.setSize() in that, if i > current Size, new neurons are added to the layer and if i < current Size then any neuron at index i or greater are discarded. |
void |
setTransferFunction(TransferFunction transferFunction)
Set the value of transferFunction. |
java.lang.String |
toString()
Returns a String representation of this layer.\ |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
protected static final int INPUT_LAYER
protected static final int HIDDEN_LAYER
protected static final int OUTPUT_LAYER
| Constructor Detail |
public Layer()
| Method Detail |
public void calculate()
public boolean readyToLearn()
public void learn(TrainingElement trainingElement)
throws net.openai.ai.nn.network.NetworkConfigurationException
public java.util.Vector getNeurons()
public void seedNeurons(java.util.Vector inputs)
Vector - A collection of values to seed the neurons with...public void addBias()
public LearningRule getLearningRule()
public void setLearningRule(LearningRule learningRule)
v - Value to assign to learningRule.public TransferFunction getTransferFunction()
public void setTransferFunction(TransferFunction transferFunction)
v - Value to assign to transferFunction.public InputFunction getInputFunction()
public void setInputFunction(InputFunction inputFunction)
v - Value to assign to inputFunction.public int getSize()
public void setSize(int i)
i - The number of neurons to be held in this layer.public void addNeuron()
public void addNeuron(Neuron neuron)
public void clear()
public java.lang.String getName()
public void setName(java.lang.String name)
name - The name for this layer.public int getLayerType()
public void setLayerType(int layerType)
layerType - The type of this layer (input, hidden, output)public java.lang.String toString()
toString in class java.lang.Object
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||