|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object
|
+--weka.classifiers.neural.NeuralConnection
|
+--weka.classifiers.neural.NeuralNode
This class is used to represent a node in the neuralnet.
| Fields inherited from class weka.classifiers.neural.NeuralConnection |
CONNECTED, INPUT, m_id, m_inputList, m_inputNums, m_numInputs, m_numOutputs, m_outputList, m_outputNums, m_type, m_unitError, m_unitValue, m_weightsUpdated, m_x, m_y, OUTPUT, PURE_INPUT, PURE_OUTPUT, UNCONNECTED |
| Constructor Summary | |
NeuralNode(java.lang.String id,
java.util.Random r,
NeuralMethod m)
|
|
| Method Summary | |
protected void |
allocateInputs()
This will allocate more space for input connection information if the arrays for this have been filled up. |
protected boolean |
connectInput(NeuralConnection i,
int n)
This will connect the specified unit to be an input to this unit. |
protected boolean |
disconnectInput(NeuralConnection i,
int n)
This will disconnect the input with the specific connection number From this node (only on this end however). |
double |
errorValue(boolean calculate)
Call this to get the error value of this unit. |
double[] |
getChangeInWeights()
call this function to get the chnage in weights array. |
NeuralMethod |
getMethod()
|
double[] |
getWeights()
call this function to get the weights array. |
double |
outputValue(boolean calculate)
Call this to get the output value of this unit. |
void |
removeAllInputs()
This function will remove all the inputs to this unit. |
void |
reset()
Call this to reset the value and error for this unit, ready for the next run. |
void |
setMethod(NeuralMethod m)
Set how this node should operate (note that the neural method has no internal state, so the same object can be used by any number of nodes. |
void |
updateWeights(double l,
double m)
Call this function to update the weight values at this unit. |
double |
weightValue(int n)
Call this to get the weight value on a particular connection. |
| Methods inherited from class weka.classifiers.neural.NeuralConnection |
allocateOutputs, changeInputNum, changeOutputNum, connect, connectOutput, disconnect, disconnectOutput, drawHighlight, drawInputLines, drawNode, drawOutputLines, getId, getInputNums, getInputs, getNumInputs, getNumOutputs, getOutputNums, getOutputs, getType, getX, getY, onUnit, removeAllOutputs, setType, setX, setY |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public NeuralNode(java.lang.String id,
java.util.Random r,
NeuralMethod m)
id - The string name for this node (used to id this node).r - A random number generator used to generate initial weights.m - The methods this node should use to update.| Method Detail |
public void setMethod(NeuralMethod m)
m - The new method.public NeuralMethod getMethod()
public double outputValue(boolean calculate)
outputValue in class NeuralConnectioncalculate - True if the value should be calculated if it hasn't been
already.public double errorValue(boolean calculate)
errorValue in class NeuralConnectioncalculate - True if the value should be calculated if it hasn't been
already.public void reset()
reset in class NeuralConnectionpublic double weightValue(int n)
weightValue in class NeuralConnectionn - The connection number to get the weight for, -1 if The threshold
weight should be returned.public double[] getWeights()
public double[] getChangeInWeights()
public void updateWeights(double l,
double m)
updateWeights in class NeuralConnectionl - The learning rate to use.m - The momentum to use.
protected boolean connectInput(NeuralConnection i,
int n)
connectInput in class NeuralConnectioni - The unit.n - It's connection number for this connection.protected void allocateInputs()
allocateInputs in class NeuralConnection
protected boolean disconnectInput(NeuralConnection i,
int n)
disconnectInput in class NeuralConnectioni - The unit to disconnect.n - The connection number at the other end, -1 if all the connections
to this unit should be severed (not the same as removeAllInputs).public void removeAllInputs()
removeAllInputs in class NeuralConnection
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||