Accord.Tests.MachineLearning.SequentialMinimalOptimizationTest.SequentialMinimalOptimizationConstructorTest2 C# (CSharp) Method

SequentialMinimalOptimizationConstructorTest2() private method

private SequentialMinimalOptimizationConstructorTest2 ( ) : void
return void
        public void SequentialMinimalOptimizationConstructorTest2()
        {
            double[][] inputs =
            {
                new double[] { -1, -1 },
                null,
                new double[] {  1, -1 },
                new double[] {  1,  1 }
            };

            int[] or =
            {
                0,
                0,
                0,
                +1
            };

            // Create Kernel Support Vector Machine with a Polynomial Kernel of 2nd degree
            var machine = new SupportVectorMachine(inputs[0].Length);

            bool thrown = false;
            try { new SequentialMinimalOptimization(machine, inputs, or); }
            catch (ArgumentNullException) { thrown = true; }

            Assert.IsTrue(thrown);
        }