Documentation of 'org.encog.mathutil.randomize.FanInRandomizer' Java class
FanInRandomizer
org.encog.mathutil.randomize

Class FanInRandomizer

  • All Implemented Interfaces:
    Randomizer


    public class FanInRandomizer
    extends BasicRandomizer
    A randomizer that attempts to create starting weight values that are conducive to propagation training. This is one of the best randomizers offered in Encog, however, the Nguyen Widrow method generally performs better. From: Neural Networks - A Comprehensive Foundation, Haykin, chapter 6.7
    • Constructor Summary

      Constructors 
      Constructor and Description
      FanInRandomizer()
      Create a fan-in randomizer with default values.
      FanInRandomizer(double boundary, boolean sqrt)
      Construct a fan-in randomizer along the specified boundary.
      FanInRandomizer(double aLowerBound, double anUpperBound, boolean sqrt)
      Construct a fan-in randomizer.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method and Description
      void randomize(BasicNetwork network, int fromLayer)
      Randomize one level of a neural network.
      double randomize(double d)
      Starting with the specified number, randomize it to the degree specified by this randomizer.
      void randomize(double[] d)
      Randomize the array based on an array, modify the array.
      void randomize(double[][] d)
      Randomize the 2d array based on an array, modify the array.
      void randomize(Matrix m)
      Randomize the matrix based on an array, modify the array.
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • FanInRandomizer

        public FanInRandomizer()
        Create a fan-in randomizer with default values.
      • FanInRandomizer

        public FanInRandomizer(double boundary,
                               boolean sqrt)
        Construct a fan-in randomizer along the specified boundary. The min will be -boundary and the max will be boundary.
        Parameters:
        boundary - The boundary for the fan-in.
        sqrt - Should the square root of the rows to be used in the calculation.
      • FanInRandomizer

        public FanInRandomizer(double aLowerBound,
                               double anUpperBound,
                               boolean sqrt)
        Construct a fan-in randomizer. Use the specified bounds.
        Parameters:
        aLowerBound - The lower bound.
        anUpperBound - The upper bound.
        sqrt - True if the square root of the rows should be used in the calculation.
    • Method Detail

      • randomize

        public double randomize(double d)
        Starting with the specified number, randomize it to the degree specified by this randomizer. This could be a totally new random number, or it could be based on the specified number.
        Parameters:
        d - The number to randomize.
        Returns:
        A randomized number.
      • randomize

        public void randomize(double[] d)
        Randomize the array based on an array, modify the array. Previous values may be used, or they may be discarded, depending on the randomizer.
        Specified by:
        randomize in interface Randomizer
        Overrides:
        randomize in class BasicRandomizer
        Parameters:
        d - An array to randomize.
      • randomize

        public void randomize(double[][] d)
        Randomize the 2d array based on an array, modify the array. Previous values may be used, or they may be discarded, depending on the randomizer.
        Specified by:
        randomize in interface Randomizer
        Overrides:
        randomize in class BasicRandomizer
        Parameters:
        d - An array to randomize.
      • randomize

        public void randomize(Matrix m)
        Randomize the matrix based on an array, modify the array. Previous values may be used, or they may be discarded, depending on the randomizer.
        Specified by:
        randomize in interface Randomizer
        Overrides:
        randomize in class BasicRandomizer
        Parameters:
        m - A matrix to randomize.
      • randomize

        public void randomize(BasicNetwork network,
                              int fromLayer)
        Randomize one level of a neural network.
        Overrides:
        randomize in class BasicRandomizer
        Parameters:
        network - The network to randomize
        fromLayer - The from level to randomize.

DMelt 3.0 © DataMelt by jWork.ORG

You see the box below because you did not login.