Docsity

Ensemble Learning - Introduction to Artificial Intelligence - Lecture Slides, Slides of Artificial Intelligence

Partial preview of the text

Download Ensemble Learning - Introduction to Artificial Intelligence - Lecture Slides and more Slides Artificial Intelligence in PDF only on Docsity!

CSE 151 Machine Learning

Ensemble Learning

How to combine multiple classifiers into a single one This class: two types of ensemble methods: Bagging Boosting Works well if the classifiers are complementary

Example

Input: n labelled training examples (xi, yi), i = 1,..,n Algorithm: Repeat k times: Select m samples out of n with replacement to get training set Si Popular choice: m = n Still different from working with entire training set. Why? How to pick m? Train classifier (decision tree, k-NN, perceptron, etc) hi on Si

Bagging

Input: n labelled training examples S = {(xi, yi)}, i = 1,..,n Suppose we select n samples out of n with replacement to get training set Si Still different from working with entire training set. Why? Pr(Si = S) = n! n n (tiny number, exponentially small in n) Pr((xi, yi) not in Si) = ￿ 1 − 1 n ￿ n ￿ e − 1 For large data sets, about 37% of the data set is left out!

Bias and Variance

Classification error = Bias + Variance Bias is the true error of the best classifier in the concept class (e.g, best linear separator, best decision tree on a fixed number of nodes). Bias is high if the concept class cannot model the true data distribution well, and does not depend on training set size.

Bias

High Bias Low Bias Underfitting: when you have high bias

Variance

Overfitting: when you have extra high variance

Bias and Variance

Classification error = Bias + Variance If you have high bias, both training and test error will be high If you have high variance, training error will be low, and test error will be high

Why is Bagging useful?

Bagging reduces the variance of the classifier, doesn’t help much with bias

Ensemble Learning

How to combine multiple classifiers into a single one This class: two types of ensemble methods: Bagging Boosting Works well if the classifiers are complementary

Boosting

Goal: Detect if an image contains a face in it Sometimes it is:

  • Easy to come up with simple rules-of-thumb classifiers,
  • Hard to come up with a single high accuracy rule Is the black region darker on average than the white?

Boosting

Weak Learner: A simple rule-of-the-thumb classifier that doesn’t necessarily work very well Strong Learner: A good classifier Boosting: How to combine many weak learners into a strong learner?

Boosting

  1. How to get a good rule-of-thumb? Depends on application e.g, single node decision trees
  2. How to choose examples on each round? Focus on the hardest examples so far -- namely, examples misclassified most often by previous rules of thumb
  3. How to combine the rules-of-thumb to a prediction rule? Take a weighted majority of the rules

Some Notation

Let D be a distribution over examples, and h be a classifier Error of h with respect to D is: errD (h) = P r(X,Y )∼D (h(X) ￿= Y ) Example: Below X is uniform over [0, 1], and Y = 1 if X > 0.5, 0 ow (^0) 0.25 0.5 1 errD(h) = 0.