Function train_kmeans

Source
pub fn train_kmeans<T: ArrowPrimitiveType>(
    array: &[T::Native],
    dimension: usize,
    k: usize,
    max_iterations: u32,
    redos: usize,
    rng: impl Rng,
    distance_type: DistanceType,
    sample_rate: usize,
) -> Result<ArrayRef>
where T::Native: Dot + L2 + Normalize, PrimitiveArray<T>: From<Vec<T::Native>>,
Expand description

Train KMeans model and returns the centroids of each cluster.