import { DataMatrix, LabelVector } from '../clustering/types'; /** Distance metric accepted by the noise-aware internal validation metrics. */ export type ValidationMetric = 'euclidean' | 'cosine'; /** * s(i) = (b - a) / max(a, b), where a = mean intra-cluster distance, * b = mean distance to the nearest other cluster. * * Noise (`-1`) samples are excluded; one score per non-noise sample is returned. * All-noise input throws. One valid cluster after noise filtering → all-zeros (defined). * Single-cluster input with no noise throws. * * @throws Error if fewer than 2 valid clusters remain after excluding noise */ export declare function silhouette_samples(X: DataMatrix, labels: LabelVector, metric?: ValidationMetric): number[]; /** @throws Error if all labels are noise, fewer than 2 clusters, or labels length mismatch */ export declare function silhouette_score(X: DataMatrix, labels: LabelVector, metric?: ValidationMetric): number; /** * Useful for large datasets where all-pairs distance is prohibitive. * Degenerate contract mirrors silhouette_samples: all-noise throws; one valid * cluster after filtering → defined 0; single-cluster with no noise throws. * * @throws Error if all labels are noise, fewer than 2 clusters, or labels length mismatch */ export declare function silhouette_score_subset(X: DataMatrix, labels: LabelVector, sample_indices: number[], metric?: ValidationMetric): number;