/** * The statistics the default evals stand on (DES-DEFAULT-EVALS-001 §6, the same rules as DES-RUNS-REVIEW-001 §4). * Pure and deterministic: the same cases give the same numbers, byte for byte. * * - Rates: the Wilson score interval (95 %), honest at small n and always inside [0, 1]. * - Below {@link MIN_CASES} a figure is "too few cases": the value is still shown, no trend is called. * - Calibration (ECE over 10 bins, Brier) needs {@link MIN_CALIBRATION} confident answers. * * One statistics module: the Wilson interval and the comparison rule are the run review's (`insights/stats.ts`); * this module only shapes them into the default evals' wire (`Rate`) and adds calibration. */ import type { Calibration, Rate, TrendWord } from './types.js'; export declare const MIN_CASES = 5; export declare const MIN_CALIBRATION = 20; export declare function round4(v: number | null): number | null; /** Wilson score interval for `k` of `n` (95 %). Value and bounds are `null` when n is 0. */ export declare function rate(k: number, n: number, min?: number): Rate; /** Calibration of a confidence against being right: ECE over 10 equal-width bins, and the Brier score. */ export declare function calibration(points: ReadonlyArray<{ confidence: number; correct: boolean; }>): Calibration; /** * This run's rate against the last run's point value, by the run review's rule (`compare`): notable only when both * reach {@link MIN_CASES} and this run's interval EXCLUDES the previous value. Higher agreement is better. */ export declare function trendOf(now: Rate, previous: { value: number | null; n: number; } | null): TrendWord; //# sourceMappingURL=stats.d.ts.map