Accord.Statistics.Distributions.Univariate.GompertzDistribution.ToString C# (CSharp) Метод

ToString() публичный Метод

Returns a System.String that represents this instance.
public ToString ( string format, IFormatProvider formatProvider ) : string
format string
formatProvider IFormatProvider
Результат string
        public override string ToString(string format, IFormatProvider formatProvider)
        {
            return String.Format(formatProvider, "Gompertz(x; η = {0}, b = {1})",
                eta.ToString(format, formatProvider),
                b.ToString(format, formatProvider));
        }
    }

Usage Example

        public void ConstructorTest()
        {
            var gompertz = new GompertzDistribution(eta: 4.2, b: 1.1);

            double median = gompertz.Median; // 0.13886469671401389

            double cdf = gompertz.DistributionFunction(x: 0.27); // 0.76599768199799145
            double pdf = gompertz.ProbabilityDensityFunction(x: 0.27); // 1.4549484164912097
            double lpdf = gompertz.LogProbabilityDensityFunction(x: 0.27); // 0.37497044741163688

            double ccdf = gompertz.ComplementaryDistributionFunction(x: 0.27); // 0.23400231800200855
            double icdf = gompertz.InverseDistributionFunction(p: cdf); // 0.26999999999766749

            double hf = gompertz.HazardFunction(x: 0.27); // 6.2176666834502088
            double chf = gompertz.CumulativeHazardFunction(x: 0.27); // 1.4524242576820101

            string str = gompertz.ToString(System.Globalization.CultureInfo.InvariantCulture);
              // "Gompertz(x; η = 4.2, b = 1.1)"

            Assert.AreEqual(0.13886469671401389, median);
            Assert.AreEqual(1.4524242576820101, chf);
            Assert.AreEqual(0.76599768199799145, cdf);
            Assert.AreEqual(1.4549484164912097, pdf);
            Assert.AreEqual(0.37497044741163688, lpdf);
            Assert.AreEqual(6.2176666834502088, hf);
            Assert.AreEqual(0.23400231800200855, ccdf);
            Assert.AreEqual(0.26999999999766749, icdf);
            Assert.AreEqual("Gompertz(x; η = 4.2, b = 1.1)", str);
        }
All Usage Examples Of Accord.Statistics.Distributions.Univariate.GompertzDistribution::ToString