ArticleslgStudy

computer science

AdaBoost

AdaBoost is a computer science topic covered in the lgStudy science library. This page brings together a partial reference excerpt, illustrations, worked examples, real-world applications and a short study plan, so you can understand AdaBoost rather than just read about it. In short: AdaBoost (short for Adaptive Boosting) is a statistical classification meta-algorithm formulated by Yoav Freund and Robert Schapire in 1995, who won the 2003 Gödel Prize for their work. It can be used in conjunction with many types of learning algorithm to improve performance.

Key takeaways

  • AdaBoost belongs to computer science; place it in that map before memorising details.
  • Learn the definition first, then one example that makes the definition concrete.
  • Connect AdaBoost to a quantity you can measure, compute or draw — that is where exam questions come from.
  • Reproduce the core statement of AdaBoost from memory before moving on to harder problems.

Reference excerpt

AdaBoost (short for Adaptive Boosting) is a statistical classification meta-algorithm formulated by Yoav Freund and Robert Schapire in 1995, who won the 2003 Gödel Prize for their work. It can be used in conjunction with many types of learning algorithm to improve performance. The output of multiple weak learners is combined into a weighted sum that represents the final output of the boosted classifier. Usually, AdaBoost is presented for binary classification, although it can be generalized to multiple classes or bounded intervals of real values. AdaBoost is adaptive in the sense that subsequent weak learners (models) are adjusted in favor of instances misclassified by previous models. In some problems, it can be less susceptible to overfitting than other learning algorithms. The individual learners can be weak, but as long as the performance of each one is slightly better than random guessing, the final model can be proven to converge to a strong learner. Although AdaBoost is typically used to combine weak base learners (such as decision stumps), it has been shown to also effectively combine strong base learners (such as deeper decision trees), producing an even more accurate model. Every learning algorithm tends to suit some problem types better than others, and typically has many different parameters and configurations to adjust before it achieves optimal performance on a dataset. AdaBoost (with decision trees as the weak learners) is often referred to as the best out-of-the-box classifier. When used with decision tree learning, information gathered at each stage of the AdaBoost algorithm about the relative 'hardness' of each training sample is fed into the tree-growing algorithm such that later trees tend to focus on harder-to-classify examples.

Training AdaBoost refers to a particular method of training a boosted classifier. A boosted classifier is a classifier of the form FT(x)=∑t=1Tft(x) where each ft is a weak learner that takes an object x as input and returns a value indicating the class of the object. For example, in the two-class problem, the sign of the weak learner's output identifies the predicted object class and the absolute value gives the confidence in that classification. Each weak learner produces an output hypothesis h which fixes a prediction h(xi) for each sample in the training set. At each iteration t, a weak learner is selected and assigned a coefficient αt such that the total training error Et of the resulting t-stage boosted classifier is minimized. Et=∑iE[Ft−1(xi)+αth(xi)] Here Ft−1(x) is the boosted classifier that has been built up to the previous stage of training and ft(x)=αth(x) is the weak learner that is being considered for addition to the final classifier.

Weighting At each iteration of the training process, a weight wi,t is assigned to each sample in the training set equal to the current error E(Ft−1(xi)) on that sample. These weights can be used in the training of the weak learner. For instance, decision trees can be grown which favor the splitting of sets of samples with large weights.

Derivation This derivation follows Rojas (2009): Suppose we have a data set {(x1,y1),…,(xN,yN)} where each item xi has an associated class yi∈{−1,1}, and a set of weak classifiers {k1,…,kL} each of which outputs a classification kj(xi)∈{−1,1} for each item. After the (m−1)-th iteration our boosted classifier is a linear combination of the weak classifiers of the form: C(m−1)(xi)=α1k1(xi)+⋯+αm−1km−1(xi), where the class will be the sign of C(m−1)(xi). At the m-th iteration we want to extend this to a better boosted classifier by adding another weak classifier km, with another weight αm: Cm(xi)=C(m−1)(xi)+αmkm(xi) So it remains to determine which weak classifier is the best choice for km, and what its weight αm should be. We define the total error E of Cm as the sum of its exponential loss on each data point, given as follows: E=∑i=1Ne−yiCm(xi)=∑i=1Ne−yiC(m−1)(xi)e−yiαmkm(xi) Letting wi(1)=1 and wi(m)=e−yiCm−1(xi) for m>1, we have: E=∑i=1Nwi(m)e−yiαmkm(xi) We can split this summation between those data points that are correctly classified by km (so yikm(xi)=1) and those that are misclassified (so yikm(xi)=−1): E=∑yi=km(xi)wi(m)e−αm+∑yi≠km(xi)wi(m)eαm=∑i=1Nwi(m)e−αm+∑yi≠km(xi)wi(m)(eαm−e−αm) Since the only part of the right-hand side of this equation that depends on km is ∑yi≠km(xi)wi(m), we see that the km that minimizes E is the one in the set {k1,…,kL} that minimizes ∑yi≠km(xi)wi(m) [assuming that αm>0], i.e. the weak classifier with the lowest weighted error (with weights wi(m)=e−yiCm−1(xi)). To determine the desired weight αm that minimizes E with the km that we just determined, we differentiate: dEdαm=d(∑yi=km(xi)wi(m)e−αm+∑yi≠km(xi)wi(m)eαm)dαm The value of αm that minimizes the above expression is: αm=12ln⁡(∑yi=km(xi)wi(m)∑yi≠km(xi)wi(m))

We calculate the weighted error rate of the weak classifier to be ϵm=∑yi≠km(xi)wi(m)∑i=1Nwi(m), so it follows that: αm=12ln⁡(1−ϵmϵm) which is the negative logit function multiplied by 0.5. Due to the convexity of E as a function of αm, this new expression for αm gives the global minimum of the loss function. Note: This derivation only applies when km(xi)∈{−1,1}, though it can be a good starting guess in other cases, such as when the weak learner is biased (km(x)∈{a,b},a≠−b), has multiple leaves (km(x)∈{a,b,…,n}) or is some other function km(x)∈ℝ. Thus we have derived the AdaBoost algorithm: At each iteration, choose the classifier km, which minimizes the total weighted error ∑yi≠km(xi)wi(m), use this to calculate the error rate ϵm=∑yi≠km(xi)wi(m)∑i=1Nwi(m), use this to calculate the weight αm=12ln⁡(1−ϵmϵm), and finally use this to improve the boosted classifier Cm−1 to Cm=C(m−1)+αmkm.

Statistical understanding of boosting

… excerpt ends here. Continue reading the full article.

Worked examples

Example 1 — a first encounter with AdaBoost

Start with the simplest possible case. Write down what AdaBoost claims or describes in one sentence, then invent the smallest concrete situation in which that sentence is true. In computer science, the smallest case is usually a single object, a single equation or a single measurement. Check that every symbol or term in your sentence has a meaning in that case.

Example 2 — changing one variable

Take the situation from Example 1 and change exactly one quantity: double it, halve it, or set it to zero. Predict what should happen to AdaBoost before you calculate. Comparing your prediction with the result is the fastest way to find out whether you understand the idea or only the words.

Example 3 — an exam-style question

Typical questions about AdaBoost ask you to (a) state it precisely, (b) apply it to given data, and (c) explain a limitation. Practise writing all three answers in under five minutes; the third part is what separates a full-mark answer from an average one.

Applications of AdaBoost

In research
AdaBoost appears in computer science research whenever the underlying quantities have to be modelled precisely. Papers usually cite it as a starting assumption and then explore where it breaks down.
In technology and industry
Engineering practice reuses AdaBoost in design rules, simulations and safety margins. Knowing the idea lets you read a specification sheet and understand why the numbers look the way they do.
In the classroom
AdaBoost is common in secondary-school and first-year university syllabi. It links to neighbouring topics Classification algorithms, Ensemble learning, Machine learning algorithms, so understanding it makes those chapters shorter.
In everyday life
Look for AdaBoost outside the textbook — in sport, cooking, traffic, electronics or the sky above you. An example you found yourself is remembered far longer than one you were given.
Ask Teacher Smith questions about this articleOpens your AI tutor with a question about “AdaBoost” →

How to study AdaBoost in 20 minutes

  1. Read the reference excerpt below once, without taking notes.
  2. Close the page and write down what AdaBoost means in your own words.
  3. Compare your version with the excerpt and mark what you missed.
  4. Work through the three examples above with pen and paper.
  5. Explain AdaBoost out loud to somebody else — or to Teacher Smith in the lgStudy chat.

Frequently asked questions

What is AdaBoost in simple terms?

AdaBoost (short for Adaptive Boosting) is a statistical classification meta-algorithm formulated by Yoav Freund and Robert Schapire in 1995, who won the 2003 Gödel Prize for their work. It can be used in conjunction with many types of learning algorithm to improve performance.

Why does AdaBoost matter?

Because it connects several computer science ideas at once: it gives you a definition you can apply, a quantity you can calculate, and a way to check whether a result is plausible.

How should I study AdaBoost?

Read the excerpt, restate it from memory, then work through the examples and applications listed on this page. The five-step study plan above takes about twenty minutes.

What does this page cover?

It gives you a compact reference excerpt plus original lgStudy explanations, examples, applications and study material on AdaBoost.

Tags

  • Classification algorithms
  • Ensemble learning
  • Machine learning algorithms

Keep exploring