You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Nov 19, 2020. It is now read-only.
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).
The text was updated successfully, but these errors were encountered:
YaronK
changed the title
DecisionTrees\Pruning\ErrorBasedPruning: the getMaxChild method returns the max grandchild
DecisionTrees\Pruning\ErrorBasedPruning: The getMaxChild method returns the max grandchil
May 25, 2016
YaronK
changed the title
DecisionTrees\Pruning\ErrorBasedPruning: The getMaxChild method returns the max grandchil
DecisionTrees\Pruning\ErrorBasedPruning: The getMaxChild method returns the max grandchild
May 25, 2016
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:
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).
The text was updated successfully, but these errors were encountered: