org.vizzini.ai.neuralnetwork.layer
Class AbstractFunctionLayer

java.lang.Object
  extended by org.vizzini.util.AbstractBean
      extended by org.vizzini.ai.neuralnetwork.layer.AbstractLayer
          extended by org.vizzini.ai.neuralnetwork.layer.AbstractFunctionLayer
All Implemented Interfaces:
Cloneable, ILayer
Direct Known Subclasses:
DefaultLayer, InputLayer, OutputLayer

public abstract class AbstractFunctionLayer
extends AbstractLayer

Provides base functionality for a activation function layer of a neural network.

Since:
v0.3
Version:
v0.3
Author:
Jeffrey M. Thompson

Field Summary
 
Fields inherited from class org.vizzini.util.AbstractBean
IGNORE_PROPERTIES
 
Constructor Summary
AbstractFunctionLayer()
          Construct this object.
AbstractFunctionLayer(String name, int nodeCount)
          Construct this object with the given parameters.
AbstractFunctionLayer(String name, int nodeCount, boolean isBiasNodeUsed)
          Construct this object with the given parameters.
 
Method Summary
 void clearOutputs()
          Clear the node output values.
 boolean equals(Object object)
          Return true if the given object is equal to this.
 double[] evaluate(double[] inputs)
          Apply the given inputs and return the output of the layer.
 IActivationFunction getActivationFunction()
          Return the activation function.
protected  void init(int nodeCount)
          Initialize using the given parameters.
 boolean isBiasNodeUsed()
           
 void setActivationFunction(IActivationFunction function)
          Set the activation function.
 void setBiasNodeUsed(boolean isBiasNodeUsed)
           
 
Methods inherited from class org.vizzini.ai.neuralnetwork.layer.AbstractLayer
clear, clearInputs, clone, getInput, getInputCount, getInputs, getMaxValueIndex, getName, getOutput, getOutputCount, getOutputs, hashCode, setInput, setInputCount, setInputs, setName, setOutput, setOutputCount, setOutputs, toDetailString, toString
 
Methods inherited from class org.vizzini.util.AbstractBean
appendArray, appendCollection, appendList, appendMap, compareBooleans, compareObjects, getIgnoreProperties
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

AbstractFunctionLayer

public AbstractFunctionLayer()
Construct this object.

Since:
v0.3

AbstractFunctionLayer

public AbstractFunctionLayer(String name,
                             int nodeCount)
Construct this object with the given parameters.

Parameters:
name - Name.
nodeCount - Node count.
Since:
v0.3

AbstractFunctionLayer

public AbstractFunctionLayer(String name,
                             int nodeCount,
                             boolean isBiasNodeUsed)
Construct this object with the given parameters.

Parameters:
name - Name.
nodeCount - Node count.
isBiasNodeUsed - Flag indicating if a bias node is used.
Since:
v0.3
Method Detail

clearOutputs

public void clearOutputs()
Clear the node output values.

Specified by:
clearOutputs in interface ILayer
Overrides:
clearOutputs in class AbstractLayer
Since:
v0.3

equals

public boolean equals(Object object)
Return true if the given object is equal to this.

Specified by:
equals in interface ILayer
Overrides:
equals in class AbstractLayer
Parameters:
object - The object to compare.
Returns:
Returns true if the objects are equal, otherwise false
Since:
v0.3

evaluate

public double[] evaluate(double[] inputs)
Apply the given inputs and return the output of the layer.

Parameters:
inputs - Node input values.
Since:
v0.3

getActivationFunction

public IActivationFunction getActivationFunction()
Return the activation function.

Specified by:
getActivationFunction in interface ILayer
Overrides:
getActivationFunction in class AbstractLayer
Since:
v0.3

isBiasNodeUsed

public boolean isBiasNodeUsed()
Returns:
Return isBiasNodeUsed.
Since:
v0.3

setActivationFunction

public void setActivationFunction(IActivationFunction function)
Set the activation function.

Specified by:
setActivationFunction in interface ILayer
Overrides:
setActivationFunction in class AbstractLayer
Parameters:
function - Activation function.
Since:
v0.3

setBiasNodeUsed

public void setBiasNodeUsed(boolean isBiasNodeUsed)
Parameters:
isBiasNodeUsed - The isBiasNodeUsed to set.
Since:
v0.3

init

protected void init(int nodeCount)
Initialize using the given parameters.

Overrides:
init in class AbstractLayer
Parameters:
nodeCount - Node count.
Since:
v0.3


Copyright © 2007 Vizzini.org. All Rights Reserved. 2007.12.25.03.00.02