Accord.Statistics.Distributions.Univariate.PowerNormalDistribution.ToString C# (CSharp) Method

ToString() public method

Returns a System.String that represents this instance.
public ToString ( string format, IFormatProvider formatProvider ) : string
format string
formatProvider IFormatProvider
return string
        public override string ToString(string format, IFormatProvider formatProvider)
        {
            return String.Format(formatProvider, "PND(x; p = {0})",
                power.ToString(format, formatProvider));
        }

Usage Example

コード例 #1
0
        public void ConstructorTest1()
        {
            var pnormal = new PowerNormalDistribution(power: 4.2);


            double cdf = pnormal.DistributionFunction(x: 1.4); // 0.99997428721920678
            double pdf = pnormal.ProbabilityDensityFunction(x: 1.4); // 0.00020022645890003279
            double lpdf = pnormal.LogProbabilityDensityFunction(x: 1.4); // -0.20543269836728234

            double ccdf = pnormal.ComplementaryDistributionFunction(x: 1.4); // 0.000025712780793218926
            double icdf = pnormal.InverseDistributionFunction(p: cdf); // 1.3999999999998953

            double hf = pnormal.HazardFunction(x: 1.4); // 7.7870402470368854
            double chf = pnormal.CumulativeHazardFunction(x: 1.4); // 10.568522382550167

            string str = pnormal.ToString(CultureInfo.InvariantCulture); // PND(x; p = 4.2)

            Assert.AreEqual(10.568522382550167, chf);
            Assert.AreEqual(0.99997428721920678, cdf);
            Assert.AreEqual(0.00020022645890003279, pdf);
            Assert.AreEqual(-0.20543269836728234, lpdf);
            Assert.AreEqual(7.7870402470368854, hf);
            Assert.AreEqual(0.000025712780793218926, ccdf);
            Assert.AreEqual(1.3999999999998953, icdf);
            Assert.AreEqual("PND(x; p = 4.2)", str);
        }
All Usage Examples Of Accord.Statistics.Distributions.Univariate.PowerNormalDistribution::ToString