Decision trees
Step 13 of 21 in Machine Learning · Build · Medium
Recursively split on the feature and threshold that best separates the labels. Easy to read, but a single deep tree overfits.
Build it
CART from scratch
Gini impurity, max_depth and min_samples_split; train on Iris and print the tree.
Done when: Within 3% of sklearn at the same depth.
Resources
- Wikipedia: Decision tree learning Article
- scikit-learn: decision trees Article
- XGBoost docs Article
- StatQuest Video
Earn this star
On the map, you log what you built. Finish the step and its star lights.
Open this step on the map