Docsity

Bagging and Boosting: Ensemble Methods for Reducing Bias and Variance in Machine Learning, Study notes of Computer Science

Partial preview of the text

Download Bagging and Boosting: Ensemble Methods for Reducing Bias and Variance in Machine Learning and more Study notes Computer Science in PDF only on Docsity!

Lecture

Lecture

Oct-27-

BaggingBagging

-^

Generate T

random sample

from training set by

b

t t

i

b

ootstrapping

-^

Learn a sequence of classifiers h

,h 1

,…,h 2

T^

from

each of them using base learner

L

each of them, using base learner

L

-^

To classify an unknown sample X, let eachclassifier predictclassifier predict.

-^

Take simple

majority vote

to make the final

prediction.p

Simple scheme, works well in many situations!

Effect of Algorithm Parameters on Bias

and Variance

  • k-nearest neighbor: increasing k typically

increases bias and reduces variance

  • decision trees of depth D: increasing D

typically increases variance and reducesbias

Why does bagging work?Why

does bagging work?

  • Bagging takes the average of multiple

Bagging takes the average of multiplemodels --- reduces the variance

  • This suggests that bagging works the best• This suggests that bagging works the best

with low bias and high variance classifiers

Adaboost: IllustrationAdaboost:

Illustration

h ( )

H(X)

Update weights

hM

(x)

hm

(x)

H(X)

h (x)

Update weights Update weights

h^2

(x) h^3

(x)

Update weights Original data:uniformly weighted

h^1

(x)

uniformly weighted

The AdaBoost Algorithm

CS434 Fall 2007

AdaBoost(Example)AdaBoost(Example)

Original Training set : EqualWeights to all training samples

g^

g^

p Taken from “

A Tutorial on Boosting” by

Yoav Freund and Rob Schapire

AdaBoost(Example)AdaBoost(Example)

ROUND 1

AdaBoost(Example)AdaBoost(Example)

ROUND 3

AdaBoost(Example)AdaBoost(Example)

Boosting Decision StumpsBoosting

Decision Stumps

Decision stumps: very simple rules of thumb that test

diti

i^

l^

tt ib t

condition on a single attribute.Among the most commonly used base classifiers – truly weak!Boosting with decision stumps has been shown to achieve betterperformance compared to unbounded decision trees.

Boosting Performance

•^

Comparing C4.5, boosting decision stumps, boostingC4.5 using 27 UCI data set– C4.5 is a popular decision tree learner

Overfitting?Overfitting?

•^

Boosting drives training error to zero, will it overfit?C

i^

h

•^

Curious phenomenon

-^

Boosting is often robust to overfitting (not always)

g

g (

y )

•^

Test error continues to decrease even after training errorgoes to zero

Explanation with Margins

L ∑=

L l

l l^

x

h

w

x

f^

1

Margin = y

⋅^

f(x)

Histogram of functional margin for ensemble just after achieving zero training error