/**
 * Calibration curve — binned "if eval says X, what does reality show?"
 *
 * Companion to correlationStudy. Raw correlation is a single number;
 * the calibration curve shows *where* the eval is well-calibrated vs
 * overconfident / underconfident. Buckets the eval metric, computes
 * mean outcome per bucket, reports expected-calibration-error (ECE).
 */
import type { TraceStore } from '../trace/store';
import type { EvalMetricSpec } from './correlation-study';
import type { OutcomeStore } from './outcome-store';
export interface CalibrationBin {
    lower: number;
    upper: number;
    n: number;
    evalMean: number;
    outcomeMean: number;
    /** |outcomeMean − evalMean|; contributes to ECE weighted by n/total. */
    gap: number;
}
export interface CalibrationReport {
    evalMetric: string;
    outcomeMetric: string;
    n: number;
    bins: CalibrationBin[];
    /** Expected Calibration Error — Σ (n_i/N) × |outcomeMean_i − evalMean_i|. */
    ece: number;
    /** Max bin gap — upper bound on miscalibration. */
    maxGap: number;
}
export interface CalibrationOptions {
    bins?: number;
    /** Equal-width (fixed bin edges) or equal-frequency (quantile bins). */
    binning?: 'equal-width' | 'equal-frequency';
    /** Clip eval values to [lo, hi] before binning. */
    range?: {
        lo: number;
        hi: number;
    };
}
export interface CalibrationPair {
    evalScore: number;
    outcome: number;
}
export declare function calibrationCurve(traceStore: TraceStore, outcomeStore: OutcomeStore, evalMetric: EvalMetricSpec, outcomeMetric: string, options?: CalibrationOptions): Promise<CalibrationReport | null>;
export declare function calibrationFromPairs(inputPairs: CalibrationPair[], evalMetric: string, outcomeMetric: string, options?: CalibrationOptions): CalibrationReport | null;
//# sourceMappingURL=calibration.d.ts.map