Difference between revisions of "Tree-based Methods"
Jump to navigation
Jump to search
| Line 7: | Line 7: | ||
* Soft voting: if there's a <code>predict_proba()</code> method, this will average the probabilities, hence given e.g. a 99% vote more weight than a 51% vote, despite both classifiers making the same decision for a given instance | * Soft voting: if there's a <code>predict_proba()</code> method, this will average the probabilities, hence given e.g. a 99% vote more weight than a 51% vote, despite both classifiers making the same 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 | ;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. | + | ;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 | + | ;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 overfitt | ||
Revision as of 19:33, 3 March 2021
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 given e.g. a 99% vote more weight than a 51% vote, despite both classifiers making the same 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 overfitt