All Packages  Class Hierarchy  This Package  Previous  Next  Index  WEKA's home

Class weka.classifiers.neural.NeuralNode

java.lang.Object
    |
    +----weka.classifiers.neural.NeuralConnection
            |
            +----weka.classifiers.neural.NeuralNode

public class NeuralNode
extends NeuralConnection
This class is used to represent a node in the neuralnet.

Version:
$Revision: 1.2.2.1 $
Author:
Malcolm Ware (mfw4@cs.waikato.ac.nz)

Constructor Index

 o NeuralNode(String, Random, NeuralMethod)
 

Method Index

 o errorValue(boolean)
Call this to get the error value of this unit.
 o getChangeInWeights()
call this function to get the chnage in weights array.
 o getMethod()
 
 o getWeights()
call this function to get the weights array.
 o outputValue(boolean)
Call this to get the output value of this unit.
 o removeAllInputs()
This function will remove all the inputs to this unit.
 o reset()
Call this to reset the value and error for this unit, ready for the next run.
 o setMethod(NeuralMethod)
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.
 o updateWeights(double, double)
Call this function to update the weight values at this unit.
 o weightValue(int)
Call this to get the weight value on a particular connection.

Constructor Detail

 o NeuralNode
public NeuralNode(java.lang.String id,
                  java.util.Random r,
                  NeuralMethod m)
Parameters:
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

 o setMethod
public 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.
Parameters:
m - The new method.
 o getMethod
public NeuralMethod getMethod()
 o outputValue
public double outputValue(boolean calculate)
          Call this to get the output value of this unit.
Parameters:
calculate - True if the value should be calculated if it hasn't been already.
Returns:
The output value, or NaN, if the value has not been calculated.
Overrides:
outputValue in class NeuralConnection
 o errorValue
public double errorValue(boolean calculate)
          Call this to get the error value of this unit.
Parameters:
calculate - True if the value should be calculated if it hasn't been already.
Returns:
The error value, or NaN, if the value has not been calculated.
Overrides:
errorValue in class NeuralConnection
 o reset
public void reset()
          Call this to reset the value and error for this unit, ready for the next run. This will also call the reset function of all units that are connected as inputs to this one. This is also the time that the update for the listeners will be performed.
Overrides:
reset in class NeuralConnection
 o weightValue
public double weightValue(int n)
          Call this to get the weight value on a particular connection.
Parameters:
n - The connection number to get the weight for, -1 if The threshold weight should be returned.
Returns:
The value for the specified connection or if -1 then it should return the threshold value. If no value exists for the specified connection, NaN will be returned.
Overrides:
weightValue in class NeuralConnection
 o getWeights
public double[] getWeights()
          call this function to get the weights array. This will also allow the weights to be updated.
Returns:
The weights array.
 o getChangeInWeights
public double[] getChangeInWeights()
          call this function to get the chnage in weights array. This will also allow the change in weights to be updated.
Returns:
The change in weights array.
 o updateWeights
public void updateWeights(double l,
                          double m)
          Call this function to update the weight values at this unit. After the weights have been updated at this unit, All the input connections will then be called from this to have their weights updated.
Parameters:
l - The learning rate to use.
m - The momentum to use.
Overrides:
updateWeights in class NeuralConnection
 o removeAllInputs
public void removeAllInputs()
          This function will remove all the inputs to this unit. In doing so it will also terminate the connections at the other end.
Overrides:
removeAllInputs in class NeuralConnection

All Packages  Class Hierarchy  This Package  Previous  Next  Index  WEKA's home