Class Neuron
java.lang.Object
me.damoebe.architectures.mlp.structure.Neuron
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiondoubleGetter for current ActivationGetter for connectionsdoublegetDelta()Getter for deltavoidsetActivation(double activation) Sets the current activation (used for neurons in the input layer)voidsetDelta(double delta) Setter for deltavoidUpdates the current activation based on the connections and sigmoid activation functionvoidupdateBias(double learningRate) Updates the bias using learningRate and deltavoidupdateWeights(double loss, double noiseRate, double learningRate) Updates all connection weights based on delta value, loss, noise and learningRate
-
Constructor Details
-
Neuron
Main constructor of the Neuron class- Parameters:
connections- An array featuring all dependencies of the neuron as connections
-
-
Method Details
-
updateActivation
public void updateActivation()Updates the current activation based on the connections and sigmoid activation function -
getActivation
public double getActivation()Getter for current Activation- Returns:
- current activation
-
setActivation
public void setActivation(double activation) Sets the current activation (used for neurons in the input layer)- Parameters:
activation- The new activation of the neuron
-
updateWeights
public void updateWeights(double loss, double noiseRate, double learningRate) Updates all connection weights based on delta value, loss, noise and learningRate- Parameters:
loss- The network lossnoiseRate- The noiseRate for the randomizerlearningRate- The learning Rate which is used to update the weights
-
updateBias
public void updateBias(double learningRate) Updates the bias using learningRate and delta- Parameters:
learningRate- The learningRate of the network
-
getConnections
-
getDelta
public double getDelta()Getter for delta- Returns:
- the neurons delta
-
setDelta
public void setDelta(double delta) Setter for delta- Parameters:
delta- new delta
-