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.
  • elbowPlot | boolean: boolean indicating whether to include the elbow plot. Default: false.
  • initialization | string: initialization method (kmeans++, random, or mostDistant). Default: 'kmeans++'.
  • onResult | function: callback invoked with model object. Default: onResult() {}.

Examples

Live Editor
Result
ReferenceError: Provider is not defined