コード例 #1
0
        public void GenerateTest()
        {
            InverseGaussianDistribution target = new InverseGaussianDistribution(1, 1);

            double[] samples = target.Generate(1000000);

            InverseGaussianDistribution actual = new InverseGaussianDistribution(5, 5);

            actual.Fit(samples);

            Assert.AreEqual(1, actual.Mean, 0.01);
            Assert.AreEqual(1, actual.Shape, 0.01);
        }