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
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
//! # ferrolearn-cluster
//!
//! Clustering algorithms for the ferrolearn machine learning framework.
//!
//! This crate provides unsupervised clustering methods:
//!
//! - **[`KMeans`]** — K-Means clustering with k-Means++ initialization
//! and parallelized assignment via Rayon (REQ-6).
//! - **[`DBSCAN`]** — Density-Based Spatial Clustering of Applications
//! with Noise (REQ-7).
//! - **[`GaussianMixture`]** — Gaussian Mixture Models via the
//! Expectation-Maximisation algorithm, with four covariance types
//! (full, tied, diagonal, spherical) (REQ-3).
//! - **[`AgglomerativeClustering`]** — Bottom-up hierarchical clustering
//! with Ward, Complete, Average, and Single linkage (REQ-5).
//! - **[`MeanShift`]** — Non-parametric mode-seeking clustering (REQ-23).
//! - **[`SpectralClustering`]** — Graph Laplacian eigenmap clustering (REQ-23).
//! - **[`OPTICS`]** — Ordering Points To Identify the Clustering Structure (REQ-23).
//! - **[`Hdbscan`]** — Hierarchical DBSCAN with automatic cluster detection.
//! - **[`Birch`]** — Balanced Iterative Reducing and Clustering using Hierarchies.
//! - **[`LabelPropagation`]** — Semi-supervised label propagation through a similarity graph.
//! - **[`LabelSpreading`]** — Semi-supervised label spreading via normalized graph Laplacian.
//! - **[`AffinityPropagation`]** — Exemplar-based clustering via message passing,
//! automatically determines number of clusters.
//! - **[`BisectingKMeans`]** — Divisive hierarchical clustering that recursively
//! bisects the largest cluster.
//! - **[`BayesianGaussianMixture`]** — Variational Bayesian GMM with
//! automatic component pruning via Dirichlet Process or Dirichlet
//! Distribution priors.
//! - **[`FeatureAgglomeration`]** — Hierarchical clustering of features
//! (columns) with pooling-based dimensionality reduction.
//!
//! # Design
//!
//! All algorithms follow the compile-time safety pattern:
//!
//! - The unfitted config struct implements [`Fit`](ferrolearn_core::Fit)
//! with `Y = ()` (unsupervised).
//! - [`KMeans`] produces [`FittedKMeans`], which implements
//! [`Predict`](ferrolearn_core::Predict) (assign to nearest centroid)
//! and [`Transform`](ferrolearn_core::Transform) (distance to each centroid).
//! - [`DBSCAN`] produces [`FittedDBSCAN`], which only stores labels and
//! core sample indices — it does **not** implement `Predict`.
//! - [`GaussianMixture`] produces [`FittedGaussianMixture`], which
//! implements [`Predict`](ferrolearn_core::Predict) (hard assignment) and
//! [`Transform`](ferrolearn_core::Transform) (soft responsibilities).
//! - [`AgglomerativeClustering`] produces [`FittedAgglomerativeClustering`],
//! which stores labels and the merge tree — it does **not** implement
//! `Predict`.
//! - [`MeanShift`] produces [`FittedMeanShift`], which implements
//! [`Predict`](ferrolearn_core::Predict) (assign to nearest center).
//! - [`SpectralClustering`] produces [`FittedSpectralClustering`], which stores
//! labels — it does **not** implement `Predict`.
//! - [`OPTICS`] produces [`FittedOPTICS`], which stores the reachability
//! ordering and distances — it does **not** implement `Predict`.
//! - [`Hdbscan`] produces [`FittedHdbscan`], which stores labels and
//! probabilities — it does **not** implement `Predict`.
//! - [`Birch`] produces [`FittedBirch`], which stores labels and subcluster
//! centers — it does **not** implement `Predict`.
//! - [`LabelPropagation`] produces [`FittedLabelPropagation`], which implements
//! [`Predict`](ferrolearn_core::Predict) for new data via nearest-neighbor lookup.
//! - [`LabelSpreading`] produces [`FittedLabelSpreading`], which implements
//! [`Predict`](ferrolearn_core::Predict) for new data via nearest-neighbor lookup.
//! - [`AffinityPropagation`] produces [`FittedAffinityPropagation`], which stores
//! exemplar indices and labels — it does **not** implement `Predict`.
//! - [`BisectingKMeans`] produces [`FittedBisectingKMeans`], which implements
//! [`Predict`](ferrolearn_core::Predict) (assign to nearest center).
//! - [`BayesianGaussianMixture`] produces [`FittedBayesianGaussianMixture`],
//! which implements [`Predict`](ferrolearn_core::Predict) (hard assignment).
//! - [`FeatureAgglomeration`] produces [`FittedFeatureAgglomeration`], which
//! implements [`Transform`](ferrolearn_core::Transform) (pool features).
//!
//! # Float Generics
//!
//! All algorithms are generic over `F: num_traits::Float + Send + Sync + 'static`,
//! supporting both `f32` and `f64`.
// Re-export the main types at the crate root.
pub use ;
pub use ;
pub use ;
pub use ;
pub use ;
pub use ;
pub use ;
pub use ;
pub use ;
pub use ;
pub use ;
pub use ;
pub use ;
pub use ;
pub use ;
pub use ;