Accord.Tests.Statistics.MultivariateNormalDistributionTest.FitTest4 C# (CSharp) Method

FitTest4() private method

private FitTest4 ( ) : void
return void
        public void FitTest4()
        {
            double[][] observations = 
            {
                new double[] { 1, 2 },
                new double[] { 1, 2 },
                new double[] { 1, 2 },
                new double[] { 1, 2 }
            };


            var target = new MultivariateNormalDistribution(2);

            bool thrown = false;
            try { target.Fit(observations); }
            catch (NonPositiveDefiniteMatrixException) { thrown = true; }

            Assert.IsTrue(thrown);

            NormalOptions options = new NormalOptions() { Robust = true };

            // No exception thrown
            target.Fit(observations, options);

            checkDegenerate(target);
        }