Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## 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 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.

Author:
  jheaton

Constructor Summary
`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
`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.
`double` | `getRadius()`
`void` | `setRadius(double radius)` Set the radius.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

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 final 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.

### getRadius

    public final double getRadius()

  Specified by:
    `getRadius` in interface `NeighborhoodFunction`
  Returns:
    The radius.

### setRadius

    public final void setRadius(double radius)

  Set the radius.

  Specified by:
    `setRadius` in interface `NeighborhoodFunction`
  Parameters:
    `radius` - The new radius.

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2011. All Rights Reserved.