Enum linfa_clustering::KMeansInit[][src]

#[non_exhaustive]
pub enum KMeansInit<F: Float> {
    Random,
    Precomputed(Array2<F>),
    KMeansPlusPlus,
    KMeansPara,
}

Specifies centroid initialization algorithm for KMeans.

Variants (Non-exhaustive)

Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Random

Pick random points as centroids.

Precomputed(Array2<F>)

Precomputed list of centroids, represented as an array of (n_centroids, n_features).

KMeansPlusPlus

K-means++ algorithm. Using this over random initialization causes K-means to converge faster for almost all cases, since K-means++ produces better centroids.

KMeansPara

K-means|| algorithm, a parallelized version of K-means++. Performs much better than K-means++ when the number of clusters is large (>100) while producing similar centroids, so use this for larger datasets. Details on the algorithm can be found here.

Trait Implementations

impl<F: Clone + Float> Clone for KMeansInit<F>[src]

impl<F: Debug + Float> Debug for KMeansInit<F>[src]

impl<F: PartialEq + Float> PartialEq<KMeansInit<F>> for KMeansInit<F>[src]

impl<F: Float> StructuralPartialEq for KMeansInit<F>[src]

Auto Trait Implementations

impl<F> RefUnwindSafe for KMeansInit<F> where
    F: RefUnwindSafe

impl<F> Send for KMeansInit<F>

impl<F> Sync for KMeansInit<F>

impl<F> Unpin for KMeansInit<F>

impl<F> UnwindSafe for KMeansInit<F> where
    F: RefUnwindSafe

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Pointable for T

type Init = T

The type for initializers.

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,