Accord.MachineLearning.DecisionTrees.Pruning.ErrorBasedPruning.getMaxChild C# (CSharp) Method

getMaxChild() private method

private getMaxChild ( DecisionNode tree ) : DecisionNode
tree DecisionNode
return DecisionNode
        private DecisionNode getMaxChild(DecisionNode tree)
        {
            DecisionNode max = null;
            int maxCount = 0;

            foreach (var child in tree.Branches)
            {
                var list = subsets[child];
                if (list.Count > maxCount)
                {
                    max = child;
                    maxCount = list.Count;
                }
            }

            return max;
        }