Accord.Statistics.Links.IdentityLinkFunction.Derivative C# (CSharp) Method

Derivative() public method

First derivative of the Inverse function.
The first derivative of the identity link function is given by f'(x) = B.
public Derivative ( double x ) : double
x double The input value.
return double
        public double Derivative(double x)
        {
            return B;
        }

Usage Example

        public void IdentityLinkFunctionConstructorTest()
        {
            IdentityLinkFunction target = new IdentityLinkFunction();
            Assert.AreEqual(0, target.A);
            Assert.AreEqual(1, target.B);

            for (int i = 0; i < 10; i++)
            {
                Assert.AreEqual(i, target.Function(i));
                Assert.AreEqual(i, target.Inverse(i));
                Assert.AreEqual(1, target.Derivative(i));
                Assert.AreEqual(1, target.Derivative(i));
            }
        }
All Usage Examples Of Accord.Statistics.Links.IdentityLinkFunction::Derivative