public class DefaultNeuronWithBias extends Object implements NeuronModel
ActivationFunctionModel| Constructor and Description |
|---|
DefaultNeuronWithBias(double[] weightArray,
ActivationFunctionModel activationFunction)
Creates a new instance of DefaultNeuronWithBias with specified weights
defined in array
|
DefaultNeuronWithBias(int weightNumber,
double[] maxWeight,
ActivationFunctionModel activationFunction)
Creates a new instance of DefaultNeuronWithBias with random weights value
|
| Modifier and Type | Method and Description |
|---|---|
ActivationFunctionModel |
getActivationFunction()
Return reference to activation function
|
double |
getBias()
Return value of the bias
|
double |
getValue(double[] inputVector)
Return value of the neuron after activation.
|
double[] |
getWeight()
Returns array contains value of the weights
|
void |
setActivationFunction(ActivationFunctionModel activationFunction)
Set activation function
|
void |
setBias(double bias)
Set bias
|
void |
setWeight(double[] weight)
Set weights from array as parameter
|
public DefaultNeuronWithBias(int weightNumber,
double[] maxWeight,
ActivationFunctionModel activationFunction)
weightNumber - numbers of weightsmaxWeight - maximal value of neuron weightactivationFunction - reference to activation functionpublic DefaultNeuronWithBias(double[] weightArray,
ActivationFunctionModel activationFunction)
weightArray - array of weights valueactivationFunction - reference to activation functionpublic double[] getWeight()
getWeight in interface NeuronModelpublic void setWeight(double[] weight)
setWeight in interface NeuronModelweight - array of the weightspublic double getValue(double[] inputVector)
getValue in interface NeuronModelinputVector - input vector for neuronpublic double getBias()
public void setBias(double bias)
bias - value of the biaspublic ActivationFunctionModel getActivationFunction()
public void setActivationFunction(ActivationFunctionModel activationFunction)
activationFunction - reference to activation functionSCaVis 2.2 ©