Accord.Tests.Statistics.GeometricDistributionTest.FitTest2 C# (CSharp) 메소드

FitTest2() 개인적인 메소드

private FitTest2 ( ) : void
리턴 void
        public void FitTest2()
        {
            double successProbability = 0;
            GeometricDistribution target = new GeometricDistribution(successProbability);

            double[] observations = { 0, 0, 1, 0, 0, 1, 0, 1, 0, 0, 1, 0 };
            double[] weights = { 0, 1, 1, 2, 0, 2, 1, 0, 0, 0, 1, 0 };
            weights = weights.Divide(weights.Sum());
            IFittingOptions options = null;

            target.Fit(observations, weights, options);

            Assert.AreEqual(1 / (1 - 4.0 / 8.0), target.ProbabilityOfSuccess);
        }