Function faiss::cluster::kmeans_clustering
source · pub fn kmeans_clustering(d: u32, k: u32, x: &[f32]) -> Result<KMeansResult>
Expand description
Simplified interface for k-means clustering.
d
: dimension of the datak
: nb of output centroidsx
: training set (sizen * d
)
The number of points is inferred from x
and k
.
Returns the final quantization error and centroids (size k * d
).