org.encog.mathutil.randomize

## Class NguyenWidrowRandomizer

- java.lang.Object
- - org.encog.mathutil.randomize.BasicRandomizer
  - - org.encog.mathutil.randomize.NguyenWidrowRandomizer

- All Implemented Interfaces:
    Randomizer

      public class NguyenWidrowRandomizer
      extends BasicRandomizer

  Implementation of Nguyen-Widrow weight initialization. This is the default weight initialization used by Encog, as it generally provides the most train-able neural network.

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static String` | `MSG`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `NguyenWidrowRandomizer()`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `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(double[] d, int begin, int size)` Randomize the array based on an array, modify the array.
    `void` | `randomize(Matrix m)` Randomize the matrix based on an array, modify the array.
    `void` | `randomize(MLMethod method)` Randomize the synapses and biases in the basic network based on an array, modify the array.

    - ### Methods inherited from class org.encog.mathutil.randomize.BasicRandomizer

      `getRandom, nextDouble, nextDouble, randomize, setRandom`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Field Detail

    - #### MSG

          public static String MSG

  - ### Constructor Detail

    - #### NguyenWidrowRandomizer

          public NguyenWidrowRandomizer()

  - ### Method Detail

    - #### randomize

          public void randomize(MLMethod method)

      Description copied from class: `BasicRandomizer`
      Randomize the synapses and biases in the basic network 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:
        `method` - A network to randomize.

    - #### randomize

          public double randomize(double d)

      Description copied from interface: `Randomizer`
      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)

      Description copied from class: `BasicRandomizer`
      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)

      Description copied from class: `BasicRandomizer`
      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)

      Description copied from class: `BasicRandomizer`
      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(double[] d,
                       int begin,
                       int size)

      Description copied from class: `BasicRandomizer`
      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.
        `begin` - The beginning element of the array.
        `size` - The size of the array to copy.

Copyright © 2014. All Rights Reserved.