Difference between revisions of "Tree-based Methods"
Jump to navigation
Jump to search
(Created page with ";Ensemble Learning * Voting Classifier: combine e.g. logistic, SVM, Random Forest and KNN classifiers and aggregate the predictions ** Hard voting: majority vote of all classi...") |
|||
| Line 1: | Line 1: | ||
| − | + | ===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 | ** Hard voting: majority vote of all classifiers (0 or 1) wins | ||
| − | ** Soft voting: if there's a | + | ** 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 | ||
| + | ;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. Tradeoff is higher bias for lower variance. Random forests are roughly equivalent to bagging decision trees | ||
| + | ;Boosting | ||
Revision as of 19:19, 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. Tradeoff is higher bias for lower variance. Random forests are roughly equivalent to bagging decision trees
- Boosting