Accord.Tests.Statistics.RayleighDistributionTest.GenerateTest2 C# (CSharp) 메소드

GenerateTest2() 개인적인 메소드

private GenerateTest2 ( ) : void
리턴 void
        public void GenerateTest2()
        {
            Accord.Math.Tools.SetupGenerator(0);

            RayleighDistribution target = new RayleighDistribution(4.2);

            double[] samples = new double[1000000];
            for (int i = 0; i < samples.Length; i++)
                samples[i] = target.Generate();

            var actual = RayleighDistribution.Estimate(samples);

            Assert.AreEqual(4.2, actual.Scale, 1e-3);
        }