com.huguesjohnson.jail.neuralNetwork
Class Perceptron

java.lang.Object
  |
  +--com.huguesjohnson.jail.neuralNetwork.Neuron
        |
        +--com.huguesjohnson.jail.neuralNetwork.Perceptron
All Implemented Interfaces:
java.io.Serializable

public class Perceptron
extends Neuron
implements java.io.Serializable

Perceptron

See Also:
Serialized Form

Constructor Summary
Perceptron()
          default constructor
Perceptron(double[] input, double[] weights, double desiredOutput, double punishRate, double rewardRate, double errorThreshold)
          constructor
Perceptron(double punishRate, double rewardRate, double errorThreshold)
          constructor
Perceptron(double desiredOutput, double punishRate, double rewardRate, double errorThreshold)
          constructor
 
Method Summary
 double activation()
          activation function for neuron
 void adjustWeights()
          adjust weights for the neuron
 
Methods inherited from class com.huguesjohnson.jail.neuralNetwork.Neuron
getDesiredOutput, getDoneTraining, getErrorThreshold, getInput, getInput, getInputCount, getInputs, getOutput, getPunishRate, getRewardRate, getWeight, getWeightCount, getWeights, getZ, punishWeight, randomizeWeights, rewardWeight, run, run, run, setDesiredOutput, setDoneTraining, setErrorThreshold, setInput, setPunishRate, setRewardRate, setWeight, setWeights, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Perceptron

public Perceptron()
default constructor


Perceptron

public Perceptron(double desiredOutput,
                  double punishRate,
                  double rewardRate,
                  double errorThreshold)
constructor

Parameters:
desiredOutput - the desired output of the neuron
punishRate - the punish rate of the neuron
rewardRate - the reward rate of the neuron
errorThreshold - the error threshold of the neuron

Perceptron

public Perceptron(double[] input,
                  double[] weights,
                  double desiredOutput,
                  double punishRate,
                  double rewardRate,
                  double errorThreshold)
constructor

Parameters:
input - the input to the neuron
weights - the weights on the links to the neuron
desiredOutput - the desired output of the neuron
punishRate - the punish rate of the neuron
rewardRate - the reward rate of the neuron
errorThreshold - the error threshold of the neuron

Perceptron

public Perceptron(double punishRate,
                  double rewardRate,
                  double errorThreshold)
constructor

Parameters:
punishRate - the punish rate of the neuron
rewardRate - the reward rate of the neuron
errorThreshold - the error threshold of the neuron
Method Detail

activation

public double activation()
activation function for neuron

Specified by:
activation in class Neuron
Returns:
activation value

adjustWeights

public void adjustWeights()
adjust weights for the neuron

Specified by:
adjustWeights in class Neuron