AForge.Neuro.BipolarSigmoidFunction.Derivative2 C# (CSharp) Method

Derivative2() public method

Calculates function derivative.

The method calculates the same derivative value as the Derivative method, but it takes not the input x value itself, but the function value, which was calculated previously with the help of Function method.

Some applications require as function value, as derivative value, so they can save the amount of calculations using this method to calculate derivative.

public Derivative2 ( double y ) : double
y double Function output value - the value, which was obtained /// with the help of method.
return double
        public double Derivative2( double y )
        {
            return ( alpha * ( 1 - y * y ) / 2 );
        }