Documentation of 'jhpro.nnet.jknnl.DefaultNeuronWithBias' Java class
DefaultNeuronWithBias
jhpro.nnet.jknnl

Class DefaultNeuronWithBias

  • All Implemented Interfaces:
    NeuronModel


    public class DefaultNeuronWithBias
    extends java.lang.Object
    implements NeuronModel
    Class representing neuron with bias and specified activation function
    See Also:
    ActivationFunctionModel
    • Constructor Detail

      • DefaultNeuronWithBias

        public DefaultNeuronWithBias(int weightNumber,
                                     double[] maxWeight,
                                     ActivationFunctionModel activationFunction)
        Creates a new instance of DefaultNeuronWithBias with random weights value
        Parameters:
        weightNumber - numbers of weights
        maxWeight - maximal value of neuron weight
        activationFunction - reference to activation function
      • DefaultNeuronWithBias

        public DefaultNeuronWithBias(double[] weightArray,
                                     ActivationFunctionModel activationFunction)
        Creates a new instance of DefaultNeuronWithBias with specified weights defined in array
        Parameters:
        weightArray - array of weights value
        activationFunction - reference to activation function
    • Method Detail

      • getWeight

        public double[] getWeight()
        Returns array contains value of the weights
        Specified by:
        getWeight in interface NeuronModel
        Returns:
        array of the weights
      • setWeight

        public void setWeight(double[] weight)
        Set weights from array as parameter
        Specified by:
        setWeight in interface NeuronModel
        Parameters:
        weight - array of the weights
      • getValue

        public double getValue(double[] inputVector)
        Return value of the neuron after activation.
        Specified by:
        getValue in interface NeuronModel
        Parameters:
        inputVector - input vector for neuron
        Returns:
        return
      • getBias

        public double getBias()
        Return value of the bias
        Returns:
        value of the bias
      • setBias

        public void setBias(double bias)
        Set bias
        Parameters:
        bias - value of the bias
      • getActivationFunction

        public ActivationFunctionModel getActivationFunction()
        Return reference to activation function
        Returns:
        reference to activation function
      • setActivationFunction

        public void setActivationFunction(ActivationFunctionModel activationFunction)
        Set activation function
        Parameters:
        activationFunction - reference to activation function

DMelt 3.0 © DataMelt by jWork.ORG

You see the box below because you did not login.