UNPKG

spectral-clustering-js

Version:
19 lines (18 loc) 542 B
/** * This class can find the clustering for n clusters OR * can find the best clustering for [2..n] clusters */ export declare class Kmeans1D { private items; private min; private max; private amplitude; constructor(items: number[]); findBestClustering(maxClusters?: number): Array<number>; /** * Finds the best clustering with $nbClusters clusters * @param nbClusters * @returns [centroidsForPoints, centroids] */ tryToCluster(nbClusters: number): [Array<number>, Array<number>]; }