|
Neural Network Software | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object | +--com.practicalstudies.neural.LogisticFunction
Encapsulates the calculation of Node activation or output
based on the logistic function, and of the error in output for the
backpropagation training method using this function.
The logistic function is a good choice for fitting continuously valued data in the range of 0 to 1.
Activation and error functions are combined in this class given that the error calculation for backpropagation is derived from the activation calculation.
ActivationFunction,
ErrorFunction| Constructor Summary | |
LogisticFunction()
Constructor for a function with a threshold of 0 and a steepness of 1. |
|
LogisticFunction(double threshold)
Constructor for a function with specified threshold and steepness values. |
|
| Method Summary | |
double |
calculateActivation(double weightedInput)
Calculates neuron activation as the logistic function 1/(1 + e-(steepness*input-threshold)), which returns values in [0,1], with a value of 0.5 at the value specified by the threshold. |
double |
calculateError(double calculatedValue,
double actualValue)
Calculate the error in Neuron output relative to an actual value (useful
for neurons in an output layer). |
double |
calculateError(double calculatedValue,
java.util.List outputConnections)
Calculate the error in Neuron output based on errors observed in the outputs
of Neurons which rely on the output of this Neuron. |
double |
getSteepness()
|
double |
getThreshold()
|
void |
setSteepness(double steepness)
Specify the steepness parameter of the logistic function. |
void |
setThreshold(double threshold)
Specify a threshold value, which determines where the logistic function is centered. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public LogisticFunction()
setThreshold,
setSteepnesspublic LogisticFunction(double threshold)
setThreshold,
setSteepness| Method Detail |
public double getThreshold()
public void setThreshold(double threshold)
public double getSteepness()
public void setSteepness(double steepness)
Specify the steepness parameter of the logistic function.
A value of one (the default) is typical. Values smaller than one will make the function less steep, and values greater than one more steep. An infinite value would yield a step function.
public double calculateActivation(double weightedInput)
calculateActivation in interface ActivationFunction
public double calculateError(double calculatedValue,
double actualValue)
Neuron output relative to an actual value (useful
for neurons in an output layer).
calculateError in interface ErrorFunctioncalculatedValue - the calculated output of the NeuronactualValue - the expected output of the Neuron
public double calculateError(double calculatedValue,
java.util.List outputConnections)
Neuron output based on errors observed in the outputs
of Neurons which rely on the output of this Neuron.
calculateError in interface ErrorFunctioncalculatedValue - the calculated output of the NeuronoutputConnections - a List of WeightedConnections to
Neurons which receive the output of this Neuron
|
PracticalStudies.com | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||