Documentation of 'org.neuroph.core.Weight' Java class
Weight
org.neuroph.core

Class Weight<T>

  • Type Parameters:
    T - weight training data
    All Implemented Interfaces:
    java.io.Serializable, java.lang.Cloneable


    public class Weight<T>
    extends java.lang.Object
    implements java.io.Serializable, java.lang.Cloneable
    Neuron connection weight.
    See Also:
    Connection, Serialized Form
    • Field Summary

      Fields 
      Modifier and Type Field and Description
      double value
      Weight value
      double weightChange
      Weight change
    • Constructor Summary

      Constructors 
      Constructor and Description
      Weight()
      Creates an instance of connection weight with random weight value in range [-0.5 ..
      Weight(double value)
      Creates an instance of connection weight with the specified weight value
    • Method Summary

      All Methods Instance Methods Concrete Methods Deprecated Methods 
      Modifier and Type Method and Description
      java.lang.Object clone()
      Returns cloned instance of this weight Important: trainingData will be lost in cloned instance
      void dec(double amount)
      Decreases the weight for specified amount
      boolean equals(java.lang.Object obj) 
      T getTrainingData()
      Returns training data buffer for this weight
      double getValue()
      Returns weight value
      int hashCode() 
      void inc(double amount)
      Increases the weight for the specified amount
      void randomize(double min, double max)
      Deprecated. 
      void setTrainingData(T trainingData) 
      void setValue(double value)
      Sets the weight value
      java.lang.String toString()
      Returns weight value as String
      • Methods inherited from class java.lang.Object

        getClass, notify, notifyAll, wait, wait, wait
    • Field Detail

      • value

        public double value
        Weight value
      • weightChange

        public transient double weightChange
        Weight change
    • Constructor Detail

      • Weight

        public Weight()
        Creates an instance of connection weight with random weight value in range [-0.5 .. 0.5]
      • Weight

        public Weight(double value)
        Creates an instance of connection weight with the specified weight value
        Parameters:
        value - weight value
    • Method Detail

      • inc

        public final void inc(double amount)
        Increases the weight for the specified amount
        Parameters:
        amount - amount to add to current weight value
      • dec

        public final void dec(double amount)
        Decreases the weight for specified amount
        Parameters:
        amount - amount to subtract from the current weight value
      • setValue

        public final void setValue(double value)
        Sets the weight value
        Parameters:
        value - weight value to set
      • getValue

        public final double getValue()
        Returns weight value
        Returns:
        value of this weight
      • toString

        public java.lang.String toString()
        Returns weight value as String
        Overrides:
        toString in class java.lang.Object
      • randomize

        @Deprecated
        public void randomize(double min,
                                          double max)
        Deprecated. 
        Sets random weight value within specified interval Use weight randomizers for this
      • getTrainingData

        public final T getTrainingData()
        Returns training data buffer for this weight
        Returns:
        training data buffer for this weight
      • setTrainingData

        public final void setTrainingData(T trainingData)
      • clone

        public java.lang.Object clone()
                               throws java.lang.CloneNotSupportedException
        Returns cloned instance of this weight Important: trainingData will be lost in cloned instance
        Overrides:
        clone in class java.lang.Object
        Returns:
        cloned instance of this weight
        Throws:
        java.lang.CloneNotSupportedException
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object
      • equals

        public boolean equals(java.lang.Object obj)
        Overrides:
        equals in class java.lang.Object

DMelt 3.0 © DataMelt by jWork.ORG

You see the box below because you did not login.