Accord.Tests.MachineLearning.DecisionTreeCompilerTest.CreateTest C# (CSharp) Méthode

CreateTest() private méthode

private CreateTest ( ) : void
Résultat void
        public void CreateTest()
        {
            DecisionTree tree;
            int[][] inputs;
            int[] outputs;

            ID3LearningTest.CreateMitchellExample(out tree, out inputs, out outputs);

            // Convert to an expression tree
            var expression = tree.ToExpression();

            // Compiles the expression
            var func = expression.Compile();


            for (int i = 0; i < inputs.Length; i++)
            {
                int y = func(inputs[i].ToDouble());
                Assert.AreEqual(outputs[i], y);
            }
        }
#endif
DecisionTreeCompilerTest