com.penguinwerks.jodene
Class NetworkBuilder

java.lang.Object
  extended bycom.penguinwerks.jodene.NetworkBuilder

public class NetworkBuilder
extends java.lang.Object

TODO Implement a generic network builder.

Author:
Paul Hoehne

Constructor Summary
NetworkBuilder()
           
 
Method Summary
 void addHiddenLayer(int size)
          Adds a hidden layer to build with the given size.
 void addInputNeuron(java.lang.String name)
          Adds an input neuron to the builder.
 void addInputNeurons(java.util.List neurons)
          Adds a list of input neurons to the network builder.
 void addOutputNeuron(java.lang.String name)
          Adds an output neuron to the builder.
 void addOutputNeurons(java.util.List neurons)
          Adds a list of output neurons to the builder.
 Network buildNetwork()
          Build a network.
 ActivationFactory getActivationFactory()
          Returns the activation factory for this builder.
 java.util.List getSizes()
          Return the sizes of the layers of the network to build
 void setActivationFactory(ActivationFactory factory)
          Sets the factory that will create activation functions, therefore building the network with the desired activation function.
 void setSizes(java.util.List sizes)
          Set the sizes of the layers of the network to build
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

NetworkBuilder

public NetworkBuilder()
Method Detail

getSizes

public java.util.List getSizes()
Return the sizes of the layers of the network to build

Returns:
The sizes of the network's layers.

setSizes

public void setSizes(java.util.List sizes)
Set the sizes of the layers of the network to build

Parameters:
sizes - The layer sizes.

addHiddenLayer

public void addHiddenLayer(int size)
Adds a hidden layer to build with the given size.

Parameters:
size - The size of the hidden layer.

addInputNeuron

public void addInputNeuron(java.lang.String name)
Adds an input neuron to the builder.

Parameters:
name - The name of the input neuron.

addInputNeurons

public void addInputNeurons(java.util.List neurons)
Adds a list of input neurons to the network builder.

Parameters:
neurons - The list of neurons.

addOutputNeuron

public void addOutputNeuron(java.lang.String name)
Adds an output neuron to the builder.

Parameters:
name - The name of the output neuron.

addOutputNeurons

public void addOutputNeurons(java.util.List neurons)
Adds a list of output neurons to the builder.

Parameters:
neurons - The list of neurons.

setActivationFactory

public void setActivationFactory(ActivationFactory factory)
Sets the factory that will create activation functions, therefore building the network with the desired activation function.

Parameters:
factory - The activation factory.

getActivationFactory

public ActivationFactory getActivationFactory()
Returns the activation factory for this builder.

Returns:
The activation factory for the builder.

buildNetwork

public Network buildNetwork()
                     throws DuplicateNeuronException
Build a network. This method causes the network builder to build a fully connected, feed-forward neural network.

Returns:
A constructed network.
Throws:
DuplicateNeuronException