linfa_clustering/
lib.rs

1//! `linfa-clustering` aims to provide pure Rust implementations
2//! of popular clustering algorithms.
3//!
4//! ## The big picture
5//!
6//! `linfa-clustering` is a crate in the `linfa` ecosystem, a wider effort to
7//! bootstrap a toolkit for classical Machine Learning implemented in pure Rust,
8//! kin in spirit to Python's `scikit-learn`.
9//!
10//! You can find a roadmap (and a selection of good first issues)
11//! [here](https://github.com/LukeMathWalker/linfa/issues) - contributors are more than welcome!
12//!
13//! ## Current state
14//!
15//! Right now `linfa-clustering` provides the following clustering algorithms:
16//! * [K-Means](KMeans)
17//! * [DBSCAN](Dbscan)
18//! * [Approximated DBSCAN](AppxDbscan) (Currently an alias for DBSCAN, due to its superior
19//!     performance)
20//! * [Gaussian-Mixture-Model](GaussianMixtureModel)
21//! * [OPTICS](OpticsAnalysis)
22//!
23//! Implementation choices, algorithmic details and tutorials can be found in the page dedicated to the specific algorithms.
24mod dbscan;
25mod gaussian_mixture;
26#[allow(clippy::new_ret_no_self)]
27mod k_means;
28mod optics;
29
30pub use dbscan::*;
31pub use gaussian_mixture::*;
32pub use k_means::*;
33pub use optics::*;
34
35// Approx DBSCAN is currently an alias for DBSCAN, due to the old Approx DBSCAN implementation's
36// lower performance and outdated dependencies
37
38use linfa_nn::distance::L2Dist;
39pub type AppxDbscanValidParams<F, N> = DbscanValidParams<F, L2Dist, N>;
40pub type AppxDbscanParams<F, N> = DbscanParams<F, L2Dist, N>;
41pub type AppxDbscanParamsError = DbscanParamsError;
42pub type AppxDbscan = Dbscan;