com.weighscore.neuro
Class Signal

public class Signal
The class which performs the network asking process and error back propagation. It is instantiated for every ask, teach or test action. The system calls go method when asking the network. The teacher may call goBack method to back propagat the error and to get gradient
Version:
2.0
Author:
Fyodor Kravchenko
Method Detail

getGoneForth

public boolean getGoneForth()
Tests if the signal was sent forth and reached its end
Returns:
true if the signal was sent forth and reached it's destination

getGoneBack

public boolean getGoneBack()
Tests if the signal was sent back and reached its end
Returns:
true if the signal was sent back and reached it's destination

getAnswer

public double getAnswer(com.weighscore.neuro.Neuron n)
Gets the output of the specified neuron
Parameters:
n - Neuron
Returns:
output of the neuron

getError

public double getError(com.weighscore.neuro.Neuron n)
Gets the back propagated error for the specified neuron
Parameters:
n - Neuron
Returns:
double

getGradient

public double getGradient(com.weighscore.neuro.WeightHolder wh)
Gets the fitness function gradient member for the specified neuron
Parameters:
wh - Neuron or synapse
Returns:
gradient member

getGradient

public double[][] getGradient()
Returns the gradient values that are computed while error back propagation process
Returns:
The gradient members as an array of arrays of doubles. The array size equals to the quantity of neurons in the network. Every array entry is an array, which size equals to the quantity of the neuron's input sysnapses plus one; the first array entry corresponds to the neuron's theshold

go

public double[] go(double[] question)
Propagate the question by the neural network
Parameters:
question - the question (input values)
Returns:
the answer (the output values)

goBack

public double[][] goBack(double[] error)
Propagate the error back computing the gradient
Parameters:
error - error (the difference between the given answer and the correct answer)
Returns:
the gradient