Package com.imsl.datamining.neural
Class Perceptron
java.lang.Object
com.imsl.datamining.neural.Node
com.imsl.datamining.neural.Perceptron
- All Implemented Interfaces:
Serializable
- Direct Known Subclasses:
OutputPerceptron
A
Perceptron node in a neural network.
Perceptrons are created by factory methods in a Network Layer.
Each Perceptron has an activation function (g)
and a bias (\(\mu\)).
The value of a Perceptron is given by
\(g(\sum_i w_i X_i + \mu)\),
where \(X_i\) are the values of nodes
input to this Perceptron with weights \(w_i\).
Network training will use existing bias values for the starting values for the trainer. Upon completion of network training, the bias values are set to the values computed by the trainer.
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionReturns the activation function.doublegetBias()Returns the bias for thisPerceptron.voidsetActivation(Activation activation) Sets the activation function.voidsetBias(double bias) Sets the bias for thisPerceptron.
-
Method Details
-
getActivation
Returns the activation function.- Returns:
- An
Activationobject indicating the activation function.
-
setActivation
Sets the activation function.- Parameters:
activation- AnActivationobject which represents the activation g to be used by thisPerceptron.
-
getBias
public double getBias()Returns the bias for thisPerceptron.- Returns:
- A
doublerepresenting the bias for thisPerceptron.
-
setBias
public void setBias(double bias) Sets the bias for thisPerceptron.- Parameters:
bias- Adoublescalar value to which the bias is to be set. Thebiashas a default value of 0.
-