Initializer

Trait Initializer 

Source
pub trait Initializer: Debug {
    // Required method
    fn init_centroids(
        &self,
        k: usize,
        inputs: &Matrix<f64>,
    ) -> LearningResult<Matrix<f64>>;
}
Expand description

Trait for algorithms initializing the K-means centroids.

Required Methods§

Source

fn init_centroids( &self, k: usize, inputs: &Matrix<f64>, ) -> LearningResult<Matrix<f64>>

Initialize the centroids for the initial state of the K-Means model.

The Matrix returned must have k rows and the same column count as inputs.

Implementors§