Skip to content
Quantoros

2026-11-19

Interview question of the day

One question every day — machine learning, statistics, coding or quant. Try to answer before you open the solution.

Classic MLLevel: IntermediateRare target aggregates

Why shrink a rare category's target mean toward the global target mean?

Hints
  • Compare categories with two and two thousand observations.
  • The prior contribution should matter more for sparse evidence.

Answer

A small category estimate is noisy. Smoothing trades some category-specific detail for lower variance; stronger smoothing gives more weight to the global mean.

Source and licence: scikit-learn 1.7.2 — preprocessing · BSD-3-Clause · answer: Quantoros editorial

Share

Interview question of the day · Classic ML

Why shrink a rare category's target mean toward the global target mean?

Answer: https://quantoros.dev/interview/q/twok-classic-target-smoothing

Get the question of the day by email

New guides and one interview question a day. No spam; unsubscribe any time.