export interface CentroidWithInformation { centroid: number[]; error: number; size: number; } export declare class KMeansResult { /** * Result of the kmeans algorithm * @param clusters - the cluster identifier for each data dot * @param centroids - the K centers in format [x,y,z,...], the error and size of the cluster * @param converged - Converge criteria satisfied * @param iterations - Current number of iterations * @param distance - Distance function to use between the points * @class */ clusters: number[]; centroids: number[][]; converged: boolean; iterations: number; distance: (a: number[], b: number[]) => number; constructor(clusters: number[], centroids: number[][], converged: boolean, iterations: number, distance: (a: number[], b: number[]) => number); /** * Allows to compute for a new array of points their cluster id * @param data - the [x,y,z,...] points to cluster * @returns - cluster id for each point */ nearest(data: number[][]): number[]; /** * Returns the centroid, mean error, and size of each cluster. * The error of an empty cluster is `-1`. * @ignore * @param data - the [x,y,z,...] points to cluster * @returns for each cluster, its centroid, mean error, and size. */ computeInformation(data: number[][]): CentroidWithInformation[]; } //# sourceMappingURL=KMeansResult.d.ts.map