Class LinearUnit
java.lang.Object
weka.classifiers.functions.neural.LinearUnit
- All Implemented Interfaces:
Serializable
,NeuralMethod
,RevisionHandler
This can be used by the
neuralnode to perform all it's computations (as a Linear unit).
- Version:
- $Revision: 8034 $
- Author:
- Malcolm Ware (mfw4@cs.waikato.ac.nz)
- See Also:
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptiondouble
errorValue
(NeuralNode node) This function calculates what the error value should be.Returns the revision string.double
outputValue
(NeuralNode node) This function calculates what the output value should be.void
updateWeights
(NeuralNode node, double learn, double momentum) This function will calculate what the change in weights should be and also update them.
-
Constructor Details
-
LinearUnit
public LinearUnit()
-
-
Method Details
-
outputValue
This function calculates what the output value should be.- Specified by:
outputValue
in interfaceNeuralMethod
- Parameters:
node
- The node to calculate the value for.- Returns:
- The value.
-
errorValue
This function calculates what the error value should be.- Specified by:
errorValue
in interfaceNeuralMethod
- Parameters:
node
- The node to calculate the error for.- Returns:
- The error.
-
updateWeights
This function will calculate what the change in weights should be and also update them.- Specified by:
updateWeights
in interfaceNeuralMethod
- Parameters:
node
- The node to update the weights for.learn
- The learning rate to use.momentum
- The momentum to use.
-
getRevision
Returns the revision string.- Specified by:
getRevision
in interfaceRevisionHandler
- Returns:
- the revision
-