weka.classifiers.functions.neural
Class LinearUnit

java.lang.Object
  extended byweka.classifiers.functions.neural.LinearUnit
All Implemented Interfaces:
NeuralMethod, java.io.Serializable

public class LinearUnit
extends java.lang.Object
implements NeuralMethod

This can be used by the neuralnode to perform all it's computations (as a Linear unit).

Version:
$Revision: 1.3 $
Author:
Malcolm Ware (mfw4@cs.waikato.ac.nz)
See Also:
Serialized Form

Constructor Summary
LinearUnit()
           
 
Method Summary
 double errorValue(NeuralNode node)
          This function calculates what the error value should be.
 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.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LinearUnit

public LinearUnit()
Method Detail

outputValue

public double outputValue(NeuralNode node)
This function calculates what the output value should be.

Specified by:
outputValue in interface NeuralMethod
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:
errorValue in interface NeuralMethod
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:
updateWeights in interface NeuralMethod
Parameters:
node - The node to update the weights for.
learn - The learning rate to use.
momentum - The momentum to use.