31
STAT 535 Lecture 4 October 23, 2013 Boosting and other Averaging Methods c Marina Meil˘ a [email protected] Reading (Murphy) 16.3, 16.3.1 Generalized Additive models (ignore the reg- ularization, for ”smoother” read ”minimize loss function”), 16.4.1-5 [and op- tionally 8] Bosting, 3.2.4 Bayesian model averaging, 16.6.3, 16.6.1 Ensembles of predictors 1 There is more than one way to average predic- tors Classification will be the running exaple here, but most results hold for other prediction problems as well. Denote B = {b} a base classifier family Averaging: f (x)= M k=1 β k b k (x) (1) f is real-valued even if the b k ’s are ±1 valued Why average predictors? to reduce bias to compensate for local optima (a form of bias) to reduce variance if b 1 ,b 2 ,...b M make independent errors, averaging reduces expected error (loss). We say that b 1 and b 2 make independent errors P (b 1 wrong | x)= P (b 1 wrong | x, b 2 wrong) 1

STAT 535 Lecture 4 October 23, 2013 Boosting and other ...€¦ · tionally 8] Bosting, 3.2.4 Bayesian model averaging, 16.6.3, 16.6.1 Ensembles of predictors 1 There is more than

  • Upload
    others

  • View
    0

  • Download
    0

Embed Size (px)

Citation preview

Page 1: STAT 535 Lecture 4 October 23, 2013 Boosting and other ...€¦ · tionally 8] Bosting, 3.2.4 Bayesian model averaging, 16.6.3, 16.6.1 Ensembles of predictors 1 There is more than

STAT 535 Lecture 4

October 23, 2013

Boosting and other Averaging Methodsc©Marina Meila

[email protected]

Reading (Murphy) 16.3, 16.3.1 Generalized Additive models (ignore the reg-ularization, for ”smoother” read ”minimize loss function”), 16.4.1-5 [and op-tionally 8] Bosting, 3.2.4 Bayesian model averaging, 16.6.3, 16.6.1 Ensemblesof predictors

1 There is more than one way to average predic-tors

Classification will be the running exaple here, but most results hold for otherprediction problems as well.

Denote B = {b} a base classifier family

Averaging:

f(x) =

M∑

k=1

βkbk(x) (1)

f is real-valued even if the bk’s are ±1 valued

Why average predictors?

• to reduce bias

• to compensate for local optima (a form of bias)

• to reduce variance

• if b1, b2, . . . bM make independent errors, averaging reduces expectederror (loss). We say that b1 and b2 make independent errors ⇔P (b1 wrong |x) = P (b1 wrong | x, b2 wrong)

1

Page 2: STAT 535 Lecture 4 October 23, 2013 Boosting and other ...€¦ · tionally 8] Bosting, 3.2.4 Bayesian model averaging, 16.6.3, 16.6.1 Ensembles of predictors 1 There is more than

• because the bk functions are given: real world domain experts (weatherprediction), a set of black-box classifiers (from a software package), aset of [expert designed] features (speech recognition, car/human recog-nition) each of them weakly informative of y

• because B is a set of (simple) “basis functions” and we need a morecomplex predictor in our task

Averaging is not always the same thing. Depending how we chooseB, b1, b2, . . . bM and β1, β2, . . . βM , we can obtain very different effects.

Also note that the averaging denoted by∑M

k=1 βkbk(x) can stand in different

context for averaging in different probability spaces. For instance, we willsee that in Bagging averaging is over samples of size N , while in Bayesianaveraging, the averaging is over the functions b ∈ B, and in Boosting thesummation is not an averaging after all.

We will examine

• Bayesian averaging (briefly)• Mixtures of experts (briefly)• Bagging (briefly)• Backfitting (briefly)• Stacking (see Murphy)• Boosting

1.1 Bayesian averaging

Assume any predictor b ∈ B could be the “true” predictor with some priorprobability P0(b). Learning means changing the probability distribution ofb after seeing the data.

Before seeing data P0(b) prior probability of bAfter seeing D P (b|D) posterior probability of b

Bayes formula P (b|D) = P0(b)P (D|b)∑b′∈B P0(b′)P (D|b′)

Classification of a new instance by Bayesian averaging:

f(x) =∑

b∈B

b(x)P (b|D)

2

Page 3: STAT 535 Lecture 4 October 23, 2013 Boosting and other ...€¦ · tionally 8] Bosting, 3.2.4 Bayesian model averaging, 16.6.3, 16.6.1 Ensembles of predictors 1 There is more than

orP (y|x,D) =

b∈B

P (b|D)1b(x)=y

Hence classifiers (or more generally predictors) are weighted by their poste-rior probability.

Intuition: The likelihood becomes more concentrated when N increases

Bayesian averaging in practice. Summation (or integration) over b ∈ Busually intractable. Practically, one samples a few b’s: b1, b2, . . . bM

P (bk|D) =P0(b

k)P (D|bk)∑M

k′=1 P0(bk′)P (D|bk′)≡ βk

Priors in practice. Priors should reflect our knowledge about b. If B andP0 represent exactly the function class that the true classifier belongs to andour prior knowledgde, then Bayesian averaging is optimal, in the sense thatit minimizes the cost of the average future misclassifications.

1.2 Reducing variance: Bagging

What if we had several (independently sampled) trainig sets D1,D2, . . .DM?

• we could train classifiers {b1, b2, . . . bM} on the respective D1,D2, . . .DM

• we could estimate EP (b)[b] ∼ f = 1MΣMk=1b

k

• f has always lower variance than bk

Idea of bagging: sample D1,D2, . . .DM from the given D and estimate bk

on Dk

f(x) = sign1

M

M∑

k=1

bk(x)

3

Page 4: STAT 535 Lecture 4 October 23, 2013 Boosting and other ...€¦ · tionally 8] Bosting, 3.2.4 Bayesian model averaging, 16.6.3, 16.6.1 Ensembles of predictors 1 There is more than

− −

−−

−−

+

++

+

+

sample N ′ ≤ N samples ×M timesD1 D2 D3

+

+

+

−−

+−

++

++

− −

−+

+

+

Resulting “bagged” classifier F = 13(b1 + b2 + b3)

+

Thus, bagging is a form of boostrap. It was shown theoretically and empiri-cally that bagging reduces variance.

Bagging is good for

• base classifiers with high variance (complex)

• unstable classifiers (decision trees, decision lists, neural networks)

• noisy data

4

Page 5: STAT 535 Lecture 4 October 23, 2013 Boosting and other ...€¦ · tionally 8] Bosting, 3.2.4 Bayesian model averaging, 16.6.3, 16.6.1 Ensembles of predictors 1 There is more than

Example 1 A variant of bagging for decision trees is called random forests.A large ensemble of decision trees is fitted to the same data set, introducingrandomness in various ways, like (1) resampling the data set, (2) takingrandom splits, with probabilities that favor “good” splits, etc. The outputpredictor is the (unweighted) average of all the trees.

This method works reasonably well for prediction, and can be extended tomore than classification (regression, feature selection, even clustering).

1.3 Stacking

Stacking is similar to Bagging, in that it is used on complex base classifiers.The method is very general.

Stacking proceeds in two stages.

1. Fit models b1, . . . bM to the data D. The models can be from differentmodel classes (i.e neural networks, CART, nearest neighbors, logisticregressions) or use different sets of features.For each model and each data point i, train bk−i from the model classof bk on D \ {(xi, yi)} (i.e by leaving out training example i).

2. Fit coefficients β1:M by minimizing the leave-one-out (loo) empiricalcost Lloo (or by cross-validation).

Lloo(β1:M =1

N

N∑

i=1

L(yi,

M∑

k=1

βkbk−i(x

i)) (2)

Note that if L is a non-linear function, the minimization in (2) is a non-linear minimization, and in particular for convex losses this is a convexoptimization problem in β1:M .

1.4 Mixtures of Experts

This is a method where βk = βk(x), and∑

k βk(x) = 1 for all x in the

domain of the inputs. The idea is that each bk is an “expert” in one regionof the input space. We want f the Mixture of experts to predict somethingclose to bk(x) in the region of expertise of expert bk and to ignore the otherexperts.

5

Page 6: STAT 535 Lecture 4 October 23, 2013 Boosting and other ...€¦ · tionally 8] Bosting, 3.2.4 Bayesian model averaging, 16.6.3, 16.6.1 Ensembles of predictors 1 There is more than

The vector function β(x) = [β1(x) . . . βM (x)] is sometimes called the gatingfunction.

Example 2 Suppose the true function to learn is f∗(x) = |x|, x ∈ R. Thiscan be well approximated by two linear experts f1(x) = x, f2(x) = −x withweights β1 = φ(x), β1 = φ(−x), where φ is the sigmoid function (henceβ1 + β2 = 1 everywhere.

The example highlights that, by using a mixture of experts we can constructa more complex classifier by from simple classifiers (linear). “Simple” canmean easy to fit, or low complexity (aka simple decision region), or both.The effective sample size for each bk is smaller than N , and corresponds tothe data for which βk(xi) is away from 0.

For more than two experts, a natural gating function is the softmax function.E.g.

βk(x) =ev

Tkx

∑Ml=1 e

vTlxwith vl ∈ R

n a vector of parameters (3)

Training By descent methods. Often the experts f1:M and gating functionsβ1:M are trained simultaneously (to maximize log-likelihood) by steepestdescent, or EM algorithm (which we’ll study later).

1.5 Forward Fitting and Backfitting

In this framework, usually we fit bk as well as βk. The weights βk aresometimes part of bk and fitted simultaneously. Otherwise, they are fittedafter bk is found, like in boosting.

Forward and Back-fitting are iterative methods, which maintain (explicitlyor implicitly) an f t that starts at f0 = 0 and is updated at each iteration.Alternatively, one can maintain the residual rt(xi) = yif t(xi).

ForwardFitting Algorithm

6

Page 7: STAT 535 Lecture 4 October 23, 2013 Boosting and other ...€¦ · tionally 8] Bosting, 3.2.4 Bayesian model averaging, 16.6.3, 16.6.1 Ensembles of predictors 1 There is more than

Input M , labeled training set DInitialize f0 = 0

for k = 1, 2, . . . Mcalculate rk(xi) = yi − f−k(xi), i = 1 : N

optimize L w.r.t k-th base predictor βk, bk =argminL(rk, βb)

until change in L small enough

Output f(x) =∑M

k=1 βkbk(x)

Note that M does not have to be set in advance (just like in boosting).

For backfitting, we set M at the beginning, and cycle through the M pre-dictors, updating predictor k while keeping the others fixed. Denote by

f−k(x) =∑

l 6=k

βkbk(x) (4)

the combined predictor f “minus” the k-th base predictor bk.

BackFitting Algorithm

Input M , labeled training set DInitialize b1:M = 0, [β1:M = 0 if there are coefficients β]repeat

for k = 1, 2, . . . Mcalculate rk(xi) = yi − f−k(xi), i = 1 : N

optimize L w.r.t k-th base predictor βk, bk =argminL(rk + βb)

until change in L small enough (or, change in b1:M small enough)

Output f(x) =∑M

k=1 βkbk(x)

Often these methods are used when bk are assumed to be simple, weak, andthe predictor f is built from the cooperation of several b’s. Thus, they aregenerally bias reduction method.

Example 3 Least squares regression. In this problem, it is useful to denote

rk(xi) = yi − f−k(xi) (5)

the residual of f−k at data point xi. Then, LLS(yi, f(xi)) = yi − f−k(xi)−

βkbk(xi). Hence, optimizing LLS w.r.t. βk, bk can be expressed as

βk, bk = argminβ,b

N∑

i=1

(ri − βb(xi))2 . (6)

In other words, each step of backfitting is a least squares regression problem,where the output variable values yi are replaced with the current residualsri.

7

Page 8: STAT 535 Lecture 4 October 23, 2013 Boosting and other ...€¦ · tionally 8] Bosting, 3.2.4 Bayesian model averaging, 16.6.3, 16.6.1 Ensembles of predictors 1 There is more than

See also Additive Models in section 2.1

1.6 Reducing bias: Boosting

Base classifier family B has large bias (e.g. linear classifier, decision stumps)but learning always produces b that is better (on the training set) thanrandom guessing.

Preconditions for boosting

1. B is a weak classifier family. For any D there can be found b ∈ B suchthat the training error of b on D is bounded below one half.

0 < L01(b) ≤ δ <1

2

2. Learning algorithm can take weighted data sets.

Idea of boosting: train a classifier b1 on D, then train a b2 to correct theerrors of b1, then b3 to correct the errors of b2, etc.

Example 4 Boosting with stumps, i.e. decision trees with a single split(c1 . . . c4 are the coefficients β1:4).

− −− −− −

++ ++

+

o

o

c1=1.5

+− −−

−− −

++

++

+o

o o

c2=1.3

− −+

+

−−

+

++

+

ooo

c3=1.4

− −+

+

+

+

−−

+

o

c4=1.6

−+

AdaBoost Algorithm (Schapire-Singer variant)

8

Page 9: STAT 535 Lecture 4 October 23, 2013 Boosting and other ...€¦ · tionally 8] Bosting, 3.2.4 Bayesian model averaging, 16.6.3, 16.6.1 Ensembles of predictors 1 There is more than

Assume B contains functions b taking values in [−1, 1] or {±1}Input M , labeled training set D

Initialize f = 0w1i = 1

Nweight of datapoint xi

for k = 1, 2, . . . M1. “learn classifier for D with weights wk” ⇒ bk

2. compute error εk =∑N

i=1 wki1−yib

k(xi)2

3. set βk = 12 ln

1−εk

εk

4. compute new weights wk+1i = 1

Zkwki e

−βkyibk(xi) where Zk is

the normalization constant that makes∑

iwk+1i = 1

Output f(x) =∑M

k=1 βkbk(x)

Remarks

1. If b(x) ∈ {±1} then yib(xi) ∈ {±1}; if an error occurs 1−yib(xi)2 = 1;

otherwise this expression is equal to 0. Thus, εk in step 2 adds upthe weights of the errors. If b(x) ∈ [−1, 1] then the errors contributedifferent amounts to the loss depending on their margin. In both cases,εk ∈ [0, δ], δ < 0.5.

2. The logarithm in step 3 is > 0 whenever εk < 1/2, which is guaranteedby the weak learner property of B.

3. If b ∈ {±1}, then step 4 can be written equivalently (up to a multi-plicative constant)

wk+1i =

{1Zkw

ki if bk(xi) = yi

1Zkw

ki e

2βkif bk(xi) 6= yi

(7)

This form corresponds to the so-called DiscreteAdaBoost algo-rithm, the first AdaBoost algorithm published, which assumed b(x) ∈{±1}. As we shall see later, modern boosting algorithms dispense withthe assumption b ∈ [−1, 1] too.

1.7 Boosting - properties on the training set

1. An interpretation of the weights

wk+1i =

1

N

k′≤k

e−βk′yibk′ (xi)

Zk′=

e−yifk(xi)

N∏

k′≤k Zk

(8)

Hence, the weight of example i at step k is proportional to e−yifk−1(xi)

the exponential of its negative margin. Examples that have been hard

9

Page 10: STAT 535 Lecture 4 October 23, 2013 Boosting and other ...€¦ · tionally 8] Bosting, 3.2.4 Bayesian model averaging, 16.6.3, 16.6.1 Ensembles of predictors 1 There is more than

to classify get exponentially high weights. Examples that are classifiedwith high margins get vanishingly small weights.

2. The normalization constant is an average “loss” If we sum both sidesof (8) over i we obtain

1 =

i e−yif

k(xi)

N∏

k′≤k Zk, (9)

or∏

k′≤k

Zk =

i e−yif

k(xi)

N≡ Lφ(f

k) (10)

whereφ(z) = e−z. (11)

andLφ(y, f(x)) = φ(yf(x)) (12)

Hence, the r.h.s of (10) is the average over the data set of the expo-nential loss Lφ.

The function φ decreases with the margin, thus decreasing Lφ willproduce a better classifier (on the training set). In this sense, Lφ is analternative loss function for classification.

3. Lφ decreases exponentially with M .For simplicity, we show this in the special case b(x) ∈ {±1} for allb ∈ B.

Zk =

n∑

i=1

wki e

−βk(yibk(xi)) (13)

= eβk∑

i=err

wki

︸ ︷︷ ︸

εk

+e−βk∑

i=corr

wki

︸ ︷︷ ︸

1−εk

(14)

= eβk

εk + (1− εk)e−βk

(15)

=

1− εkεk

εk +

εk

1− εk (1− εk) = 2

(1− εk)εk ≤ γ (16)

where γ < 1 depends on δ the maximum error. It follows that

Lφ(fk) =

k∏

k=1

Zk′ ≤ γk (17)

10

Page 11: STAT 535 Lecture 4 October 23, 2013 Boosting and other ...€¦ · tionally 8] Bosting, 3.2.4 Bayesian model averaging, 16.6.3, 16.6.1 Ensembles of predictors 1 There is more than

4. The training set error decreases exponentially with M .Note that φ(z) ≥ 1z<0 for all z (see also figure 1). Therefore

L(fk) =1

N

N∑

i=1

1[yifk(xi)<0] (18)

≤ 1

N

N∑

i=1

e−yifk(xi) = Lφ(f

k) ≤ γk (19)

In other words, the training error L(fk) is bounded by a decayingexponential. Moreover, since L(fk) ∈ {0, 1/N, 2/N, . . . 1}, it followsthat after a finite number of steps, when γk

0< 1/N , the training error

will become 0 and the training data will be perfectly classified!5. The test set error and overfitting Experimental results have shown

however that one should NOT take M to be equal to the above k0;the number of steps for good generalization error is often much largerthan k0 (and sometimes smaller). The above shows a typical plot ofL and L (which can be estimated from an independent sample) vs thenumber of boosting iterations.

0 200 400 600 800 1000Boosting iterations

Err

or

Myth: “Boosting doesn’t overfit”Reality: Any algorithm overfits, including boosting. But in practice, over-fitting occurs much later than predicted initially by the existing theory. Thenext section will show the more recent view of boosting, that explains whyoverfitting occurs only after apparently a very large number of parametershave been fit to the data.

11

Page 12: STAT 535 Lecture 4 October 23, 2013 Boosting and other ...€¦ · tionally 8] Bosting, 3.2.4 Bayesian model averaging, 16.6.3, 16.6.1 Ensembles of predictors 1 There is more than

2 Boosting as descent in function space

In brief, we will show that AdaBoost is gradient descent for the cost Lφ(f)with: bk the direction at step k, βk the step size.

2.1 Boosted predictors are additive models

An additive model (for prediction) has the form

f(x) ≡ E[Y |x] = α+ b1(x1) + b2(x2) + . . . + bn(xn) (20)

In other words, it is a linear model, where each coordinate has been non-linearly transformed. A generalization of the above definition, which is stillcalled an additive model, is

f(x) = α+ β1b1(x) + β2b2(x) + . . .+ βMbM (x) (21)

This is a linear model over a set of new features b1:M .

Example 5 Linear model and neural net If bj = xj , j = 1 : n, themodel (21) is a linear model.

If bj ∈ { 1

1+e−γT x, γ ∈ R

n} = B (the family of logistic functions with param-

eter γ ∈ Rn) then f(x) is a [two layer] neural network.

Additive Logistic Regression While the predictors above are well suitedfor regression, for classification one may employ a logistic regression, i.e

f(x) ≡ P (Y = 1|x)P (Y = −1|x) = α+ β1b1(x) + β2b2(x) + . . . + βMbM (x) (22)

[Generalized Additive Models. Link function. To write]

[Alg 9.2 HTF for Additive Logistic Regression]

Given the base family B, data, and a loss function L, an additive model forprediction can be fit to data in several different ways.

• Fix M from the start and optimize over all the parameters and basefunctions at once.

12

Page 13: STAT 535 Lecture 4 October 23, 2013 Boosting and other ...€¦ · tionally 8] Bosting, 3.2.4 Bayesian model averaging, 16.6.3, 16.6.1 Ensembles of predictors 1 There is more than

• Fix M from the start but optimize only one bj, βj at a time, keepingthe others fixed. This method of training is a form of what is calledbackfitting.

• Optimize bj , βj sequentially, for j = 1, 2, . . . without refitting previ-ously fit base models. In this case, M need not be fixed in advance.This method is called forward fitting. It turns out that this is whatboosting does.

We will show that boosting is a form of (stochastic) gradient descent onthe surrogate cost Lφ. Then, we discuss statistical properties of boosting,and show various results that indicate that boosting is good in the expectedsurrogate cost Lφ or in the expected true cost L01.

2.2 AdaBoost is steepest descent on training set

Assume that our goal is to minimize the surrogate cost Lφ on the training

set. For any finite D, f and b ∈ B affect Lφ only via the N -dimensionalvectors of their values on D (which we will abusively denote by f, b)

f =

f(x1)f(x2). . .

f(xN )

b =

b(x1)b(x2). . .

b(xN )

(23)

Thus, Lφ(f) is a function of N variables, with partial derivatives

∂Lφ

∂f(xi)=

∂f(xi)

[

1

N

N∑

i=1

φ(yif(xi))

]

=1

Nyiφ′(yif(xi)) = − 1

Nyie−yif(xi),

(24)since φ′(z) = −e−z. Imagine a boosting step as trying to find a change βbin f which minimizes the cost Lφ(f + βb). This minimization is equivalent

to maximizing the decrease in cost Lφ(f)− Lφ(f + βb).

The direction of descent The change in Lφ along “direction” b with stepsize β is approximately

Lφ(f)−Lφ(f+βb) ≈ −(

∇fLφ(f))T

(βb) =∑

i

[(1

Nyie−yif(xi)

)

(βb(xi))

]

N

i

yib(xi)wi

(25)

13

Page 14: STAT 535 Lecture 4 October 23, 2013 Boosting and other ...€¦ · tionally 8] Bosting, 3.2.4 Bayesian model averaging, 16.6.3, 16.6.1 Ensembles of predictors 1 There is more than

(denoting/recalling wi ∝ e−yif(xi)).

The best b is therefore the maximizer of

argmaxb∈B

i

wiyib(xi) (26)

where in the sum on the r.h.s we recognize the “centered error” r of Ad-

aBoost. More generally (we will use this later), the direction b maximizes∑

i

yib(xi)[−φ′(yif(xi))] (27)

Finding the direction b is equivalent with step 1 of theAdaBoost algorithm,training a weak classifier on the weighted data (note that here the weightsare not normalized by

∏Zk). The resulting b can be seen as the best

approximate of the gradient of Lφ in B.

The line minimization. Now let us do line minimization: find the optimalstep size β in direction b. For this we take the derivative of Lφ(f +βb) w.r.tβ and set it to 0.

dLφ(f + βb)

dβ=∑

i

yib(xi)φ′(yif(x

i)) = −∑

i

yib(xi)e−yif(xi)−βyib(xi)

(28)β is the (unique) root of

i

wiyib(xi)e−βyib(x

i) = 0 (29)

If • b(x) ∈ (−∞,∞) then β amounts to a rescaling of b and is redundant.• b(x) ∈ [−1, 1] then the line optimization gives us βk from AdaBoost

• b(x) ∈ {−1, 1} then the line optimization gives us βk from DiscreteAdaBoost

• The first case corresponds to theRealAdaBoost in the FHT variant,described here for completenessReal AdaBoost Algorithm (in the FHT variant)

Assume B contains real-valued functionsInput M , labeled training set D

Initialize f = 0w1i = 1

Nweight of datapoint xi

for k = 1, 2, . . . M“learn classifier for D with weights wk ⇒ bk”

compute new weights wk+1i = wk

i e−yibk(xi) and normalize them to sum to 1

Output f(x) =∑M

k=1 bk(x)

14

Page 15: STAT 535 Lecture 4 October 23, 2013 Boosting and other ...€¦ · tionally 8] Bosting, 3.2.4 Bayesian model averaging, 16.6.3, 16.6.1 Ensembles of predictors 1 There is more than

• To get the AdaBoost updates we assume that b(x) ∈ [−1, 1]. Thenyib(xi),

iwiyib(xi) ∈ [−1, 1]. We also make the approximation

e−βz ≤ 1 + z

2e−β +

1− z2

eβ (30)

which is true whenever z ∈ [−1, 1]. This follows from the convexity ofe−βt in the interval [-1,1] at point t = (1 + z)/2. By optimizing thisupper bound w.r.t β we get

z =∑

i

wiyif(xi) β =

1

2ln

1 + z

1− z (31)

• We can also assume b(x) ∈ {±1}, the assumption of Discrete Ad-

aBoost. In this case yib(xi) = ±1 and we obtain

dLφ(f + βb)

dβ=

i corr

wie−β −

i err

wieβ = 0 (32)

0 = (1−∑

i err

wi)− (∑

i err

wi)

︸ ︷︷ ︸

εk

e2β (33)

β =1

2ln

1− εkεk

(34)

This gives us the βk coefficient of the Discrete AdaBoost algorithm(for alternative formulations of Discrete AdaBoost, this βk is upto a factor of 2 which does not affect the algorithm).

To finish the analysis, let us look at the updated f and weights wi.

f ← f + βb (35)

wi ← wie−βyif(xi) (36)

Hence, the boosting algorithm given at the beginning of this section andmany other variants can be seen as minimizing the cost Lφ(f) by steepestdescent in the function space B.

15

Page 16: STAT 535 Lecture 4 October 23, 2013 Boosting and other ...€¦ · tionally 8] Bosting, 3.2.4 Bayesian model averaging, 16.6.3, 16.6.1 Ensembles of predictors 1 There is more than

3 A statistical view of boosting (and more algo-rithms)

It has been shown [Friedman et al., 1999] (FHT) that boosting can also beseen as noisy gradient descent in function space when we replace the finitetraining set with the true data distribution. The cost function and gradientcan be given a probabilistic interpretation. This point of view is useful intwo ways:

1. It shows that boosting is asymptotically minimizing a reasonable costfunction, so that we can expect the performace/and algorithm behav-ior on finite samples to be a good predictor on its behaviour with muchlarger samples.

2. It is an interpretation that allows on to create a very large varietyof boosting algorithms, like the Logit and Gentle AdaBoost pre-sented hereafter.

We will consider the first point above, by now imagining that we do boosting“at the distribution level”, i.e using PXY instead of the empirical distributiongiven by the sample.

Hence, in the previous sections, we assumed that “learning a classifier”means (practically, but see also Proposition 2 below) “find the best possibleminimizer in bk ∈ B to

∑Ni=1 w

ki e

−yib(xi)”. Here we will assume that it means(theoretically, see Proposition 2) “find the best possible approximation in Bto 1

2 logPw(y=1|x)Pw(y=−1|x)”.

The cost function for boosting is now Lφ(f) = E[e−yf(x)]. The notationE[] represents the expectation w.r.t the joint PXY distribution. This is usedin the proofs, while in practice it is replaced by the average over the dataset.

Proposition 1 Denote px = P (y = 1|x). The cost Lφ(f) is minimized by

f∗(x) =1

2ln

P (y = 1|x)P (y = −1|x) =

1

2ln

px1− px

And

px =ef(x)

ef(x) + e−f(x)P (y = −1|x) =

e−f(x)

ef(x) + e−f(x)= 1− px (37)

16

Page 17: STAT 535 Lecture 4 October 23, 2013 Boosting and other ...€¦ · tionally 8] Bosting, 3.2.4 Bayesian model averaging, 16.6.3, 16.6.1 Ensembles of predictors 1 There is more than

Proof Since we are minimizing over all possible f ’s with no restrictions, wecan minimize separately for every f(x). Hence, let x be fixed

EPY |X=x[e−yf(x)] = P (y = 1|x)e−f(x) + P (y = −1|x)ef(x)

and the gradient is

∂E[e−yf(x)|x]∂f(x)

= −P (y = 1|x)e−f(x) + P (y = −1|x)ef(x)

By setting this to 0 the result follows.

Proposition 2 The Real AdaBoost (with “learn a classifier” defined atthe distribution level) algorithm fits an additive logistic regression model fby iterative optimization of Lφ(f).

Proof Suppose we have a current estimate f(x) and seek to improve it byminimizing Lφ(f + b) over b. In the proof we assume that b is an arbitraryfunction, while in practice b will be chosen to best approximate the ideal fwithin the class B.

Denote by px = P [y = 1|x] (the true value) and by px the “estimate”

px =ef(x)

ef(x) + e−f(x)(38)

Assume again x is fixed. Then, by a similar reasoning as above we have

Lφ(f + b) = E[e−yf(x)−yb(x)]

= E[e−f(x)e−b(x)px + (1− px)ef(x)eb(x)]

By taking the derivative and setting it to 0 in a similar way to the previousproof, we obtain that the new step is

b(x) =1

2ln

pxe−f(x)

(1− px)ef(x)=

1

2

[

lnpx

1− px− ln

px1− px

]

(39)

Note that if one could exactly obtain the b prescribed by (39) the iterationwould not be necessary.

More interesting than the exact form of b above is the optimization problemthat leads to it.

17

Page 18: STAT 535 Lecture 4 October 23, 2013 Boosting and other ...€¦ · tionally 8] Bosting, 3.2.4 Bayesian model averaging, 16.6.3, 16.6.1 Ensembles of predictors 1 There is more than

Denote w(x, y) = e−yf(x). Then, b is the solution of

b = argminb∈B

EPXY w(X,Y )[e−Y b] (40)

where PXY w(X,Y ) denotes the (unnormalized) twisted distribution ob-tained by multiplying the original data distribution with w(x, y). (Of course,one may have to put some restrictions on PXY and B in order to obtain aproper distribution.) Finally, note that the new f is f + b and the newweights are w(x, y)e−yb(x) which finishes the proof.

Hence, the Real AdaBoost algorithm can be seen as a form of “noisygradient” algorithm at the distribution level. Note the absence of the co-efficient α in the FHT formulation of Real AdaBoost. That’s becausein the Schapire and Singer version the minimization was first done by find-ing a direction, then optimizing for step size, while in the FHT version theminimization in equation (40) is over both direction and scale of f .

3.1 Why the e−yf cost? and other Lφ costs

• the “true” classification cost is 1yf>0 (called the 0–1 cost) is noncon-vex, nonsmooth (has 0/no derivatives). We would like a surrogate costto have the following properties (satisfied by e−z)

• φ(z) is an upper bound of the 0–1 cost (this helps prove bounds of theform L ≤ Lφ)

• φ(z) is smooth (has continuous derivatives of any order if f has them);(this lets us use continuous optimization techniques to fit the classifier)

• φ(z) is convex (this leads to global optimization, which has been rec-ognized as beneficial in practice; it also allows to prove bounds, ratesof convergence and so on)

• φ(z) is monothone (decreasing) (thus, when z > 0, driving the marginsto increase even if the classification is correct). It is sometimes anadvantage to have φ(z) decreasing for all z < 0, and sometimes adisadvantage (e.g causes overfitting)

The following algorithm are derived by using different φ functions, and dif-ferent descent strategies.

18

Page 19: STAT 535 Lecture 4 October 23, 2013 Boosting and other ...€¦ · tionally 8] Bosting, 3.2.4 Bayesian model averaging, 16.6.3, 16.6.1 Ensembles of predictors 1 There is more than

−2 −1 0 1 20

1

2

3

4

5

6

7

8

9

yF

Cos

t

0−1 costexp(−yF)hinge−log(likelihood)(yF−1)2

Figure 1: Examples of cost functions φ(z) for classification.

3.1.1 LogitBoost

Log likelihood cost of classification

Llogit(f) = EPX[P (y = 1|x) ln P (y = 1|x) + P (y = −1|x) ln P (y = −1|x)]

(41)where P is the class probability predicted by the model f , as given in equa-tion (37). We shall find the following notation useful:

y∗ = (y + 1)/2 ∈ {0, 1} for y ∈ {±1} (42)

LogitBoost Algorithm

Assume B contains real-valued functionsInput M , labeled training set D

Initialize weights wi =1N, f(x) = 0, class probabilities Pi =

12

for k = 1, 2, . . . M

compute wi = Pi(1− Pi) zi = yi∗−Pi

wi

fit bk(x) to zi by weighted least squares, i.eminimize

iwi(b(xi)− zi)2

update f(x) ← f(x) + 12b

k(x) and Pi ← ef(xi)

ef(xi)+e−f(xi)

Ouput sign f(x)

Proposition 3 The LogitBoost algorithm uses (approximate) Newton-

19

Page 20: STAT 535 Lecture 4 October 23, 2013 Boosting and other ...€¦ · tionally 8] Bosting, 3.2.4 Bayesian model averaging, 16.6.3, 16.6.1 Ensembles of predictors 1 There is more than

Raphson steps to maximize the log-likelihood of the data Llogit(f).

Proof We can rewrite the log-likelihood as follows

Llogit(f) = E[y∗ lnef

ef + e−f+ (1− y∗) e−f

ef + e−f] (43)

= E[(2y∗ − 1)f − ln(ef + e−f )] (44)

= E[(2y∗ − 1)f + f − ln(e2f + e0)] (45)

= E[2y∗f − ln(1 + e2f )] (46)

Conditioning on x, we compute the first and second derivative of Llogit(f+b)w.r.t b(x) in b(x) = 0.

s(x) =∂E[2y∗(f(x) + b(x))− ln(1 + e2f(x)+2b(x))]

∂b(x)

∣∣∣∣∣b(x)=0

(47)

= E[2y∗ − 2e2f(x)+2b(x)

1 + e2f(x)+2b(x)]

∣∣∣∣∣b(x)=0

(48)

= 2y∗ − E[

2e2f(x)

1 + e2f(x)

]

(49)

= 2(y∗ − E[P (x)]) (50)

H(x) =∂2E[2y∗(f(x) + b(x)) − ln(1 + e2f(x)+2b(x))]

∂b(x)2

∣∣∣∣∣b(x)=0

(51)

=∂{

2y∗ − E[

2e2b(x)

1+e2b(x)

]}

∂b(x)

∣∣∣∣∣∣b(x)=0

(52)

= 2E

[

−2e2f(x)+2b(x)

(1 + e2f(x)+2b(x))2|x]∣∣∣∣∣b(x)=0

(53)

= −4E[

−2e2f(x)(1 + e2f(x))2

∣∣∣∣∣x

]

(54)

= −4E[

P (x)(1− P (x))|x]

(55)

Note that H(x) represents only the diagonal of the (infinite-dimensional)Hessian for this problem. The objective needs to be maximized and the

20

Page 21: STAT 535 Lecture 4 October 23, 2013 Boosting and other ...€¦ · tionally 8] Bosting, 3.2.4 Bayesian model averaging, 16.6.3, 16.6.1 Ensembles of predictors 1 There is more than

H(x) terms are negative. Therefore the (approximate) Newton-Raphsonupdate is

f(x) ← f(x)−H(x)−1s(x) (56)

= f(x) +1

2

E[y∗ − P (x)|x]E[P (x)(1 − P (x))]

(57)

= f(x) +1

2E[

y∗ − P (x)P (x)(1 − P (x))

P (x)(1 − P (x))E[P (x)(1 − P (x))|x]

|x] (58)

= f(x) +1

2Ew[

y∗ − P (x)P (x)(1− P (x))

|x] (59)

with w(x) = P (x)(1−P (x))

E[P (x)(1−P (x))|x]. The update above is equivalent to

minf

Ew

(

f(x) +1

2

y∗ − P (x)P (x)(1 − P (x))

− (f(x) + b(x))

)2

(60)

In practice we have the condition b ∈ B and the minimization is done overB and with the sample average replacing the expectation E[].

Numerically

• it is better to enforce a lower threshold on the weights (e.g. 2×ǫmachine)and to set the small weights either to the threshold value or to 0. Thelatter option can substantially speed up computation, especially forlarge data sets.

• compute zi as

zi =

{min(1/Pi, zmax) y = 1

min(1/(1Pi), zmax) y = −1 (61)

Cost φ e−yf y ln p(f) + (1− y) ln(1− p(f))p(f) = ef/(ef + e−f )

steepest Discrete –+ line search Real

Newton Gentle Logit

3.1.2 AnyBoost and any cost φ

Arbitrary cost: Lφ(f) = 1N

∑Ni=1 φ(y

if(xi))

21

Page 22: STAT 535 Lecture 4 October 23, 2013 Boosting and other ...€¦ · tionally 8] Bosting, 3.2.4 Bayesian model averaging, 16.6.3, 16.6.1 Ensembles of predictors 1 There is more than

Learning algorithm: finds b ∼ − 1N∇∑N

i=1 φ(yif(xi))

AnyBoost Algorithm

Initialize f0 = b0

for k = 1, . . .Mlearn bk

find βk by line searchfk = fk−1 + βkbk

Properties

• can use better cost• local optima

3.2 How to choose a cost φ?

Can we analyze which cost functions φ are “better”? Can we offer some guar-antees in terms of generalization bounds? The answers are in [Bartlett et al., 2006]Bartlett, Jodan & McAuliffe,”Convextity, classification and risk bounds”,2005 (BJM).

We will restrict ourselves to convex, almost everywhere differentiable costsφ that are upper bounds of the 0-1 cost.

Let p = P [Y = 1|X], z = f(X). Then the expected cost of classification atX is

Cp(z) = pφ(z) + (1− p)φ(−z) (62)

and the optimal cost is

H(p) = min bzCp(z) attained for f∗ =1

2ln

p

1− p (63)

Let H− denote the smallest cost for a misclassification

H−(p) = infsgnz=−sgn(2p−1)

Cp(z) (64)

Intuitively, we are minimizing φ instead of the “true” misclassification cost,and we want to measure how much we can be off when doing this. Thefollowing results say that we can bound the “true” loss L01(f) in terms ofthe φ-loss Lφ.

22

Page 23: STAT 535 Lecture 4 October 23, 2013 Boosting and other ...€¦ · tionally 8] Bosting, 3.2.4 Bayesian model averaging, 16.6.3, 16.6.1 Ensembles of predictors 1 There is more than

We say φ is classification calibrated if H−(p) > H(p) for all p 6= 1/2.For φ convex, we have that φ is classification calibrated iff φ differentiableat 0 and φ′(0) < 0.

Proposition 4 (Theorem 4 in BJM) If φ is classification calibrated andconvex, then for any classifier F

ψ(L01(f)− L∗01) ≤ Lφ(f)− L∗

φ (65)

where L∗φ, L

∗01 represent respectively the optimal φ-loss and optimal classifi-

cation loss on the given data distribution and ψ is

ψ(θ) = φ(0) −H(1 + θ

2) (66)

Loss function φ(z) Transform function ψ(θ)

exponential: e−z 1−√1− θ2

truncated quadratic: (max(1− z, 0))2 θ2

hinge: max(1− z, 0) |θ|In BJM there are also more general theorems that do not assume φ is convex.

Furthermore, a convergence rate bound is given, which depends on: the noisein the labels, a complexity parameter of the function class B, the curvatureof φ. By optimizing this expression w.r.t to B and φ one can theoreticallychoose the loss function and/or the base classifier.

3.3 Consistency of AdaBoost

[Bartlett and Traskin, 2007] proved that a large family of boosting algo-rithms is consistent. Below is an informal version of their main theorem.

Consistency is defined as L01(ftN ) → L∗

01 for N → ∞ and a tN a certainsequence of stopping times that tends to infinity with N .

The conditions for consistency are as follows:

1. The function φ is convex, lower bounded (by 0) and calibrated as insection 3.2

2. The boosting step satisfies a weak leaning condition

Lφ(fk) ≤ γ inf

bLφ(f

k−1 + αb) + (1− γ)Lφ(fk−1) (67)

23

Page 24: STAT 535 Lecture 4 October 23, 2013 Boosting and other ...€¦ · tionally 8] Bosting, 3.2.4 Bayesian model averaging, 16.6.3, 16.6.1 Ensembles of predictors 1 There is more than

3. The set B is rich enough that the Bayes cost L∗φ can be attained by

convex combinations in B. There is a sequence fk of k terms from Bwhose Lφ tends to L∗

φ

4. The empirical cost Lφ converges to Lφ when N → ∞ uniformly overall f which are tN combinations

5. The empirical risks of fk converge, i.e max{0, |Lφ(fN )−Lφ(f

N )|} → 0,a.s. when N →∞

6. Algorithmic convergence max{0, |Lφ(ftN )− Lφ(f

N )|} → 0, a.s. whenN →∞. In other words, the boosting algorithm produces an approx-imate minimizer of the Lφ risk if run for tN iterations

7. tN = n1−ε for some ε ∈ (0, 1) (e.g. increases slowly with N).

...and a loss bound

The following result applies to any classifier, but it was developed in re-sponse to the idea that “boosting increases the margin” (which we nowknow is often, but not always true). It proves essentially that large marginscounter overfitting. As with all worst-case bounds, the bounds are usuallynot realistic or practically applicable.

Proposition 5 (to find citation) Let F be a model class of VC-dimensionh, with f(x) ∈ [−1, 1] for all x and for all f ∈ F . Let δ > 0 and θ ∈ (0, 1).Then, with probability w.p. > 1− δ over training sets

L01(f) ≤1

N|{i | yif(xi) ≤ θ}|+ O

(√

h

Nθ2

)

(68)

for any f ∈ F .

This theorem upper bounds the the true loss L01(f) using the number ofmargin errors for an arbitrary margin θ. Note that for θ = 0 a margin erroris also a classification error, and for θ > 0 the number of margin errorsis greater or equal to that of classification errors. Hence, the first term ofthe bound increases with θ, while the second term decreases. So, if mostexamples can be classified with a large margin (not necessarily 1), then thebound of Theorem 5 can be tighter.

24

Page 25: STAT 535 Lecture 4 October 23, 2013 Boosting and other ...€¦ · tionally 8] Bosting, 3.2.4 Bayesian model averaging, 16.6.3, 16.6.1 Ensembles of predictors 1 There is more than

3.4 When to stop boosting?

The idea of Cross-Validation (CV) is to use an idependent sample fromPXY , denoted D′ and called the validation set to estimate the expectedloss L01(f). When overfitting starts, L01(f

k) will start increasing with k.Boosting is the stopped at the value M that minimizes L01(b

k;D′) (denotedLcv below to simplify notation)

AdaBoost with Cross-Validation

Given Training set D of size N , validation set D of size N ′, baseclassifier BInitialize

1. while LCV decreases (but for at least 1 step)

• do a round of boosting on D• for i′ = 1 : N ′ compute f(xi

′)← f(xi

′) + βkbk(xi

′)

• compute RCV = 1N ′

i′ 1[yi′f(xi′ )<0]

3.5 Other practical aspects

Overfitting in noise When the classes overlap much (many examples in Dhard/impossible to classify correctly) boosting algorithms tend to focus toomuch on the hard examples, at the expense of overall classification accuracy.Observe also the cost function(s) in figure 1.

Choice of features Often times, the base class B consists of function of theform f(x) = xj − a, which perform a split on coordinate xj at point xj = a.They have the advantage that they can be learned and evaluated extremelyfast. One can also augment the coordinate vector x with functions of thecoordinates (e.g. x → [x1 . . . xd x1x2 x1x3 . . . ]) essentially creating a largeset of features, which corresponds to finite but very large B. In such asituation, the number of features d can easily be larger than M the numberof b’s in the final f . Thus, boosting will be implicitly performing a featureselection task.

25

Page 26: STAT 535 Lecture 4 October 23, 2013 Boosting and other ...€¦ · tionally 8] Bosting, 3.2.4 Bayesian model averaging, 16.6.3, 16.6.1 Ensembles of predictors 1 There is more than

4 Extensions of boosting

4.1 Multiplicative updates algorithms

Boosting also can be seen as part of a larger class of multiplicative updatesalgorithms. This area is under intense development, especially for algorithmsat the frontier between game theory and computer science. For a general andclear discussion of these algorithms see [Arora et al., ] “The Multiplicativeupdates method” by Arora, Hazan and Kale.

Here is a very simple example: We have “experts” b1:M who can predict thestock market (with some error). The predictions in this problem are binary,i.e {up, down} We will also try to predict the stock market, by combiningtheir predictions in the function f =

∑k wkbk. The following algorithmlearns f by optimizing the weights wk.

Weighted Majority Algorithm

Initialize w0i ← 1

for t = 1, 2, . . .1. wt

i ← wt−1i (1− ǫ) if expert i makes a mistake at time t

2. predict the outcome that agrees with the weighted majority of theexperts

It can be shown that the number of mistakes mt of f up to time t is boundedby

mt ≤ 2 lnM

ǫ+ 2(1 + ǫ)mt

j (69)

where mtj is the number of mistakes of any expert j. Thus, asymptotically,

the number of mistakes of the algorithm is about twice those of the bestexpert.

For a more general algorithm, that includes the above case, Arora & al provethat to achieve a tolerance δ w.r.t to the optimal average cost, one needs tomake O(lnM/δ2) updates.

Another example that falls under the same framework is the Covering (Ad-missibility) Linear Program problem with an oracle. The task is to find apoint x ∈ R

n satisfying M linear constraints given by

Ax ≥ b, A ∈ RM×n, b ∈ R

M (70)

26

Page 27: STAT 535 Lecture 4 October 23, 2013 Boosting and other ...€¦ · tionally 8] Bosting, 3.2.4 Bayesian model averaging, 16.6.3, 16.6.1 Ensembles of predictors 1 There is more than

We have an oracle which, given a single constraint cTx ≥ d returns a pointx satisfying it whenever the constraint is feasible. It is assumed that theoracle’s responses x satisfy Aix− bi ∈ [−ρ, ρ] for all rows i of A and that ρis known.

We run the multiplicative updates algorithm for T steps, where T ∝ ρ2 asfollows

Linear Program with Oracle parameters ρ, δInitialize wi = 1/M the weight of each constraintfor t = 1, 2, . . . T

1. Call Oracle with c =∑

iwiAi, d =∑

iwibi and obtain xt

2. Penalty for equation i is rti = Aixt − bi

3. Update weights by

wt+1i ← wt

i(1− ǫ · sign rti)|rti | (71)

with ǫ = δ4ρ and renormalize the weights.

Output x =∑

t xt/T

In [Arora et al., ] it is shown (Exercise: prove it based on the initial assump-tions!) that (1) if Oracle returns a feasible xt at all steps, then x satisfiesAix − b + δ ≥ 0 i.e the system is satisfied with tolerance δ; (2) if Oracle

declares infeasibility in some step, then the program is infeasible.

4.2 Boosting for multiclass and ranking

Multilabel classification is a setting where an example x can have mul-tiple labels, represented by the set Y (x), from a given finite set Y, with|Y| = L. One remaps the set of labels to the binary vector y ∈ {±1}L by

yl =

{1 if l ∈ Y (x)−1 if l 6∈ Y (x)

for l ∈ Y (72)

There is a weight wil for each example i and each label l ∈ Y

AdaBoost.MH []

27

Page 28: STAT 535 Lecture 4 October 23, 2013 Boosting and other ...€¦ · tionally 8] Bosting, 3.2.4 Bayesian model averaging, 16.6.3, 16.6.1 Ensembles of predictors 1 There is more than

Input M , labeled training set DInitialize f = 0

w1il = 1

NL

for k = 1, 2, . . . Mlearn classifier bkl on D with weights wk

il predict label yl, l = 1 : L

evaluate error rk =∑N

i=1

∑Ll=1 w

kily

ilb

kl (xi)

calculate εk = 1−rk

2 , βk = 12 ln

1−εk

εk

compute new weights wk+1il = 1

Zkwkile

−yilbkl(xi) and normalize them to sum to 1

Output f(x) = [fl(x)]l∈Y = [∑M

k=1 bkl (x)]l∈Y

The error εk is the sum of the errors on each label, in other words theHamming distance between the true vector yi and the vector [bkl (x

i)]l. Thisis symbolyzed by the “H” in the name of the algorithm.

A variant of AdaBoost.MH that uses Error Correcting Output Codes(ECOC) for multiclass single label classification is called AdaBoost.MO

[].

Ranking. Often ranking is considered in a broader sense, that includes

• ranking proper: finding a total ordering of the items x ∈ X in a givenset. This is done for example by search engines when they present webpages ranked by their relevance to the query.

• rating: giving each x a label in a finite set Y. This is the “Netflix”task, where each movie is rated from 1 to 5 stars.

• retrieval: each item is labeled either 1 (relevant) or 0 (irrelevant).This is the first task some search engines perform when they are givena query. Note that this task looks like a classification, but it differs inthe fact that the x items are not sampled iid.

Underlying assumptions (hidden in the algorithm below)

• The items x are as usual represented by feature vectors in Rn. Thus

x will represent in the same time a web page and the set of featuresdescribing this web page, which will be used to infer the page label.

• Typically, one gets a training set of many “queries”, each with anassociated list of “documents” x. For the purpose of ranking, onlypairs x, x′ which correspond to the same query and have different ranksmust be considered. These pairs are called crucial pairs. Thus, analgorithm that learns how to rank data will look at pairs of x’s and the

28

Page 29: STAT 535 Lecture 4 October 23, 2013 Boosting and other ...€¦ · tionally 8] Bosting, 3.2.4 Bayesian model averaging, 16.6.3, 16.6.1 Ensembles of predictors 1 There is more than

differences in their labels in the same way as a classification algorithmlooks at single x vectors and their ±1 labels.Moreover, the algorithm will ignore the grouping by query. This willbe OK because the algorithm will only see pairs that belong to thesame query.

• The ranking is given by a real valued function f(x). In the rankingcase, the items x are ordered by their values; in the second case f isconstrained to take discrete values; in the third case sign f providesthe label.

Below is an example of a boosting algorithm for ranking under these paradigms.

RankBoost Algorithm

Initialize w1x,x′ ∝ 1 for all (x, x′) crucial pairs in the data. It is assumed

that x ≻ x′, i.e. that x is ranked after x′.for k = 1, 2, . . . K1. train weak classifier bk on the crucial pairs weighted by wk

xx′

2. calculate rk =∑

(x,x′)wkxx′(bk(x)− bk(x′)); this is the average margin

3. calculate βk = 12 ln

1+rk

1−rk(see also notes below)

4. update weights wk+1xx′ = 1

Zkwkxx′e−βk(bk(x)−bk(x′)) with Zk a normaliza-

tion constantOutput f(x) =

∑Kk=1 β

kbk(x)

Remark: there is more than one way to choose βk, and they are analogousto the methods described on pages 11–12. The one in the algorithm abovecorresponds to the case b(x) ∈ [0, 1]. For b(x)k ∈ {0, 1} a formula similar tothat for DiscreteAdaBoost is obtained. For bk(x) ∈ R it is recommendedto minimize Zk w.r.t β in order to obtain the best value. [Exercise: why?]

5 Conclusions

• There are many different methods for averaging classifiers. They havedifferent effects and should be applied in different situations.

• Rule of thumb: Averaging is particularly recommended when B is notthe “true” classifier family for the given problem (we don’t expect asingle classifier to perform well enough).

• Interpretability of the result of learning is generally lost by averaging.

29

Page 30: STAT 535 Lecture 4 October 23, 2013 Boosting and other ...€¦ · tionally 8] Bosting, 3.2.4 Bayesian model averaging, 16.6.3, 16.6.1 Ensembles of predictors 1 There is more than

References

[Arora et al., ] Arora, S., Hazan, E., and Kale, S. The multiplicative weightsupdate method: a meta algorithm and applications.

[Bartlett et al., 2006] Bartlett, P. L., Jordan, M. I., and McAuliffe, J. D.(2006). Convexity, classification, and risk bounds. Journal of the Ameri-can Statistical Association, 101(473):138–156.

[Bartlett and Traskin, 2007] Bartlett, P. L. and Traskin, M. (2007). Ad-aboost is consistent. Journal of Machine Learning Research, 8:2347–2368.

[Bauer and Kohavi, 1999] Bauer, E. and Kohavi, R. (1999). An empiri-cal comparison of voting classification algorithms: bagging, boosting andvariants. MAchine learning, 36:105–142.

[Breiman, 1994] Breiman, L. (1994). Bagging predictors. Technical report421, Department of Statistics, University of California, Berkeley.

[Dietterich, 1999] Dietterich, T. G. (1999). An experimental comaprisonof three methods for constructing ensembles of decision trees: bagging,boosting and randomization. Machine learning, pages 1–22.

[Dietterich, 2000] Dietterich, T. G. (2000). Ensemble methods in machinelearning. In Roli, F., editor, First International Workshop on Multi-ple Classifier Systems, Lecture Notes in Computer Science, New York.Springer Verlag.

[Freund and Schapire, 1997] Freund, Y. and Schapire, R. E. (1997). Adecision-theoretic generalization of on-line learning and an applicationto boosting. Jounal of computer and system sciences, 55(1):119–139.

[Friedman et al., 1999] Friedman, J., Hastie, T., and Tibshani, R. (1999).Additive logistic regression: a statistical view of boosting. In Advances inNeural Information Processing systems (NIPS), number 11. MIT Press.(see also technical report at http://www-stat.stanford.edu/ jhf/.

[Mason et al., 1999] Mason, L., Baxter, J., Bartlett, P., and Frean, M.(1999). Boosting algorithms as gradient descent in function space. Tech-nical report RSISE, Australian national university.

30

Page 31: STAT 535 Lecture 4 October 23, 2013 Boosting and other ...€¦ · tionally 8] Bosting, 3.2.4 Bayesian model averaging, 16.6.3, 16.6.1 Ensembles of predictors 1 There is more than

[Mason et al., 2000] Mason, L., Baxter, J., Bartlett, P., and Frean, M.(2000). Boosting algorithms as gradient descent. In Advances in Neu-ral Information Processing systems (NIPS), number 12. MIT Press. (toappear).

[Schapire et al., 1998] Schapire, R. E., Freund, Y., Bartlett, P. L., and Lee,W. S. (1998). Boosting the margin: a new explanation for the effectivenessof voting methods. Annals of statistics, 26(5):1651–1686.

[Schapire and Singer, 1998] Schapire, R. E. and Singer, Y. (1998). Im-proved boosting algorithms using confidence-rated predictions. In Pro-ceedings of the Eleventh Annual conference on computational learningtheory (COLT), pages 80–91.

31