org.shapelogic.machinelearning
Class FFNeuralNetwork
java.lang.Object
org.shapelogic.machinelearning.FFNeuralNetwork
- All Implemented Interfaces:
- Calc1<double[],double[]>
public class FFNeuralNetwork
- extends java.lang.Object
- implements Calc1<double[],double[]>
Feed Forward Neural Network with external training.
The bias is considered the zeroth element of the synaptic weight.
- Author:
- Sami Badawi
Field Summary |
protected int |
_biasWeight
There is not agreement about whether the bias should be 1 or -1.
In Joone it seems to be 1, so for now it is set to 1 here. |
protected java.util.ArrayList<java.lang.Integer> |
_layerNodes
|
protected java.util.ArrayList<double[]> |
_layerWeights
|
protected java.lang.String |
_message
|
int |
nInputNodes
|
int |
nOutputNodes
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
nInputNodes
public final int nInputNodes
nOutputNodes
public final int nOutputNodes
_layerNodes
protected java.util.ArrayList<java.lang.Integer> _layerNodes
_layerWeights
protected java.util.ArrayList<double[]> _layerWeights
_message
protected java.lang.String _message
_biasWeight
protected int _biasWeight
- There is not agreement about whether the bias should be 1 or -1.
In Joone it seems to be 1, so for now it is set to 1 here.
It might be changed to be ajudstable.
FFNeuralNetwork
public FFNeuralNetwork(int nInput,
int nOutput)
invoke
public double[] invoke(double[] input)
- Specified by:
invoke
in interface Calc1<double[],double[]>
calcLayer
public double[] calcLayer(double[] lastResult,
int layerNumber)
addLayer
public boolean addLayer(double[] layer)
addLayers
public boolean addLayers(double[][] layers)
transform
public double transform(double input)
getLayerNodes
public java.util.ArrayList<java.lang.Integer> getLayerNodes()
getLayerNodesInTopLayer
public int getLayerNodesInTopLayer()
getLayerWeights
public java.util.ArrayList<double[]> getLayerWeights()
getMessage
public java.lang.String getMessage()
Copyright © 2009. All Rights Reserved.