Skip to main content

Function: calibrateTierCutoffs()

calibrateTierCutoffs(scores, opts?): TierCutoffs

Defined in: src/lib/pipeline/score.ts:124

Calibrate tier cutoffs from the actual cohort score distribution (ADR-0040 / review fix). The fixed 70/40 defaults are unreachable with the data currently populated, so the batch score pass derives cutoffs by RANK: the top tier1Count facilities clear tier1, the next tier2Count clear tier2.

Cutoffs are floored at 1 so a 0-score facility (no signal at all) can never be promoted out of Tier-3, and tier2 is clamped <= tier1 so deriveTier stays monotonic. Empty cohort → the defaults.

Parameters

scores

readonly number[]

opts?

tier1Count?

number

tier2Count?

number

Returns

TierCutoffs