Accord.Neuro.Neurons.StochasticNeuron.Compute C# (CSharp) Method

Compute() public method

Computes output value of neuron.
public Compute ( double input ) : double
input double An input vector.
return double
        public override double Compute(double[] input)
        {
            double sum = threshold;
            for (int i = 0; i < weights.Length; i++)
                sum += weights[i] * input[i];

            double output = function.Function(sum);

            this.output = output;

            return output;
        }