org.encog.neural.pattern

## Class PNNPattern

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

- All Implemented Interfaces:
    NeuralNetworkPattern

      public class PNNPattern
      extends Object
      implements NeuralNetworkPattern

  Pattern to create a PNN.

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `PNNPattern()`

  - ### 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.
    `int` | `getInputNeurons()`
    `PNNKernelType` | `getKernel()`
    `PNNOutputMode` | `getOutmodel()`
    `int` | `getOutputNeurons()`
    `void` | `setActivationFunction(ActivationFunction activation)` Set the activation function.
    `void` | `setInputNeurons(int count)` Set the input neuron count.
    `void` | `setKernel(PNNKernelType kernel)` Set the kernel type.
    `void` | `setOutmodel(PNNOutputMode outmodel)` Set the output model.
    `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

    - #### PNNPattern

          public PNNPattern()

  - ### Method Detail

    - #### addHiddenLayer

          public void addHiddenLayer(int count)

      Add a hidden layer. PNN 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.

    - #### getInputNeurons

          public int getInputNeurons()

      Returns:
        The number of input neurons.

    - #### getKernel

          public PNNKernelType getKernel()

      Returns:
        The kernel.

    - #### getOutmodel

          public PNNOutputMode getOutmodel()

      Returns:
        The output model.

    - #### getOutputNeurons

          public int getOutputNeurons()

      Returns:
        The number of output neurons.

    - #### setActivationFunction

          public void setActivationFunction(ActivationFunction activation)

      Set the activation function. A PNN 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.

    - #### setKernel

          public void setKernel(PNNKernelType kernel)

      Set the kernel type.
      Parameters:
        `kernel` - The kernel type.

    - #### setOutmodel

          public void setOutmodel(PNNOutputMode outmodel)

      Set the output model.
      Parameters:
        `outmodel` - The output model.

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