Accord.Tests.Statistics.MultivariateContinuousDistributionTest.FitTest C# (CSharp) Method

FitTest() private method

private FitTest ( ) : void
return void
        public void FitTest()
        {
            IDistribution target = CreateMultivariateContinuousDistribution();

            double[][] observations = 
            {
                new double[] { 1, 1 },
                new double[] { 1, 1 },
            };

            double[] weights = { 0.50, 0.50 };

            bool thrown;

            IFittingOptions options = new NormalOptions()
            {
                Regularization = 0.1
            };

            thrown = false;
            try
            {
                target.Fit(observations, weights);
            }
            catch
            {
                thrown = true;
            }

            Assert.AreEqual(true, thrown);


            thrown = false;
            try
            {
                target.Fit(observations, weights, options);
            }
            catch
            {
                thrown = true;
            }

            Assert.AreEqual(false, thrown);
        }