10701 Machine Learning Boosting Fighting the bias-variance - - PowerPoint PPT Presentation

10701
SMART_READER_LITE
LIVE PREVIEW

10701 Machine Learning Boosting Fighting the bias-variance - - PowerPoint PPT Presentation

10701 Machine Learning Boosting Fighting the bias-variance tradeoff Simple (a.k.a. weak) learners are good e.g., nave Bayes, logistic regression, decision stumps (or shallow decision trees) Low variance, dont usually overfit


slide-1
SLIDE 1

Boosting 10701 Machine Learning

slide-2
SLIDE 2

Fighting the bias-variance tradeoff

  • Simple (a.k.a. weak) learners are good

– e.g., naïve Bayes, logistic regression, decision stumps (or shallow decision trees) – Low variance, don’t usually overfit

  • Simple (a.k.a. weak) learners are bad

– High bias, can’t solve hard learning problems

  • Can we make all weak learners always good???

– No!!! – But often yes…

2

slide-3
SLIDE 3

Simplest approach: A “bucket of models”

  • Input:

– your top T favorite learners (or tunings)

  • L1,….,LT

– A dataset D

  • Learning algorithm:

– Use 10-CV to estimate the error of L1,….,LT – Pick the best (lowest 10-CV error) learner L* – Train L* on D and return its hypothesis h*

slide-4
SLIDE 4

Pros and cons of a “bucket of models”

  • Pros:

– Simple – Will give results not much worse than the best of the “base learners”

  • Cons:

– What if there’s not a single best learner?

  • Other approaches:

– Vote the hypotheses (how would you weight them?) – Combine them some other way? – How about learning to combine the hypotheses?

slide-5
SLIDE 5

Stacked learners: first attempt

  • Input:

– your top T favorite learners (or tunings)

  • L1,….,LT

– A dataset D containing (x,y), ….

  • Learning algorithm:

– Train L1,….,LT on D to get h1,….,hT – Create a new dataset D’ containing (x’,y’),….

  • x’ is a vector of the T predictions h1(x),….,hT(x)
  • y is the label y for x

– Train new classifier on D’ to get h’ --- which combines the predictions!

  • To predict on a new x:

– Construct x’ as before and predict h’(x’)

slide-6
SLIDE 6

Pros and cons of stacking

  • Pros:

– Fairly simple – Slow, but easy to parallelize

  • Cons:

– What if there’s not a single best combination scheme? – E.g.: for movie recommendation sometimes L1 is best for users with many ratings and L2 is best for users with few ratings.

slide-7
SLIDE 7

Voting (Ensemble Methods)

  • Instead of learning a single (weak) classifier, learn many

weak classifiers that are good at different parts of the input space

  • Output class: (Weighted) vote of each classifier

– Classifiers that are most “sure” will vote with more conviction – Classifiers will be most “sure” about a particular part

  • f the space

– On average, do better than single classifier!

  • But how do you ???

– force classifiers to learn about different parts of the input space? – weigh the votes of different classifiers?

7

slide-8
SLIDE 8

Comments

  • Ensembles based on blending/stacking were key

approaches used in the netflix competition

– Winning entries blended many types of classifiers

  • Ensembles based on stacking are the main

architecture used in Watson

– Not all of the base classifiers/rankers are learned, however; some are hand-programmed.

slide-9
SLIDE 9

Boosting [Schapire, 1989]

  • Idea: given a weak learner, run it multiple times on (reweighted)

training data, then let the learned classifiers vote

  • On each iteration t:

– weight each training example by how incorrectly it was classified – Learn a hypothesis – ht – A strength for this hypothesis – t

  • Final classifier:
  • A linear combination of the votes of the different classifiers

weighted by their strength

  • Practically useful
  • Theoretically interesting

9

slide-10
SLIDE 10

Learning from weighted data

  • Sometimes not all data points are equal

– Some data points are more equal than others

  • Consider a weighted dataset

– D(i) – weight of i th training example (xi,yi) – Interpretations:

  • i th training example counts as D(i) examples
  • If I were to “resample” data, I would get more samples of “heavier”

data points

  • Now, in all calculations, whenever used, i th training example counts as

D(i) “examples” – e.g., MLE for Naïve Bayes, redefine Count(Y=y) to be weighted count

10

slide-11
SLIDE 11

11

weak weak

slide-12
SLIDE 12

Boosting: A toy example

slide-13
SLIDE 13

Boosting: A toy example

slide-14
SLIDE 14

Boosting: A toy example

slide-15
SLIDE 15

Boosting: A toy example

Thanks, Rob Schapire

slide-16
SLIDE 16

Boosting: A toy example

Thanks, Rob Schapire

slide-17
SLIDE 17

What t to choose for hypothesis ht?

Training error of final classifier is bounded by: Where

17

[Schapire, 1989]

slide-18
SLIDE 18

What t to choose for hypothesis ht?

Training error of final classifier is bounded by: Where [Schapire, 1989]

slide-19
SLIDE 19

What t to choose for hypothesis ht?

Training error of final classifier is bounded by: Where If we minimize t Zt, we minimize our training error We can tighten this bound greedily, by choosing t and ht on each iteration to minimize Zt.

19

[Schapire, 1989]

slide-20
SLIDE 20

What t to choose for hypothesis ht?

We can minimize this bound by choosing t on each iteration to minimize Zt. Define We can show that:

20

[Schapire, 1989]

t t

t t t

Z

 

  exp exp ) 1 (   

slide-21
SLIDE 21

What t to choose for hypothesis ht?

We can minimize this bound by choosing t on each iteration to minimize Zt. For boolean target function, this is accomplished by [Freund & Schapire ’97]: Where:

21

[Schapire, 1989]

t t

t t t

Z

 

  exp exp ) 1 (   

slide-22
SLIDE 22

22

slide-23
SLIDE 23

Strong, weak classifiers

  • If each classifier is (at least slightly) better than random

– t < 0.5

  • With a few extra steps it can be shown that AdaBoost will achieve zero training error

(exponentially fast):

23

slide-24
SLIDE 24

Boosting results – Digit recognition

  • Boosting often

– Robust to overfitting – Test set error decreases even after training error is zero

24

[Schapire, 1989]

slide-25
SLIDE 25

Boosting: Experimental Results

Comparison of C4.5, Boosting C4.5, Boosting decision stumps (depth 1 trees), 27 benchmark datasets

25

[Freund & Schapire, 1996] error error error

slide-26
SLIDE 26

26

slide-27
SLIDE 27

Random forest

  • A collection of decision trees
  • For each tree we select a subset of the

attributes (recommended square root of |A|) and build tree using just these attributes

  • An input sample is classified using majority

voting

GeneExpress GeneExpress TAP Y2H GOProcess

N

HMS_PCI

N

GeneOccur Y GOLocalization

Y

ProteinExpress GeneExpress GeneExpress Domain Y2H HMS-PCI

SynExpress

ProteinExpress Direct PPI data

slide-28
SLIDE 28

What you need to know about Boosting

  • Combine weak classifiers to obtain very strong classifier

– Weak classifier – slightly better than random on training data – Resulting very strong classifier – can eventually provide zero training error

  • AdaBoost algorithm
  • Most popular application of Boosting:

– Boosted decision stumps! – Very simple to implement, very effective classifier

28

slide-29
SLIDE 29

Boosting and Logistic Regression

Logistic regression assumes: And tries to maximize data likelihood: Equivalent to minimizing log loss

29

slide-30
SLIDE 30

Boosting and Logistic Regression

Logistic regression equivalent to minimizing log loss

30

Boosting minimizes similar loss function!!

Both smooth approximations of 0/1 loss!

slide-31
SLIDE 31

Logistic regression and Boosting

Logistic regression:

  • Minimize loss fn
  • Define

where xj predefined Boosting:

  • Minimize loss fn
  • Define

where ht(xi) defined dynamically to fit data

(not a linear classifier)

  • Weights j learned

incrementally

31