org.encog.neural.rbf

## Class RBFNetwork

- java.lang.Object
- - org.encog.ml.BasicML
  - - org.encog.neural.rbf.RBFNetwork

- All Implemented Interfaces:
    Serializable, MLEncodable, MLError, MLInput, MLInputOutput, MLMethod, MLOutput, MLProperties, MLRegression, MLResettable, ContainsFlat

      public class RBFNetwork
      extends BasicML
      implements MLError, MLRegression, ContainsFlat, MLResettable, MLEncodable

  RBF neural network.
  See Also:
    Serialized Form

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `RBFNetwork()` Construct RBF network.
    `RBFNetwork(int inputCount, int hiddenCount, int outputCount, RBFEnum t)` Construct RBF network.
    `RBFNetwork(int inputCount, int outputCount, RadialBasisFunction[] rbf)` Construct RBF network.

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `double` | `calculateError(MLDataSet data)` Calculate the error for this neural network.
    `MLData` | `compute(MLData input)` Compute regression.
    `void` | `decodeFromArray(double[] encoded)` Decode an array to this object.
    `int` | `encodedArrayLength()`
    `void` | `encodeToArray(double[] encoded)` Encode the object to the specified array.
    `FlatNetwork` | `getFlat()`
    `int` | `getInputCount()`
    `int` | `getOutputCount()`
    `RadialBasisFunction[]` | `getRBF()` Get the RBF's.
    `void` | `randomizeRBFCentersAndWidths(double min, double max, RBFEnum t)` Set the RBF components to random values.
    `void` | `reset()` Reset the weights.
    `void` | `reset(int seed)` Reset the weights with a seed.
    `void` | `setRBF(RadialBasisFunction[] rbf)` Set the RBF's.
    `void` | `setRBFCentersAndWidths(double[][] centers, double[] widths, RBFEnum t)` Array containing center position.
    `void` | `setRBFCentersAndWidthsEqualSpacing(double minPosition, double maxPosition, RBFEnum t, double volumeNeuronRBFWidth, boolean useWideEdgeRBFs)` Equally spaces all hidden neurons within the n dimensional variable space.
    `void` | `setRBFFunction(int index, RBFEnum t, double[] centers, double width)` Set an RBF function.
    `void` | `updateProperties()` Update any objeccts when a property changes.

    - ### Methods inherited from class org.encog.ml.BasicML

      `getProperties, getPropertyDouble, getPropertyLong, getPropertyString, setProperty, setProperty, setProperty`

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

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

- - ### Constructor Detail

    - #### RBFNetwork

          public RBFNetwork()

      Construct RBF network.

    - #### RBFNetwork

          public RBFNetwork(int inputCount,
                    int hiddenCount,
                    int outputCount,
                    RBFEnum t)

      Construct RBF network.
      Parameters:
        `inputCount` - The input count.
        `hiddenCount` - The hidden count.
        `outputCount` - The output count.
        `t` - The RBF type.

    - #### RBFNetwork

          public RBFNetwork(int inputCount,
                    int outputCount,
                    RadialBasisFunction[] rbf)

      Construct RBF network.
      Parameters:
        `inputCount` - The input count.
        `outputCount` - The output count.
        `rbf` - The RBF type.

  - ### Method Detail

    - #### calculateError

          public double calculateError(MLDataSet data)

      Calculate the error for this neural network.
      Specified by:
        `calculateError` in interface `MLError`
      Parameters:
        `data` - The training set.
      Returns:
        The error percentage.

    - #### compute

          public MLData compute(MLData input)

      Compute regression.
      Specified by:
        `compute` in interface `MLRegression`
      Parameters:
        `input` - The input data.
      Returns:
        The output data.

    - #### getFlat

          public FlatNetwork getFlat()

      Specified by:
        `getFlat` in interface `ContainsFlat`
      Returns:
        The flat network associated with this neural network.

    - #### getInputCount

          public int getInputCount()

      Specified by:
        `getInputCount` in interface `MLInput`
      Returns:
        The input.

    - #### getOutputCount

          public int getOutputCount()

      Specified by:
        `getOutputCount` in interface `MLOutput`
      Returns:
        The output count.

    - #### getRBF

          public RadialBasisFunction[] getRBF()

      Get the RBF's.
      Returns:
        The RBF's.

    - #### randomizeRBFCentersAndWidths

          public void randomizeRBFCentersAndWidths(double min,
                                          double max,
                                          RBFEnum t)

      Set the RBF components to random values.
      Parameters:
        `min` - Minimum random value.
        `max` - Max random value.
        `t` - The type of RBF to use.

    - #### setRBF

          public void setRBF(RadialBasisFunction[] rbf)

      Set the RBF's.
      Parameters:
        `rbf` - The RBF's.

    - #### setRBFCentersAndWidths

          public void setRBFCentersAndWidths(double[][] centers,
                                    double[] widths,
                                    RBFEnum t)

      Array containing center position. Row n contains centers for neuron n. Row n contains x elements for x number of dimensions.
      Parameters:
        `centers` - The centers.
        `widths` - Array containing widths. Row n contains widths for neuron n. Row n contains x elements for x number of dimensions.
        `t` - The RBF Function to use for this layer.

    - #### setRBFCentersAndWidthsEqualSpacing

          public void setRBFCentersAndWidthsEqualSpacing(double minPosition,
                                                double maxPosition,
                                                RBFEnum t,
                                                double volumeNeuronRBFWidth,
                                                boolean useWideEdgeRBFs)

      Equally spaces all hidden neurons within the n dimensional variable space.
      Parameters:
        `minPosition` - The minimum position neurons should be centered. Typically 0.
        `maxPosition` - The maximum position neurons should be centered. Typically 1
        `volumeNeuronRBFWidth` - The neuron width of neurons within the mesh.
        `useWideEdgeRBFs` - Enables wider RBF's around the boundary of the neuron mesh.

    - #### setRBFFunction

          public void setRBFFunction(int index,
                            RBFEnum t,
                            double[] centers,
                            double width)

      Set an RBF function.
      Parameters:
        `index` - The index to set.
        `t` - The function type.
        `centers` - The centers.
        `width` - The width.

    - #### updateProperties

          public void updateProperties()

      Update any objeccts when a property changes.
      Specified by:
        `updateProperties` in interface `MLProperties`
      Specified by:
        `updateProperties` in class `BasicML`

    - #### reset

          public void reset()

      Reset the weights.
      Specified by:
        `reset` in interface `MLResettable`

    - #### reset

          public void reset(int seed)

      Reset the weights with a seed.
      Specified by:
        `reset` in interface `MLResettable`
      Parameters:
        `seed` - The seed value.

    - #### encodedArrayLength

          public int encodedArrayLength()

      Specified by:
        `encodedArrayLength` in interface `MLEncodable`
      Returns:
        The length of an encoded array.

    - #### encodeToArray

          public void encodeToArray(double[] encoded)

      Encode the object to the specified array.
      Specified by:
        `encodeToArray` in interface `MLEncodable`
      Parameters:
        `encoded` - The array.

    - #### decodeFromArray

          public void decodeFromArray(double[] encoded)

      Decode an array to this object.
      Specified by:
        `decodeFromArray` in interface `MLEncodable`
      Parameters:
        `encoded` - The encoded array.

Copyright © 2014. All Rights Reserved.