Machine Learning
Question
What is pruning in Decision Tree ?
in progress
1
Interview Question
3 years
0 Answers
359 views
Great Grand Master 0
Answers ( No )
Pruning :
It is basically of two types :
Pre-pruning (top-down) : Let’s suppose we are using Entropy and Information gain for splitting the node. In pre-pruning we set threshold value for Information gain and during if we find Information gain whose value is greater that this set threshold value then we stop growing tree at that moment.
Post-pruning (bottom-up) : In this case we divide given dataset into train and validation. After tree grow fully then remove one branch (associated with leaf node) and check, performance (like accuracy etc) on validation data and if it is equal or greater than training accuracy then we prune this branch (associated with leaf node) otherwise not. This we have to do with all branches (associated with leaf node).
Pruning is done to overcome from Overfitting of model.