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
Class SOM

    java.lang.Object
      org.encog.ml.BasicML
          org.encog.neural.som.SOM

All Implemented Interfaces:
  Serializable, MLClassification, MLError, MLInput, MLInputOutput, MLMethod, MLOutput, MLProperties, MLResettable

    public class SOM

extends BasicML
implements MLClassification, MLResettable, MLError

A self organizing map neural network.

See Also:
  Serialized Form

Field Summary
`protected int` | `inputNeuronCount` Number of input neurons.
`protected int` | `outputNeuronCount` Number of output neurons.
`static double` | `VERYSMALL` Do not allow patterns to go below this very small number.

Constructor Summary
`SOM()` Default constructor.
`SOM(int inputCount, int outputCount)` The constructor.

Method Summary
`double` | `calculateError(MLDataSet data)` Calculate the error of the ML method, given a dataset.
`int` | `classify(MLData input)` Classify the input into a group.
`MLData` | `compute(MLData input)` Determine the winner for the specified input.
`int` | `getInputCount()`
`int` | `getInputNeuronCount()` Get the input neuron count.
`int` | `getOutputCount()`
`int` | `getOutputNeuronCount()` Get the output neuron count.
`Matrix` | `getWeights()`
`void` | `reset()` Reset the weights.
`void` | `reset(int seed)` Reset the weights with a seed.
`void` | `setInputCount(int i)` Set the input count.
`void` | `setOutputNeuronCount(int i)` Set the output count.
`void` | `setWeights(Matrix weights)`
`void` | `updateProperties()` Update any objeccts when a property changes.
`int` | `winner(MLData input)` Determine the winner for the specified input.

Methods inherited from class org.encog.ml.BasicML
`getProperties, getPropertyDouble, getPropertyLong, getPropertyString, setProperty, setProperty, setProperty`

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

Field Detail

### VERYSMALL

    public static final double VERYSMALL

  Do not allow patterns to go below this very small number.

  See Also:
    Constant Field Values

### inputNeuronCount

    protected int inputNeuronCount

  Number of input neurons.

### outputNeuronCount

    protected int outputNeuronCount

  Number of output neurons.

Constructor Detail

### SOM

    public SOM()

  Default constructor.

### SOM

    public SOM(int inputCount,
               int outputCount)

  The constructor.

  Parameters:
    `inputCount` - Number of input neurons
    `outputCount` - Number of output neurons

Method Detail

### calculateError

    public final double calculateError(MLDataSet data)

  Calculate the error of the ML method, given a dataset.

  Specified by:
    `calculateError` in interface `MLError`
  Parameters:
    `data` - The dataset.
  Returns:
    The error.

### classify

    public final int classify(MLData input)

  Classify the input into a group.

  Specified by:
    `classify` in interface `MLClassification`
  Parameters:
    `input` - The input data to classify.
  Returns:
    The group that the data was classified into.

### compute

    public final MLData compute(MLData input)

  Determine the winner for the specified input. This is the number of the winning neuron.

  Parameters:
    `input` - The input pattern.
  Returns:
    The winning neuron.

### getInputCount

    public final int getInputCount()

  Specified by:
    `getInputCount` in interface `MLInput`
  Returns:
    The input.

### getInputNeuronCount

    public final int getInputNeuronCount()

  Get the input neuron count.

  Returns:
    The input neuron count.

### getOutputCount

    public final int getOutputCount()

  Specified by:
    `getOutputCount` in interface `MLOutput`
  Returns:
    The output count.

### getOutputNeuronCount

    public final int getOutputNeuronCount()

  Get the output neuron count.

  Returns:
    The output neuron count.

### getWeights

    public final Matrix getWeights()

  Returns:
    the weights

### reset

    public final void reset()

  Reset the weights.

  Specified by:
    `reset` in interface `MLResettable`

### reset

    public final void reset(int seed)

  Reset the weights with a seed.

  Specified by:
    `reset` in interface `MLResettable`
  Parameters:
    `seed` - The seed value.

### setInputCount

    public final void setInputCount(int i)

  Set the input count.

  Parameters:
    `i` - The input count.

### setOutputNeuronCount

    public final void setOutputNeuronCount(int i)

  Set the output count.

  Parameters:
    `i` - The output count.

### setWeights

    public final void setWeights(Matrix weights)

  Parameters:
    `weights` - the weights to set

### updateProperties

    public final void updateProperties()

  Update any objeccts when a property changes.

  Specified by:
    `updateProperties` in interface `MLProperties`
  Specified by:
    `updateProperties` in class `BasicML`

### winner

    public final int winner(MLData input)

  Determine the winner for the specified input. This is the number of the winning neuron.

  Parameters:
    `input` - The input pattern.
  Returns:
    The winning neuron.

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.