ml-kmeans
    Preparing search index...

    Function kmeans

    • K-means algorithm

      Parameters

      • data: number[][]

        Points in the format to cluster [x,y,z,...]

      • K: number

        Number of clusters

      • Optionaloptions: Options

        Option object

      Returns KMeansResult

      • Cluster identifier for each data dot and centroids with the following fields: 'clusters': Array of indexes for the clusters. 'centroids': Array with the resulting centroids. 'iterations': Number of iterations that took to converge