The Encog Project

org.encog.neural.networks.layers
Class RadialBasisFunctionLayer

java.lang.Object
  extended by org.encog.neural.networks.layers.BasicLayer
      extended by org.encog.neural.networks.layers.RadialBasisFunctionLayer
All Implemented Interfaces:
java.io.Serializable, java.lang.Comparable<Layer>, Layer, EncogPersistedObject

public class RadialBasisFunctionLayer
extends BasicLayer

This layer type makes use of several radial basis function to scale the output from this layer. Each RBF can have a different center, peak, and width. Proper selection of these values will greatly impact the success of the layer. Currently, Encog provides no automated way of determining these values. There is one RBF per neuron. Radial basis function layers have neither thresholds nor a regular activation function. Calling any methods that deal with the activation function or thresholds will result in an error.

Author:
jheaton
See Also:
Serialized Form

Constructor Summary
RadialBasisFunctionLayer()
          Default constructor, mainly so the workbench can easily create a default layer.
RadialBasisFunctionLayer(int neuronCount)
          Construct a radial basis function layer.
 
Method Summary
 NeuralData compute(NeuralData pattern)
          Compute the values before sending output to the next layer.
 Persistor createPersistor()
          Create a persistor for this layer.
 RadialBasisFunction[] getRadialBasisFunction()
           
 void randomizeGaussianCentersAndWidths(double min, double max)
          Set the gausian components to random values.
 void setRadialBasisFunction(RadialBasisFunction[] newRBF)
          Set the RBF array used by this layer.
 
Methods inherited from class org.encog.neural.networks.layers.BasicLayer
addNext, addNext, addSynapse, compareTo, getActivationFunction, getDescription, getID, getName, getNetwork, getNeuronCount, getNext, getNextLayers, getThreshold, getThreshold, getX, getY, hasThreshold, isConnectedTo, isSelfConnected, process, recur, setActivationFunction, setDescription, setID, setName, setNetwork, setNeuronCount, setThreshold, setThreshold, setX, setY, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

RadialBasisFunctionLayer

public RadialBasisFunctionLayer()
Default constructor, mainly so the workbench can easily create a default layer.


RadialBasisFunctionLayer

public RadialBasisFunctionLayer(int neuronCount)
Construct a radial basis function layer.

Parameters:
neuronCount - The neuron count.
Method Detail

compute

public NeuralData compute(NeuralData pattern)
Compute the values before sending output to the next layer. This function allows the activation functions to be called.

Specified by:
compute in interface Layer
Overrides:
compute in class BasicLayer
Parameters:
pattern - The incoming Project.
Returns:
The output from this layer.

createPersistor

public Persistor createPersistor()
Create a persistor for this layer.

Specified by:
createPersistor in interface EncogPersistedObject
Overrides:
createPersistor in class BasicLayer
Returns:
The new persistor.

getRadialBasisFunction

public RadialBasisFunction[] getRadialBasisFunction()
Returns:
An array of radial basis functions.

randomizeGaussianCentersAndWidths

public void randomizeGaussianCentersAndWidths(double min,
                                              double max)
Set the gausian components to random values.

Parameters:
min - The minimum value for the centers, widths and peaks.
max - The maximum value for the centers, widths and peaks.

setRadialBasisFunction

public void setRadialBasisFunction(RadialBasisFunction[] newRBF)
Set the RBF array used by this layer.

Parameters:
newRBF - The new RBF array.

The Encog Project