org.encog.neural.som.training.basic.neighborhood
Class NeighborhoodBubble
- java.lang.Object
-
- org.encog.neural.som.training.basic.neighborhood.NeighborhoodBubble
-
- All Implemented Interfaces:
- NeighborhoodFunction
public class NeighborhoodBubble extends java.lang.Object implements NeighborhoodFunction
A neighborhood function that uses a simple bubble. A radius is defined, and any neuron that is plus or minus that width from the winning neuron will be updated as a result of training.
-
-
Constructor Summary
Constructors Constructor and Description NeighborhoodBubble(int radius)Create a bubble neighborhood function that will return 1.0 (full update) for any neuron that is plus or minus the width distance from the winning neuron.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description doublefunction(int currentNeuron, int bestNeuron)Determine how much the current neuron should be affected by training based on its proximity to the winning neuron.doublegetRadius()voidsetRadius(double radius)Set the radius.
-
-
-
Constructor Detail
-
NeighborhoodBubble
public NeighborhoodBubble(int radius)
Create a bubble neighborhood function that will return 1.0 (full update) for any neuron that is plus or minus the width distance from the winning neuron.- Parameters:
radius- The width of the bubble, this is the distance that the neuron can be from the winning neuron. The true width, across the bubble, is actually two times this parameter.
-
-
Method Detail
-
function
public double function(int currentNeuron, int bestNeuron)Determine how much the current neuron should be affected by training based on its proximity to the winning neuron.- Specified by:
functionin interfaceNeighborhoodFunction- Parameters:
currentNeuron- THe current neuron being evaluated.bestNeuron- The winning neuron.- Returns:
- The ratio for this neuron's adjustment.
-
getRadius
public double getRadius()
- Specified by:
getRadiusin interfaceNeighborhoodFunction- Returns:
- The radius.
-
setRadius
public void setRadius(double radius)
Set the radius.- Specified by:
setRadiusin interfaceNeighborhoodFunction- Parameters:
radius- The new radius.
-
-
DMelt 3.0 © DataMelt by jWork.ORG