Decision trees and ensemble methods
Trees split data by feature thresholds; ensembles (random forests, gradient boosting) combine many trees for accuracy.
Edited by Alex C, EduAlx · Sources cited below
Explanation
Trees pick splits that reduce impurity (Gini or entropy). Breiman's random forests (2001) average trees on bootstrap samples with random feature subsets. Gradient boosting (Friedman, 2001; XGBoost, 2016) adds trees that fix previous errors and often wins on tabular data.
Example
Code
from sklearn.ensemble import RandomForestClassifier clf = RandomForestClassifier(n_estimators=300).fit(X_train, y_train) print(clf.score(X_test, y_test))
How it works, step by step
- Choose the best split at each node
- Grow until a stopping rule
- Build many trees on resampled data
- Average or vote predictions
Open the interactive page with diagrams →
People behind it
- Leo Breiman
- Jerome Friedman
- Tianqi Chen
References
- L. Breiman, Mach. Learn. 2001, 45, 5–32.
- J. H. Friedman, Ann. Stat. 2001, 29, 1189–1232.
Textbooks
- The Elements of Statistical Learning, Trevor Hastie, Robert Tibshirani, Jerome Friedman (Springer, 2nd ed. 2009; free PDF). Statistical learning reference.
- Pattern Recognition and Machine Learning, Christopher M. Bishop (Springer, 2006). Bayesian machine learning classic.
Related topics
Clustering and unsupervised learningReinforcement learningPython programming essentialsNatural language processingTesting and debuggingComputer vision and convolutional neural networksHuman–computer interaction and usabilitySearch engines and PageRankError-detecting and error-correcting codesWeb development: front end and back end