public class DefaultNeuron extends Object implements NeuronModel
ActivationFunctionModel| Constructor and Description |
|---|
DefaultNeuron(double[] weightArray,
ActivationFunctionModel activationFunction)
Creates a new instance of DefaultNeuronWithBias with specified weights
defined in array
|
DefaultNeuron(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 |
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 |
setWeight(double[] weight)
Set weights from array as parameter
|
public DefaultNeuron(int weightNumber,
double[] maxWeight,
ActivationFunctionModel activationFunction)
weightNumber - numbers of weightsmaxWeight - maximal value of neuron weightactivationFunction - reference to activation functionpublic DefaultNeuron(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 ActivationFunctionModel getActivationFunction()
public void setActivationFunction(ActivationFunctionModel activationFunction)
activationFunction - reference to activation functionSCaVis 2.2 ©