import { DataMatrix, LabelVector } from '../clustering/types'; import type { ValidationMetric } from './silhouette'; /** * Formula: DB = (1/k) * sum(max_{i≠j}(R_{ij})) * where R_{ij} = (s_i + s_j) / d_{ij}, * s_i = mean distance of cluster i's points to its centroid, * d_{ij} = distance between centroids of i and j. * * Noise (`-1`) samples are excluded before centroid/dispersion computation. * When noise leaves fewer than two clusters the score is a defined `0` rather than an error. * * @throws Error if there are fewer than 2 clusters and no noise was present */ export declare function davies_bouldin(X: DataMatrix, labels: LabelVector, metric?: ValidationMetric): number; /** Manages tensor lifecycle manually (no tf.tidy wrapper) to bound peak memory for large datasets. */ export declare function davies_bouldin_efficient(X: DataMatrix, labels: LabelVector, metric?: ValidationMetric): number;