/** * Classification metrics for the System One benchmark (T12495). * * Two-label sites report precision, recall, F1 and false-positive rate for * their positive class. The multi-class observation-type site reports macro * averages over the labels present in the gold set (one-vs-rest per label). * * @task T12495 * @epic T12486 */ /** One scored prediction. */ export interface BenchPrediction { /** Gold label. */ readonly gold: string; /** Predicted label. */ readonly predicted: string; } /** Classification quality over a set of predictions. */ export interface BenchClassificationMetrics { /** Scored predictions. */ readonly n: number; /** Share predicted correctly. */ readonly accuracy: number | null; /** Precision (positive class, or macro average). */ readonly precision: number | null; /** Recall (positive class, or macro average). */ readonly recall: number | null; /** F1 (positive class, or macro average). */ readonly f1: number | null; /** False-positive rate (positive class, or macro average one-vs-rest). */ readonly falsePositiveRate: number | null; } /** * Score predictions. * * @param preds - Gold and predicted labels. * @param positive - The positive class of a two-label site; `null` → macro averages. * @returns The metrics (`null` where undefined, e.g. no positives predicted). */ export declare function classificationMetrics(preds: readonly BenchPrediction[], positive: string | null): BenchClassificationMetrics; /** p50 and p95 of latencies, in ms. */ export interface BenchLatency { /** Median. */ readonly p50Ms: number | null; /** 95th percentile. */ readonly p95Ms: number | null; } /** * Latency percentiles. * * @param samples - Latencies in ms. * @returns p50 and p95 (nearest rank). */ export declare function latencyOf(samples: readonly number[]): BenchLatency; //# sourceMappingURL=metrics.d.ts.map