mulan.classifier.neural.model
Interface NeuralNet

All Known Implementing Classes:
BasicNeuralNet

public interface NeuralNet

Common interface for interaction with a neural network representation.
Neural Network structure is composed of neurons organized into layers. There is one input layer, zero or more hidden layers and one output layer. The input layer is used just to store and forward input pattern of the network to the first hidden layer for processing. Input layer typically do not process input pattern. Neurons of input layer are assumed to have one input weight equal to 1, bias weight equal to 0 and use linear activation function.

Version:
2012.02.27
Author:
Jozef Vilcek

Method Summary
 double[] feedForward(double[] inputPattern)
          Propagates the input pattern through the network.
 int getLayersCount()
          Returns a total number of layers of the neural network.
 List<Neuron> getLayerUnits(int layerIndex)
          Returns units of a particular layer of the neural network.
 int getNetInputSize()
          Gets the size/dimension of the input layer of the neural network.
 int getNetOutputSize()
          Gets the size/dimension of the output layer of the neural network.
 double[] getOutput()
          Returns the actual output of the neural network, which is a result of last processed input pattern.
 void reset()
          Perform reset, re-initialization of neural network.
 

Method Detail

getNetInputSize

int getNetInputSize()
Gets the size/dimension of the input layer of the neural network. This is the size of input pattern the neural network can process.

Returns:
the network input size

getNetOutputSize

int getNetOutputSize()
Gets the size/dimension of the output layer of the neural network. This is the size of output pattern the neural network produces.

Returns:
the network output size

getLayersCount

int getLayersCount()
Returns a total number of layers of the neural network.

Returns:
the number of layers in the neural network

getLayerUnits

List<Neuron> getLayerUnits(int layerIndex)
Returns units of a particular layer of the neural network. The valid indexes for layers are from 0 to N-1, where N is total number of layers
The first layer (index = 0) is always input layer and last (index = N-1) always output layer.

Parameters:
layerIndex -
Returns:
returns an unmodifiable list of units of the particular layer
Throws:
IndexOutOfBoundsException - if the index is out of range
See Also:
Collections.unmodifiableList(List)

feedForward

double[] feedForward(double[] inputPattern)
Propagates the input pattern through the network.

Parameters:
inputPattern - the input pattern for the network to process
Returns:
the output of the network
Throws:
IllegalArgumentException - if input pattern is null or does not match network input dimension

getOutput

double[] getOutput()
Returns the actual output of the neural network, which is a result of last processed input pattern.

Returns:
the output of the network. Returns null if network is reset or no input pattern was processed

reset

void reset()
Perform reset, re-initialization of neural network. All learned knowledge stored in the network will be lost.