Skip to content
StackDecode
AI & ML Atlas
Machine LearningalgorithmInteractive simulation

LightGBM

Gradient boosting made fast with histograms and leaf-wise tree growth.

The idea

It bins feature values into histograms so split finding is cheap, grows trees leaf-wise (always splitting the leaf with the largest gain) rather than level by level, and samples rows by gradient size (GOSS) to cut work. It is very fast on large datasets.

Watch it run

This is a real computation, not a drawing. Pause, step, change the settings, or try new random data.

  • data
  • ensemble prediction
  • residuals

Start with the simplest model: predict the average everywhere.

round:
0
error:
0.0545
1/25

Each round fits a tiny one-split tree to what the ensemble still gets wrong.

Step by step

  1. 1Bucket every feature into histogram bins.
  2. 2Compute gradients for each row.
  3. 3Grow the tree by splitting the leaf with the greatest loss reduction.
  4. 4Add it to the ensemble and repeat.

Where it is used

Large tabular datasets with many features.

Watch out for

Leaf-wise growth can overfit small datasets unless the number of leaves is limited.

Related