ArticleslgStudy

computer science

Gradient boosting

Gradient boosting 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 Gradient boosting rather than just read about it. In short: Gradient boosting is a machine learning technique based on boosting in a functional space, where the target is pseudo-residuals instead of residuals as in traditional boosting. It gives a prediction model in the form of an ensemble of weak prediction models, i.e., models that make very few assumptions about the data, which are typically simple decision trees.

Key takeaways

  • Gradient boosting 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 Gradient boosting to a quantity you can measure, compute or draw — that is where exam questions come from.
  • Reproduce the core statement of Gradient boosting from memory before moving on to harder problems.

Reference excerpt

Gradient boosting is a machine learning technique based on boosting in a functional space, where the target is pseudo-residuals instead of residuals as in traditional boosting. It gives a prediction model in the form of an ensemble of weak prediction models, i.e., models that make very few assumptions about the data, which are typically simple decision trees. When a decision tree is the weak learner, the resulting algorithm is called gradient-boosted trees; it usually outperforms random forest. As with other boosting methods, a gradient-boosted trees model is built in stages, but it generalizes the other methods by allowing optimization of an arbitrary differentiable loss function.

History The idea of gradient boosting originated in the observation by Leo Breiman that boosting can be interpreted as an optimization algorithm on a suitable cost function. Explicit regression gradient boosting algorithms were subsequently developed, by Jerome H. Friedman, (in 1999 and later in 2001) simultaneously with the more general functional gradient boosting perspective of Llew Mason, Jonathan Baxter, Peter Bartlett and Marcus Frean. The latter two papers introduced the view of boosting algorithms as iterative functional gradient descent algorithms. That is, algorithms that optimize a cost function over function space by iteratively choosing a function (weak hypothesis) that points in the negative gradient direction. This functional gradient view of boosting has led to the development of boosting algorithms in many areas of machine learning and statistics beyond regression and classification.

Informal introduction (This section follows the exposition by Cheng Li.) Like other boosting methods, gradient boosting combines weak "learners" into a single strong learner iteratively. It is easiest to explain in the least-squares regression setting, where the goal is to teach a model F {\displaystyle F} to predict values of the form y ^ = F ( x ) {\displaystyle {\hat {y}}=F(x)} by minimizing the mean squared error 1 n ∑ i ( y ^ i − y i ) 2 {\displaystyle {\tfrac {1}{n}}\sum _{i}({\hat {y}}_{i}-y_{i})^{2}} , where i {\displaystyle i} indexes over some training set of size n {\displaystyle n} of actual values of the output variable y {\displaystyle y} :

y ^ i = {\displaystyle {\hat {y}}_{i}=} the predicted value F ( x i ) {\displaystyle F(x_{i})}

y i = {\displaystyle y_{i}=} the observed value

n = {\displaystyle n=} the size of the sample, i.e. the number of observations in y {\displaystyle y}

If the algorithm has M {\displaystyle M} stages, at each stage m {\displaystyle m} ( 1 ≤ m ≤ M {\displaystyle 1\leq m\leq M} ), suppose some imperfect model F m {\displaystyle F_{m}} (for low m {\displaystyle m} , this model may simply predict y ^ i {\displaystyle {\hat {y}}_{i}} to be y ¯ {\displaystyle {\bar {y}}} , the mean of y {\displaystyle y} ). In order to improve F m {\displaystyle F_{m}} , our algorithm should add some new estimator, h m ( x ) {\displaystyle h_{m}(x)} . Thus,

F m + 1 ( x i ) = F m ( x i ) + h m ( x i ) = y i {\displaystyle F_{m+1}(x_{i})=F_{m}(x_{i})+h_{m}(x_{i})=y_{i}}

or, equivalently,

h m ( x i ) = y i − F m ( x i ) . {\displaystyle h_{m}(x_{i})=y_{i}-F_{m}(x_{i}).}

… excerpt ends here. Continue reading the full article.

Worked examples

Example 1 — a first encounter with Gradient boosting

Start with the simplest possible case. Write down what Gradient boosting 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 Gradient boosting 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 Gradient boosting 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 Gradient boosting

In research
Gradient boosting 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 Gradient boosting 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
Gradient boosting is common in secondary-school and first-year university syllabi. It links to neighbouring topics Classification algorithms, Decision trees, Ensemble learning, so understanding it makes those chapters shorter.
In everyday life
Look for Gradient boosting 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 “Gradient boosting” →

Affiliate

Preply — study more efficiently by working with a personal tutor. 50% off.

How to study Gradient boosting in 20 minutes

  1. Read the reference excerpt below once, without taking notes.
  2. Close the page and write down what Gradient boosting 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 Gradient boosting out loud to somebody else — or to Teacher Smith in the lgStudy chat.

Frequently asked questions

What is Gradient boosting in simple terms?

Gradient boosting is a machine learning technique based on boosting in a functional space, where the target is pseudo-residuals instead of residuals as in traditional boosting. It gives a prediction model in the form of an ensemble of weak prediction models, i.e., models that make very few assumpti…

Why does Gradient boosting 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 Gradient boosting?

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 Gradient boosting.

Tags

  • Classification algorithms
  • Decision trees
  • Ensemble learning

Keep exploring