The calibration failure you can predict before training

· Source: Valeriy’s Substack · Field: Technology & Digital — Artificial Intelligence & Machine Learning, Data Science & Analytics · Depth: Advanced, quick

Summary

A surprising calibration failure in logistic regression models is directly predictable from the ratio of feature dimension (d) to sample size (n) before training. An experiment demonstrated that a model with d/n = 0.0025 (50 features, 20,000 samples) was calibrated (Spiegelhalter Z = -0.63, Brier score ~0.033), while an identical model with d/n = 0.10 (200 features, 2,000 samples) failed catastrophically, exhibiting systematic overconfidence (Z = +19.51, Brier score = 0.078). This miscalibration arises because, contrary to classical asymptotic theory, maximum likelihood estimation is systematically biased when d/n is bounded away from zero, inflating coefficients and pushing predicted probabilities towards extremes. This results in overconfident predictions where ranking may remain valid, but the numerical probabilities are not trustworthy.

Key takeaway

For data scientists and ML engineers deploying classification models, you must assess calibration based on your dataset's feature-to-sample ratio. If your d/n ratio is not tiny, assume miscalibration, even with well-specified models. You should compute d/n for production models and run the Spiegelhalter Z statistic on a held-out set to confirm calibration, as high d/n ratios systematically lead to overconfident probability predictions.

Key insights

Logistic regression calibration fails predictably when the feature dimension to sample size ratio (d/n) is not tiny.

Principles

In practice

Topics

Best for: Machine Learning Engineer, Data Scientist, AI Scientist

Related on AIssential

Open in AIssential →

Editorial summary, takeaway, and curation by AIssential. Original article published by Valeriy’s Substack.