The Encog Project

org.encog.neural.networks.training.competitive.neighborhood
Class NeighborhoodSingle

java.lang.Object
  extended by org.encog.neural.networks.training.competitive.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.

Author:
jheaton

Constructor Summary
NeighborhoodSingle()
           
 
Method Summary
 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.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

NeighborhoodSingle

public NeighborhoodSingle()
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:
function in interface NeighborhoodFunction
Parameters:
currentNeuron - THe current neuron being evaluated.
bestNeuron - The winning neuron.
Returns:
The ratio for this neuron's adjustment.

The Encog Project