pub fn kmeans_clustering(d: u32, k: u32, x: &[f32]) -> Result<KMeansResult>
Expand description

Simplified interface for k-means clustering.

  • d: dimension of the data
  • k: nb of output centroids
  • x: training set (size n * d)

The number of points is inferred from x and k.

Returns the final quantization error and centroids (size k * d).