类 NeuralNode

java.lang.Object
weka.classifiers.functions.neural.NeuralConnection
weka.classifiers.functions.neural.NeuralNode
所有已实现的接口:
Serializable, RevisionHandler

public class NeuralNode extends NeuralConnection
This class is used to represent a node in the neuralnet.
版本:
$Revision: 5403 $
作者:
Malcolm Ware (mfw4@cs.waikato.ac.nz)
另请参阅:
  • 构造器详细资料

    • NeuralNode

      public NeuralNode(String id, 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.
  • 方法详细资料

    • 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.
      参数:
      m - The new method.
    • getMethod

      public NeuralMethod getMethod()
    • outputValue

      public double outputValue(boolean calculate)
      Call this to get the output value of this unit.
      指定者:
      outputValue 在类中 NeuralConnection
      参数:
      calculate - True if the value should be calculated if it hasn't been already.
      返回:
      The output value, or NaN, if the value has not been calculated.
    • errorValue

      public double errorValue(boolean calculate)
      Call this to get the error value of this unit.
      指定者:
      errorValue 在类中 NeuralConnection
      参数:
      calculate - True if the value should be calculated if it hasn't been already.
      返回:
      The error value, or NaN, if the value has not been calculated.
    • 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.
      指定者:
      reset 在类中 NeuralConnection
    • saveWeights

      public void saveWeights()
      Call this to have the connection save the current weights.
      指定者:
      saveWeights 在类中 NeuralConnection
    • restoreWeights

      public void restoreWeights()
      Call this to have the connection restore from the saved weights.
      指定者:
      restoreWeights 在类中 NeuralConnection
    • weightValue

      public double weightValue(int n)
      Call this to get the weight value on a particular connection.
      覆盖:
      weightValue 在类中 NeuralConnection
      参数:
      n - The connection number to get the weight for, -1 if The threshold weight should be returned.
      返回:
      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.
    • getWeights

      public double[] getWeights()
      call this function to get the weights array. This will also allow the weights to be updated.
      返回:
      The weights array.
    • 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.
      返回:
      The change in weights array.
    • 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.
      覆盖:
      updateWeights 在类中 NeuralConnection
      参数:
      l - The learning rate to use.
      m - The momentum to use.
    • 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.
      覆盖:
      removeAllInputs 在类中 NeuralConnection
    • getRevision

      public String getRevision()
      Returns the revision string.
      返回:
      the revision