org.encog.neural.pattern

## Class CPNPattern

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

- All Implemented Interfaces:
    NeuralNetworkPattern

      public class CPNPattern
      extends Object
      implements NeuralNetworkPattern

  Pattern that creates a CPN neural network.

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static String` | `TAG_INSTAR` The tag for the INSTAR layer.
    `static String` | `TAG_OUTSTAR` The tag for the OUTSTAR layer.

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `CPNPattern()`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `addHiddenLayer(int count)` Not used, will throw an error.
    `void` | `clear()` Clear any parameters that were set.
    `MLMethod` | `generate()` Generate the network.
    `void` | `setActivationFunction(ActivationFunction activation)` This method will throw an error.
    `void` | `setInputNeurons(int count)` Set the number of input neurons.
    `void` | `setInstarCount(int instarCount)` Set the number of neurons in the instar layer.
    `void` | `setOutputNeurons(int count)` Set the number of output neurons.
    `void` | `setOutstarCount(int outstarCount)` Set the number of neurons in the outstar level, this level is mapped to the "output" level.

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

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

- - ### Field Detail

    - #### TAG_INSTAR

          public static final String TAG_INSTAR

      The tag for the INSTAR layer.
      See Also:
        Constant Field Values

    - #### TAG_OUTSTAR

          public static final String TAG_OUTSTAR

      The tag for the OUTSTAR layer.
      See Also:
        Constant Field Values

  - ### Constructor Detail

    - #### CPNPattern

          public CPNPattern()

  - ### Method Detail

    - #### addHiddenLayer

          public void addHiddenLayer(int count)

      Not used, will throw an error. CPN networks already have a predefined hidden layer called the instar layer.
      Specified by:
        `addHiddenLayer` in interface `NeuralNetworkPattern`
      Parameters:
        `count` - NOT USED

    - #### clear

          public void clear()

      Clear any parameters that were set.
      Specified by:
        `clear` in interface `NeuralNetworkPattern`

    - #### generate

          public MLMethod generate()

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

    - #### setActivationFunction

          public void setActivationFunction(ActivationFunction activation)

      This method will throw an error. The CPN network uses predefined activation functions.
      Specified by:
        `setActivationFunction` in interface `NeuralNetworkPattern`
      Parameters:
        `activation` - NOT USED

    - #### setInputNeurons

          public void setInputNeurons(int count)

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

    - #### setInstarCount

          public void setInstarCount(int instarCount)

      Set the number of neurons in the instar layer. This level is essentially a hidden layer.
      Parameters:
        `instarCount` - The instar count.

    - #### setOutputNeurons

          public void setOutputNeurons(int count)

      Set the number of output neurons. Calling this method maps to setting the number of neurons in the outstar layer.
      Specified by:
        `setOutputNeurons` in interface `NeuralNetworkPattern`
      Parameters:
        `count` - The count.

    - #### setOutstarCount

          public void setOutstarCount(int outstarCount)

      Set the number of neurons in the outstar level, this level is mapped to the "output" level.
      Parameters:
        `outstarCount` - The outstar count.

Copyright © 2014. All Rights Reserved.