import { type PairedQualificationSample } from './quality.js'; /** Preregistered bounds for a categorical drift comparison. Choose them before observing the candidate. */ export interface CategoricalDriftPlan { minimumN: number; /** Upper bound on total variation distance, in [0, 1]. */ maximumTotalVariation: number; /** Upper bound on the population stability index. */ maximumPopulationStability: number; } export interface CategoricalDriftReport { schemaVersion: 'decision-categorical-drift/v1'; referenceN: number; candidateN: number; categories: string[]; reference: Record; candidate: Record; totalVariation: number; populationStability: number; decision: 'stable' | 'drift' | 'insufficient-evidence'; reasons: string[]; } /** * Compares two categorical samples: model outputs for output drift, or input * slice membership for population drift. Too few observations are * `insufficient-evidence`, never `stable`. */ export declare function measureCategoricalDrift(reference: readonly string[], candidate: readonly string[], plan: CategoricalDriftPlan): CategoricalDriftReport; export interface LabelStabilityReport { sampleN: number; changedN: number; changedRate: number; changedWilson95: readonly [number, number]; maximumChangedRate: number; decision: 'stable' | 'drift' | 'insufficient-evidence'; } /** * Repeated-run label movement against a preregistered bound. Stable only when * the whole 95% interval is within the bound; drift only when it is entirely * above; otherwise the sample cannot decide. */ export declare function measureLabelStability(pairs: readonly PairedQualificationSample[], maximumChangedRate: number): LabelStabilityReport; //# sourceMappingURL=drift.d.ts.map