Skip to main content

k-means Clustering

K-means clustering.

Options#

  • data | object (required): object of value arrays. Default: none.
  • variables | array<string> (required): names of variables used for clustering. Default: none.
  • K | number: number of clusters. Default: 3.
  • initialization | string: initialization method (kmeans++, random, or mostDistant). Default: 'kmeans++'.
  • onResult | function: callback invoked with model object. Default: onResult() {}.

Examples#

Live Editor
Result
Last updated on by Planeshifter