This repository was archived by the owner on Nov 19, 2020. It is now read-only.

Description
There's possibly an issue is with the ErrorBasedPruning class - the getMaxChild method returns the max grandchild.
The algorithm referenced in the comments indeed considers replacing the node with its 'max child'.
This is the implementation of getMaxChild:
private DecisionNode getMaxChild(DecisionNode tree)
{
DecisionNode max = null;
int maxCount = 0;
foreach (var child in tree.Branches)
{
if (child.Branches != null)
{
foreach (var node in child.Branches)
{
var list = subsets[node];
if (list.Count > maxCount)
{
max = node;
maxCount = list.Count;
}
}
}
}
return max;
}
If I'm not mistaken, this implementation doesn't achieve the required result; Instead of returning the max child, it returns the max grandchild.
(Also, if I understood the implementation, getMaxChild is never executed on leaves, so the current node always has branches).