Tree-based Methods

From Bitnami MediaWiki
Revision as of 01:27, 4 March 2021 by User (talk | contribs) (→‎Ensemble Learning)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Decision Trees

Ensemble Learning

Voting Classifier
combine e.g. logistic, SVM, Random Forest and KNN classifiers and aggregate the predictions
  • Hard voting: majority vote of all classifiers (0 or 1) wins
  • Soft voting: if there's a predict_proba() method, this will average the probabilities, hence giving e.g. a 99% probability vote more weight than a 51% vote, despite both classifiers making the same classification decision for a given instance
Bagging
as opposed to aggregating models, bagging (bootstrap aggregating) samples random subsets of the training set with replacement. (Without replacement it's called pasting.) Bagging and pasting allow sampling multiple times across multiple predictors; bagging additionally allows sampling multiple times for the same predictor (since it gets replaced after use). Aggregation by mode for classification, mean for regression
Random Forests
ensemble of Decision Trees, usually trained via bagging. Additional randomness added because it searches not for single best feature, but best feature among a subset of features. Trade-off is higher bias for lower variance. Random forests are roughly equivalent to bagging decision trees. Differs from straight bagging of Decision Trees in that it uses only a random subset at each split
Boosting
ensemble methods that create a strong learner from a basket of weak learners. Usually trained sequentially
  • AdaBoost: weights misclassification errors more heavily. First it trains a classifier, then it increases the weight of its misclassified instances. Three hyperparameters: number of trees, learning rate, depth of trees. Boosting reduces the bias rather than the variance, and can thus be overfit
  • Gradient Boosting: similar to AdaBoost, except instead of updating the instance weights iteratively gradient boosting fits a new predictor to the residual error made by prior predictor. Used in conjunction with Decision Trees for Gradient Boosted Regression Trees (GBRT).