org.encog.neural.som.training.basic.neighborhood
Class NeighborhoodSingle
- java.lang.Object
-
- org.encog.neural.som.training.basic.neighborhood.NeighborhoodSingle
-
- All Implemented Interfaces:
- NeighborhoodFunction
public class NeighborhoodSingle extends java.lang.Object implements NeighborhoodFunction
A very simple neighborhood function that will return 1.0 (full effect) for the winning neuron, and 0.0 (no change) for everything else.
-
-
Constructor Summary
Constructors Constructor and Description NeighborhoodSingle()
-
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()The radius for this neighborhood function is always 1.voidsetRadius(double radius)Set the radius.
-
-
-
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()
The radius for this neighborhood function is always 1.- Specified by:
getRadiusin interfaceNeighborhoodFunction- Returns:
- The radius.
-
setRadius
public void setRadius(double radius)
Set the radius. This type does not use a radius, so this has no effect.- Specified by:
setRadiusin interfaceNeighborhoodFunction- Parameters:
radius- The radius.
-
-
DMelt 3.0 © DataMelt by jWork.ORG