Expand description
§solow-cluster
Unsupervised clustering for the Solow statistical stack.
The crate ships three families that together cover the classical unsupervised-learning use cases:
- Centroid-based:
KMeanswith the Arthur-Vassilvitskiik-means++initialisation and Lloyd’s iterative refinement. Deterministic under a caller-supplied seed via a portable MMIX-LCG PRNG. - Density-based:
Dbscan— the Ester-Kriegel-Sander-Xu (KDD 1996)ε,min_samplesclassifier. Reports per-pointCore/Border/Noiseroles alongside the cluster label. - Hierarchical:
AgglomerativeClusteringwithSingle,Complete,Average, orWardlinkage. Uses the Lance-Williams update recurrence so the whole dendrogram is built inO(n² · log n)time withO(n²)space.
Every clusterer exposes the classical fit_predict(x) -> labels
call, plus a richer typed result carrying centroids / linkage
matrices / core-point flags when applicable. All types derive
Serialize / Deserialize under the opt-in serde feature.
§Convergence and complexity
KMeans: each Lloyd iteration isO(n · k · d).k-means++pre-fit isO(n · k · d)in expectation and guarantees anO(log k)-competitive initial inertia (Arthur & Vassilvitskii 2007).DBSCAN: naive neighbour lookup isO(n²); usesolow-neighborsKDTreeexternally to obtainO(n log n)for low-dimensional data.AgglomerativeClustering:O(n² · log n)time,O(n²)space via Müllner (2011) Modern hierarchical, agglomerative clustering algorithms.
§Determinism
Every stochastic component (KMeans init, MiniBatchKMeans batch
draws) uses a portable 64-bit MMIX linear-congruential generator
seeded by the caller. Fits are bit-identical across runs and
platforms given a fixed seed and input.
Re-exports§
pub use affinity_propagation::AffinityPropagation;pub use agglomerative::AgglomerativeClustering;pub use agglomerative::DendrogramNode;pub use agglomerative::Linkage;pub use bgmm::BayesianGaussianMixture;pub use birch::Birch;pub use dbscan::Dbscan;pub use dbscan::DbscanResult;pub use dbscan::PointRole;pub use gmm::CovType;pub use gmm::GaussianMixture;pub use hdbscan::Hdbscan;pub use kmeans::KMeans;pub use kmeans::KMeansInit;pub use kmeans::KMeansResult;pub use meanshift::MeanShift;pub use minibatch::BisectingKMeans;pub use minibatch::MiniBatchKMeans;pub use optics::Optics;pub use spectral::SpectralClustering;
Modules§
- affinity_
propagation - Affinity Propagation (Frey-Dueck 2007).
- agglomerative
AgglomerativeClustering— bottom-up hierarchical clustering withSingle,Complete,Average, orWardlinkage.- bgmm
- BayesianGaussianMixture — variational-inference GMM with a stick- breaking Dirichlet-process prior on mixture weights (Blei-Jordan 2006).
- birch
- BIRCH — Balanced Iterative Reducing and Clustering using Hierarchies (Zhang-Ramakrishnan-Livny 1996).
- dbscan
Dbscan— Density-Based Spatial Clustering of Applications with Noise (Ester, Kriegel, Sander & Xu 1996).- gmm
- Gaussian mixture models fit by Expectation-Maximisation (Dempster-Laird-Rubin 1977; Bishop 2006, §9.2).
- hdbscan
- HDBSCAN* — hierarchical DBSCAN with mutual-reachability distances and cluster stability, following Campello-Moulavi-Sander (2013).
- kmeans
KMeans— Lloyd’s algorithm withk-means++initialisation.- meanshift
- Mean-shift clustering (Comaniciu-Meer 2002).
- minibatch
- MiniBatchKMeans (Sculley 2010) and BisectingKMeans (Steinbach- Karypis-Kumar 2000) — two additional centroid-based clusterers.
- optics
- OPTICS (Ankerst-Breunig-Kriegel-Sander 1999) — Ordering Points To Identify the Clustering Structure.
- prelude
- Commonly-used imports.
- spectral
- Spectral clustering (Shi-Malik 2000, Ng-Jordan-Weiss 2001).