Multivariate & ML · Machine Learning

Gradient Boosting (Trees)

Boosted decision trees (histogram-based gradient boosting) for classification or regression: honest cross-validated metrics, permutation importance, and partial-dependence plots for the top features.

In the menus Multivariate & ML › Machine Learning › Gradient Boosting (Trees)

Also searched as gradient boosting boosted trees xgboost gbm boosting

When to use it

Predict a category or a number from a mix of numeric and categorical predictors when accuracy matters more than an interpretable equation and the relationship may be non-linear with interactions. Boosting builds many small trees sequentially, each one correcting the previous ensemble's mistakes, usually among the most accurate off-the-shelf methods on tabular data.

When not to: A dataset with only a few dozen rows (leaves may fail to split meaningfully), a case where an interpretable coefficient-based model (linear/logistic regression) achieves comparable cross-validated performance, or when a predictor might secretly encode the outcome (an ID column, a downstream measurement): boosting will find and exploit that leakage, producing a near-perfect but meaningless cross-validated score that deserves suspicion rather than celebration.

Step by step

  1. Open it from the menu

    Click Multivariate & ML in the menu bar; under Machine Learning choose Gradient Boosting (Trees).

  2. Fill in the form

    Choose the columns: What you want to predict, Columns that may explain it. The form lists only columns whose type fits each field.

  3. Check the options

    The options start at their defaults: Boosting rounds (trees), Learning rate (shrinkage), Max tree depth, Min rows per leaf, CV folds, Random seed. Change one only when your question needs it.

  4. Run the analysis

    Press Run analysis. The Result Card opens on its Results tab.

What to choose in the form

Fields of the Gradient Boosting (Trees) form
What you want to predict Outcome requiredOne categorical or binary or numeric column. Outcome to predict. Categorical or two-level → classification; continuous numeric → regression.
Columns that may explain it Predictors requiredOne numeric or categorical or binary column. One or more predictors. Numeric columns are used as-is; categorical columns are one-hot encoded automatically.
Boosting rounds (trees)Number of trees fit sequentially. More rounds fit harder; unlike a random forest, boosting CAN overfit if this is too large. Default: 100.
Learning rate (shrinkage)How much each tree's correction counts (λ). Smaller = slower, safer learning but needs more trees. Default: 0.1.
Max tree depthDepth of each individual tree (the interaction depth). Boosted trees should stay shallow; 0 = no depth limit (leaf count still capped). Default: 3.
Min rows per leafSmallest number of rows a leaf may hold. Lower it for small datasets, where the default of 20 can prevent any split at all. Default: 20.
CV foldsCross-validation folds (stratified for classification), seeded for reproducibility. Default: 5.
Random seedSeed shared by the CV shuffle, the model's internal randomness, and permutation importance: same seed, same numbers. Default: 42.

How to read the card

The Results tab starts with what to know first (rows left out, checks that did not pass), then the interpretation in words and the Key Results; charts and assumption checks follow further down. Learn More explains the method in plain words. Read a Result Card covers all four tabs.

A worked example

Predicting penguin species from bill length, bill depth, flipper length and body mass with gradient boosting (defaults: depth 3, 100 rounds, learning rate 0.1, 5-fold CV, seed 42).

Result: In-sample accuracy = 100%, cross-validated accuracy = 96.8%; out-of-sample permutation importance ranks bill length and bill depth as the top two predictors.

The perfect in-sample score is the expected symptom of a flexible model fitting its own training rows closely, not evidence of a flawless model; the honest number to report and act on is the 96.8% cross-validated accuracy, and the out-of-sample importance ranking is the one to trust over the potentially inflated training-set version.

From the Statistics Library.

The code tabs

Code gives this analysis as Python, R and MATLAB code (and SAS where the tab offers it), reading the data the way KernelStats did. Export sends the card to a report or to slides. See The Code tab.

Understand the statistics

Ask Oobi

Type one of these into Ask Oobi beside your data:

  • Which measurements best predict a penguin's species, and how accurate is a boosted-tree model on penguins it has never seen?
  • Explain the gradient boosting (boosted trees) in plain words.
  • What does overfitting mean?

Last reviewed November 16, 2026.

Report an unclear step