decision-tree-id3
decision-tree-id3 copied to clipboard
Some advice for pruning
HI, I think the 134th line in the function __prune (in tree.py), the condition for pruning should be changed from 'node_error_rate < children_error_rate' to 'node_error_rate<=children_error_rate'. Because node_error_rate==children_error_rate means that increase the complexity of the model won't increase the accuracy of classification. Thus, to prevent from overfittting, the condition should be changed to 'node_error_rate<=children_error_rate'.