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:
Serializable, 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 bias nor a regular activation function. Calling any methods that deal with the activation function or bias values will result in an error. Contributed to Encog By M.Fletcher and M.Dean University of Cambridge, Dept. of Physics, UK

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 randomizeRBFCentersAndWidths(int dimensions, double min, double max, RBFEnum t)
          Set the RBF components to random values.
 void setRadialBasisFunction(RadialBasisFunction[] v)
          Set the array of radial basis functions.
 void setRBFCentersAndWidths(double[][] centers, double[] widths, RBFEnum t)
          Array containing center position.
 void setRBFCentersAndWidthsEqualSpacing(double minPosition, double maxPosition, RBFEnum t, int dimensions, 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.
 
Methods inherited from class org.encog.neural.networks.layers.BasicLayer
addNext, addNext, addSynapse, compareTo, getActivationFunction, getBiasActivation, getBiasWeight, getBiasWeights, getCollection, getDescription, getID, getName, getNetwork, getNeuronCount, getNext, getNextLayers, getX, getY, hasBias, isConnectedTo, isSelfConnected, process, recur, setActivationFunction, setBiasActivation, setBiasWeight, setBiasWeights, setCollection, setDescription, setID, setName, setNetwork, setNeuronCount, 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()
Description copied from class: BasicLayer
Create a persistor for this layer.

Specified by:
createPersistor in interface EncogPersistedObject
Overrides:
createPersistor in class BasicLayer
Returns:
Create a persistor for this layer.

getRadialBasisFunction

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

randomizeRBFCentersAndWidths

public void randomizeRBFCentersAndWidths(int dimensions,
                                         double min,
                                         double max,
                                         RBFEnum t)
Set the RBF components to random values.

Parameters:
dimensions - The number of dimensions in the network.
min - Minimum random value.
max - Max random value.
t - The type of RBF to use.

setRadialBasisFunction

public void setRadialBasisFunction(RadialBasisFunction[] v)
Set the array of radial basis functions.

Parameters:
v - An array of radial basis functions.

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,
                                               int dimensions,
                                               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
RBFType - The RBF type to use.
dimensions - The number of dimensions.
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.


Copyright © 2011. All Rights Reserved.