saaps.ann.mlff
Class Network

java.lang.Object
  |
  +--saaps.ann.mlff.Network

public class Network
extends java.lang.Object

This class implements the multi layer feed forward neural network. The network is made up of one or several layers, which in turn contain neurons. Each neuron is defined by its weights, bias, and transfer function.

The network can be stored to the file system and read from the file system.

To run the network one must first set the weights, biases, and transfer functions, either explicitly or from reading a stored network. Then one specifies the input as an saaps.ann.Data object. After it has been run the output can be received as an saaps.ann.Data object.

Example:

This example assumes that we have an 2 element array of Layer objects called layers. The should also be a Data object called inData.
Network net = new Network(layers);
net.setInput(inData);
Data outData = net.getOutput();


Constructor Summary
Network()
          Creates a new empty Network
Network(Layer[] l)
          Create a network from an array of layers.
Network(java.lang.String name)
          Create a network from a stored file.
 
Method Summary
 Data getOutput()
          Get the output.
 void run()
          Run the network.
 void setInput(Data inp)
          Present the input data to the network.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Network

public Network()
Creates a new empty Network

Network

public Network(java.lang.String name)
Create a network from a stored file.

Not yet implemented!

Parameters:
name - The name of the file.

Network

public Network(Layer[] l)
Create a network from an array of layers.
Parameters:
l - The layers
Method Detail

setInput

public void setInput(Data inp)
Present the input data to the network. The network is not run.
Parameters:
inp - The input data.

run

public void run()
Run the network.

getOutput

public Data getOutput()
Get the output.

If the network has not been run after new input data has been presented this method will also run the network.

Returns:
The output from the network.