1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
//! # 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:** [`KMeans`] with the Arthur-Vassilvitskii
//! [`k-means++`](https://en.wikipedia.org/wiki/K-means%2B%2B)
//! 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_samples` classifier. Reports per-point
//! `Core` / `Border` / `Noise` roles alongside the cluster label.
//! * **Hierarchical:** [`AgglomerativeClustering`] with `Single`,
//! `Complete`, `Average`, or `Ward` linkage. Uses the Lance-Williams
//! update recurrence so the whole dendrogram is built in `O(n² · log n)`
//! time with `O(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 is `O(n · k · d)`. `k-means++`
//! pre-fit is `O(n · k · d)` in expectation and guarantees an
//! `O(log k)`-competitive initial inertia (Arthur & Vassilvitskii 2007).
//! * `DBSCAN`: naive neighbour lookup is `O(n²)`; use
//! [`solow-neighbors`](https://docs.rs/solow-neighbors) `KDTree`
//! externally to obtain `O(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.
pub use AffinityPropagation;
pub use ;
pub use BayesianGaussianMixture;
pub use Birch;
pub use ;
pub use ;
pub use Hdbscan;
pub use ;
pub use MeanShift;
pub use ;
pub use Optics;
pub use SpectralClustering;
/// Commonly-used imports.