pub trait Clusterer {
// Required methods
fn name(&self) -> &'static str;
fn fit(&mut self, frame: &Frame) -> Result<()>;
fn predict(&self, frame: &Frame) -> Result<Vec<f64>>;
}Expand description
An unsupervised cluster model: fit on features alone (no target), then assign each row a cluster label.
This is the contract for inductive clusterers (k-means, GMM) that can label
unseen data. Transductive methods that only label their training data (e.g.
DBSCAN) expose a fit_predict inherent method instead.
Required Methods§
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".