ClusteringModel

Trait ClusteringModel 

Source
pub trait ClusteringModel: SerializableModel {
    // Required methods
    fn n_clusters(&self) -> usize;
    fn predict(&self, data: ArrayView2<'_, f64>) -> Result<Array1<usize>>;
    fn summary(&self) -> Result<Value>;
}
Expand description

Generic clustering model trait

Required Methods§

Source

fn n_clusters(&self) -> usize

Get the number of clusters

Source

fn predict(&self, data: ArrayView2<'_, f64>) -> Result<Array1<usize>>

Predict cluster labels for new data

Source

fn summary(&self) -> Result<Value>

Get model summary as JSON

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§