Skip to content

docs(methodology): the no-distribution penalty is a bias, and more rows show it plainer - #99

Merged
TMHSDigital merged 1 commit into
mainfrom
docs/distribution-penalty-by-n
Sep 25, 2026
Merged

TMHSDigital merged 1 commit into
mainfrom
docs/distribution-penalty-by-n

Conversation

@TMHSDigital

Copy link
Copy Markdown
Owner

Part of #8. It answers "How much worse is it, as a function of n?"

scripts/distribution_penalty.py repeats METHODOLOGY's comparison on the same mock (accuracy 0.75, four options, a pure temperature injected into the log probabilities) at 500 to 20,000 rows, averaged over 5 seeds. Each run is recalibrated twice on the same rows, once with the distributions and once with the top line only:

rows injected skew floor multiclass binary
500 T = 2.0 0.0489 0.0515 (1.05x) 0.1815 (2.88x)
2,000 T = 2.0 0.0251 0.0306 (1.22x) 0.1836 (5.78x)
5,000 T = 2.0 0.0158 0.0181 (1.14x) 0.1756 (8.80x)
20,000 T = 2.0 0.0079 0.0113 (1.43x) 0.1756 (17.23x)
20,000 T = 0.5 0.0079 0.0113 (1.43x) 0.0210 (2.92x)

The answer to the issue's question: the penalty persists, so the issue's own framing makes it "a property of the transport". The top-line form's leftover ECE is flat in absolute terms at every size, about 0.18 for T = 2 and 0.02 for T = 0.5. Only its ratio to the falling floor grows. On the overconfident case, the penalty is hidden at a few hundred rows and obvious by a few thousand.

A check on the multiclass column: it gives identical figures for both skews, and I reran it with no skew injected (T = 1) and got the same figures again: 1.05x at 500 and 1.43x at 20,000. So the fit inverts the injection exactly, and the drift above 1.0 is the mock's own baseline calibration, not something the fit left behind.

Already done before this PR: "Should the report say this at the point of use?" The report already prints a Distribution caveat, and the recalibration section's note, for any arm that returned a probability without a distribution.

Still open on #8: whether a monotone fit such as isotonic regression does better on a top-line-only column. That's a new correction method, so it needs its own design.

Only METHODOLOGY, CHANGELOG and the new script change. The gate, the site checks and the prose checks all pass.

🤖 Generated with Claude Code

…ws show it plainer

scripts/distribution_penalty.py repeats METHODOLOGY's one-size comparison
from 500 to 20,000 rows. The top-line form's leftover miscalibration stays
about 0.18 on an underconfident model and 0.02 on an overconfident one at
every size while the floor falls, so its ratio to the floor grows from 2.9
to 17 times. The multiclass form inverts the injected temperature exactly,
landing where the same mock does with no skew at all.

Part of #8: whether a monotone fit such as isotonic regression does better
on a scalar-only column is still open.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@TMHSDigital
TMHSDigital merged commit a6e4802 into main Sep 25, 2026
23 checks passed
@TMHSDigital
TMHSDigital deleted the docs/distribution-penalty-by-n branch September 25, 2026 11:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant