Accord.MachineLearning.DecisionTrees.Pruning.ErrorBasedPruning.computeErrorWithoutSubtree C# (CSharp) Метод

computeErrorWithoutSubtree() приватный Метод

private computeErrorWithoutSubtree ( DecisionNode tree, int mostCommon ) : double
tree DecisionNode
mostCommon int
Результат double
        private double computeErrorWithoutSubtree(DecisionNode tree, int mostCommon)
        {
            var branches = tree.Branches;
            var output = tree.Output;

            tree.Branches = null;
            tree.Output = mostCommon;

            double error = computeError();

            tree.Branches = branches;
            tree.Output = output;

            return error;
        }