Skip to content
ML Academy

Classical ML, validation, metrics, interpretation, debugging · insight-1177

Use a Poisson objective for count targets in boosted trees and judge it on Poisson deviance

Evidence type
documented fact
Difficulty
medium
Roles
Data scientist, ML engineer
Industries
insurance, aviation, logistics

Summary: situation, action, reason, boundary

  1. Situation

    Counts or frequencies (no-shows per flight, claims per policy) are predicted by a boosted tree with squared error.

  2. Action

    Switch to a Poisson loss (loss='poisson' in HistGradientBoostingRegressor, or the equivalent count objective in other libraries after checking their documentation). Model rates with exposure as weight, and compare held-out mean Poisson deviance and MAE for both models.

  3. Reason

    The Poisson deviance matches the mean-variance relationship of counts and a log link keeps predictions non-negative.

  4. Boundary

    Count and frequency targets with many small values.

Symptom or risk

Squared error can predict negative counts, assumes constant variance although count variance grows with the mean, and lets the largest counts dominate the fit.

Exceptions

Large counts are close to normal, so squared error loses little.

Trade-offs

Effects become multiplicative, and the loss is sensitive to predictions near zero.

Pitfalls

Reporting only MAE, which hides that the Poisson model is better calibrated on small counts.

Lessons and concepts

Claims and their sources