Trait rusty_machine::learning::k_means::Initializer [] [src]

pub trait Initializer: Debug {
    fn init_centroids(&self, k: usize, inputs: &Matrix<f64>) -> Result<Matrix<f64>, Error>;
}

Trait for algorithms initializing the K-means centroids.

Required Methods

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

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