Function() 공개 메소드

The Probit link function.
The Probit link function is given by f(x) = Phi^-1(x), in which Phi^-1 is the inverse Normal (Gaussian) cumulative distribution function.
public Function ( double x ) : double
x double An input value.
리턴 double
        public void ProbitLinkFunctionConstructorTest()
        {
            ProbitLinkFunction target = new ProbitLinkFunction();

            double[] expected = 
            {
                Double.NegativeInfinity, -1.28155, -0.841621, -0.524401, -0.253347,
                0, 0.253347, 0.524401, 0.841621, 1.28155, Double.PositiveInfinity
            };

            for (int i = 0; i < 11; i++)
            {
                double x = i / 10.0;
                double y = expected[i];

                double fx = target.Function(x);
                double iy = target.Inverse(y);

                Assert.AreEqual(y, fx, 1e-5);
                Assert.AreEqual(x, iy, 1e-5);

                Assert.IsFalse(Double.IsNaN(fx));
                Assert.IsFalse(Double.IsNaN(iy));
            }
        }