a-cut-point-is-a-fitted-parameter-not-a-setting

Solid

Use whenever a column of your submission is decided by comparing a continuous score against a number you chose -- whether to commit an answer or declare the row unanswerable, whether to flag a borderline case, which output to emit when the model is unsure. Covers the two questions that number silently answers, why it gets fitted on the smallest labelled sample in the run and then applied to the largest split, the statistic it should have been swept on, and the commit-rate print-out that tells you it is on the wrong side of the tail.

AI & Automation 805 stars 25 forks Updated 2 weeks ago NOASSERTION

Install

View on GitHub

Quality Score: 82/100

Stars 20%
97
Recency 20%
90
Frontmatter 20%
70
Documentation 15%
100
Issue Health 10%
80
License 10%
100
Description 5%
100

Skill Content

# The cut point is a model parameter. Fit it like one or you guessed it Most submissions of this shape contain a scalar somebody typed: the margin above which you commit an answer, the probability above which you flag a row, the confidence below which you fall back to a default. It looks like configuration. It is a parameter of the shipped model, and it frequently moves the score more than the model does, because it sets the label on every row in the tail — which is where all the undecided rows are. Three things go wrong with it. They are independent and they compound. ## 1. It is fitted on the smallest sample you own and applied to the largest You fit the model on tens of thousands of rows, then pick the cut point off whatever labelled subset you happened to score — a few hundred, chosen because that is what inference finished on. That estimate is worse than its sample size suggests. You are taking an **argmax over a grid**, not a mean: the noise is selected for, so the peak of an accuracy-versus-cut-point curve on 250 rows is both biased upward in sample and badly located out of it. What to do: - **Write the row count next to the number.** `thresh=-11.5 (fitted on n=250)`. If that count is two orders of magnitude smaller than the split you apply it to, this is the least-evidenced thing in your submission and you now know it. - **Refit whenever more labelled rows exist.** Refitting costs no inference — the scores are already on disk — so it is the cheapest scor...

Details

Author
tangxiangru
Repository
tangxiangru/AutoR
Created
6 months ago
Last Updated
2 weeks ago
Language
Python
License
NOASSERTION

Integrates with

Similar Skills

Semantically similar based on skill content — not just same category

AI & Automation Solid

add-the-baseline-back-on-the-split-you-cannot-score

Use at study design, implementation and every write thereafter, whenever the value you submit is assembled from parts - a fitted baseline plus a model's residual, a level plus a shape, a de-trended prediction that has to be re-trended, any inverse transform - and the validation arrays and the graded arrays are produced by separate calls. Covers assembling every split through one function, using the baseline you already fitted as a label-free reference vector on the graded split, why row count, header, dtype and finiteness cannot see this class of error, and putting the gate inside the writer rather than in a script somebody has to remember to run.

805 Updated 2 weeks ago
tangxiangru
AI & Automation Solid

a-scoreable-file-in-the-first-hour

Use at the first stage of a run whose deliverable is a predictions file, and again at every stage when one still does not exist. Covers why a trivial submission written early dominates a good one written late, what the first version should contain, and how to improve it in place without ever leaving it invalid.

805 Updated 2 weeks ago
tangxiangru
AI & Automation Solid

count-exact-rows-before-you-fit-a-correction

Use at implementation and experimentation when the target may be a deterministic function of the inputs - a computed score, a derived column, a simulator or rule-based output - your reconstruction of it is close but not equal, and the next thing you planned was to train a model on the difference. Covers the fraction-reproduced-exactly measure that mean error hides, how to choose its tolerance from the residuals instead of by taste, how to read a residual that takes only a few distinct values, and the gate a learned correction must clear before it goes on top of an analytic base.

805 Updated 2 weeks ago
tangxiangru