Class LinearUnit
- java.lang.Object
-
- weka.classifiers.functions.neural.LinearUnit
-
- All Implemented Interfaces:
java.io.Serializable,NeuralMethod,RevisionHandler
public class LinearUnit extends java.lang.Object implements NeuralMethod, RevisionHandler
This can be used by the neuralnode to perform all it's computations (as a Linear unit).- Version:
- $Revision: 1.7 $
- Author:
- Malcolm Ware (mfw4@cs.waikato.ac.nz)
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description LinearUnit()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description doubleerrorValue(NeuralNode node)This function calculates what the error value should be.java.lang.StringgetRevision()Returns the revision string.doubleoutputValue(NeuralNode node)This function calculates what the output value should be.voidupdateWeights(NeuralNode node, double learn, double momentum)This function will calculate what the change in weights should be and also update them.
-
-
-
Method Detail
-
outputValue
public double outputValue(NeuralNode node)
This function calculates what the output value should be.- Specified by:
outputValuein interfaceNeuralMethod- Parameters:
node- The node to calculate the value for.- Returns:
- The value.
-
errorValue
public double errorValue(NeuralNode node)
This function calculates what the error value should be.- Specified by:
errorValuein interfaceNeuralMethod- Parameters:
node- The node to calculate the error for.- Returns:
- The error.
-
updateWeights
public void updateWeights(NeuralNode node, double learn, double momentum)
This function will calculate what the change in weights should be and also update them.- Specified by:
updateWeightsin interfaceNeuralMethod- Parameters:
node- The node to update the weights for.learn- The learning rate to use.momentum- The momentum to use.
-
getRevision
public java.lang.String getRevision()
Returns the revision string.- Specified by:
getRevisionin interfaceRevisionHandler- Returns:
- the revision
-
-