Skip to content
ML Academy

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

Set a minimum leaf size when tree-model probabilities feed a ranking or a threshold

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

Summary: situation, action, reason, boundary

  1. Situation

    A single tree or a forest with fully grown leaves outputs probabilities that bunch at 0 and 1, and a review list or cut-off is built on them.

  2. Action

    Tune min_samples_leaf upward from about 5 using log loss or Brier score and precision at the review budget, not accuracy, and compare reliability curves before and after.

  3. Reason

    A tree's class probability is the class fraction in its leaf, so it is noisy when leaves are tiny; larger leaves average over more rows, and a forest averages tree probabilities again.

  4. Boundary

    Rare-event scoring and ranking with trees, random forests and extra-trees.

Symptom or risk

Leaves with few rows give fractions such as 1 of 1; cases tie at the extremes and the probabilities are overconfident.

Exceptions

For accuracy-only tasks with few classes, a leaf size of 1 is often the best choice.

Trade-offs

Larger leaves smooth away small but real pockets of risk and can lower recall for tiny segments.

Pitfalls

Tuning on accuracy, which barely moves, and concluding that leaf size does not matter.

Example

Hypothetical: a leaf with 2 no-shows out of 2 rows scores 1.0; a leaf with 14 out of 40 scores 0.35.

Lessons and concepts

Claims and their sources