57 Combining Predictors (Ensembling Methods)

57.1 Key Ideas

  • You can combine classifiers by averaging/voting
  • Combining classifiers improves accuracy
  • Combining classifiers reduces interpretability
  • Boosting, bagging and random forests are variants of this theme

57.1.1 Basic Intuition - Majority Vote

Suppose we have 5 completely independent classifiers:

  • If accuracy is 70% for each, \(10*(0.7)^3(0.3)^2+ 5(0.7)^4(0.3)^2+(0.7)^5\)
  • 83.7% majority vote accuracy

With 101 independent classifiers: * 99.9% majority vote accuracy

57.2 Approaches for Combining Classifiers

  1. Bagging, boosting and random forests
  • Usually combine similar classifiers
  1. Combining different classifiers
  • Model stacking
  • Model ensembling

57.3 Example with Wage Data

## [1] 1474   10
## [1] 628  10
## [1] 898  10

## [1] 869.6077
## [1] 907.5452
## [1] 856.3578
## [1] 1005.59
## [1] 1060.75
## [1] 1006.358

57.4 Notes

Blending models together can be really effective, even with simple models.

  • Typical model for binary/ multiclass data
    • Build an odd number of models
    • Predict with each model
    • Predict with calss by majority vote
  • This can get dramatically more complicated
  • Simple blending in caret: caretEnsemble (use at your own risk)