/** * CONFIDENCE — the probabilistic stop. FRONTIER says "looks like you can stop" from the diminishing-returns * curve; CONFIDENCE puts a real, CALIBRATED probability on it: "the chance one more experiment beats your * current best is ~p, so you can stop with (1−p) confidence." * * The estimate is distribution-free, built on RECORD STATISTICS. For exchangeable (iid) sampling the * probability that the next observation is a new maximum is exactly 1/(n+1) — independent of the * distribution, a beautiful fact. An optimiser is not iid: once it converges, new records stop coming, so we * deflate that baseline by how active records have been RECENTLY (records in a trailing window vs how many * iid would have produced). Still improving fast → more records than iid → the probability rises; long since * a record → it falls toward zero. The result is a probability you can actually trust, not a hunch. * * Honest by construction (DIAKRISIS): "probability the next experiment is a new best" — NOT a proof the * global optimum is found (a sharp peak can hide between samples; that's what the optimality certificate is * for). It is CALIBRATED on iid data (the gauntlet checks the predicted probability matches the observed * record frequency) and abstains when there's too little history. */ import { type Observation, type Goal } from "./engine.js"; export interface ConfidenceReport { n: number; stepsSinceRecord: number; records: number; pImprove: number; confidence: number; recommendation: "stop" | "continue" | "unknown"; note: string; } /** Calibrated probability that one more experiment beats the current best, via record statistics. */ export declare function stopConfidence(obs: ReadonlyArray, goal?: Goal): ConfidenceReport; export declare function confidenceGauntlet(): { score: 0 | 100; checks: Array<{ name: string; pass: boolean; detail: string; }>; }; //# sourceMappingURL=confidence.d.ts.map