org.encog.neural.pattern

## Class SOMPattern

- java.lang.Object
- - org.encog.neural.pattern.SOMPattern

- All Implemented Interfaces:
    NeuralNetworkPattern

      public class SOMPattern
      extends Object
      implements NeuralNetworkPattern

  A self organizing map is a neural network pattern with an input and output layer. There is no hidden layer. The winning neuron, which is that neuron with the higest output is the winner, this winning neuron is often used to classify the input into a group.
  Author:
    jheaton

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `SOMPattern()`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `addHiddenLayer(int count)` Add a hidden layer.
    `void` | `clear()` Clear out any hidden neurons.
    `MLMethod` | `generate()` Generate the RSOM network.
    `void` | `setActivationFunction(ActivationFunction activation)` Set the activation function.
    `void` | `setInputNeurons(int count)` Set the input neuron count.
    `void` | `setOutputNeurons(int count)` Set the output neuron count.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### SOMPattern

          public SOMPattern()

  - ### Method Detail

    - #### addHiddenLayer

          public void addHiddenLayer(int count)

      Add a hidden layer. SOM networks do not have hidden layers, so this will throw an error.
      Specified by:
        `addHiddenLayer` in interface `NeuralNetworkPattern`
      Parameters:
        `count` - The number of hidden neurons.

    - #### clear

          public void clear()

      Clear out any hidden neurons.
      Specified by:
        `clear` in interface `NeuralNetworkPattern`

    - #### generate

          public MLMethod generate()

      Generate the RSOM network.
      Specified by:
        `generate` in interface `NeuralNetworkPattern`
      Returns:
        The neural network.

    - #### setActivationFunction

          public void setActivationFunction(ActivationFunction activation)

      Set the activation function. A SOM uses a linear activation function, so this method throws an error.
      Specified by:
        `setActivationFunction` in interface `NeuralNetworkPattern`
      Parameters:
        `activation` - The activation function to use.

    - #### setInputNeurons

          public void setInputNeurons(int count)

      Set the input neuron count.
      Specified by:
        `setInputNeurons` in interface `NeuralNetworkPattern`
      Parameters:
        `count` - The number of neurons.

    - #### setOutputNeurons

          public void setOutputNeurons(int count)

      Set the output neuron count.
      Specified by:
        `setOutputNeurons` in interface `NeuralNetworkPattern`
      Parameters:
        `count` - The number of neurons.

Copyright © 2014. All Rights Reserved.