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
116
117
118
119
120
121
//! # datarust
//!
//! Scikit-Learn Preprocessing in Rust. A modular, dependency-free
//! data-preprocessing library built on a lightweight `Matrix` type
//! backed by `Vec<Vec<f64>>`.
//!
//! ## Modules
//!
//! - [`scaler`] — StandardScaler, MinMaxScaler, RobustScaler, MaxAbsScaler, Normalizer,
//! Binarizer, KBinsDiscretizer, QuantileTransformer, PowerTransformer
//! - [`encoder`] — LabelEncoder, OneHotEncoder, OrdinalEncoder, TargetEncoder, FrequencyEncoder
//! - [`imputer`] — SimpleImputer (mean / median / most_frequent / constant) and KnnImputer
//! - [`polynomial`] — PolynomialFeatures
//! - [`selection`] — VarianceThreshold, SelectKBest
//! - [`decomposition`] — PCA, TruncatedSVD
//! - [`linear_model`] — LinearRegression, Ridge, Lasso, LogisticRegression
//! - [`metrics`] — regression metrics (MSE, MAE, R², ...) and classification metrics (accuracy, F1, ...)
//! - [`model_selection`] — train_test_split, KFold, StratifiedKFold, cross_val_score
//! - [`pipeline`] — sequential Transformer pipelines
//! - [`compose`] — ColumnTransformer
//! - [`cluster`] — KMeans (Lloyd's algorithm, k-means++ initialization)
//! - [`function_transformer`] — wrap arbitrary functions as a Transformer
//! - [`stats`] — column and 1-D statistics, covariance and correlation matrices
//! - [`matrix`] — `Matrix`, `StrMatrix` and `SparseMatrix` data containers
//! - [`serialize`] — JSON save/load (requires the `serde` feature)
//! - [`transformer_kind`] — type-erased `TransformerKind` enum wrapper
//! - [`categorical_kind`] — type-erased `CategoricalTransformerKind` enum wrapper for encoders
//! - [`target_kind`] — type-erased `TargetTransformerKind` enum wrapper for supervised encoders
//!
//! All numeric transformers implement the [`Transformer`] trait. Supervised
//! estimators implement [`Predictor`] (`fit` with features + target, then
//! `predict`); regressors additionally implement [`Regressor`] and classifiers
//! implement [`Classifier`] / [`PredictProba`] where appropriate.
//! Categorical encoders (OneHot, Ordinal, Frequency) implement the
//! [`CategoricalTransformer`] trait.
//! The [`TargetEncoder`] implements the [`TargetTransformer`] trait (requires
//! target values during `fit`).
//! The [`LabelEncoder`] implements the [`LabelTransformer`] trait (1-D
//! string ↔ int mapping).
//! Clustering estimators (KMeans) implement the [`Clusterer`] trait (`fit` on
//! `X` only, then `predict` returning cluster indices).
//!
//! [`TargetEncoder`]: encoder::TargetEncoder
//! [`LabelEncoder`]: encoder::LabelEncoder
//!
//! # Features
//!
//! - `serde` — enables JSON serialization via [`serialize`].
//! - `rayon` — enables parallel column/row operations for large datasets.
//! - `matrixmultiply` — enables a tuned pure-Rust GEMM (no system BLAS) for
//! `Matrix::matmul` and covariance computation, speeding up PCA and
//! TruncatedSVD on large dense inputs.
//! - `datasets` — embeds classic toy datasets (Iris, Breast Cancer, Wine,
//! Diabetes) as `const` arrays for examples, tests, and onboarding.
//!
//! The default build has **zero external dependencies**.
/// Error types returned by fallible operations.
/// Wrap arbitrary functions as a [`Transformer`].
/// Compact mapping between original class labels and dense model indices.
/// Shared linear-algebra primitives (Cholesky solver, etc.).
/// Regression & classification estimators: LinearRegression, Ridge, Lasso, LogisticRegression.
/// Model-evaluation metrics: regression (MSE, R², ...) and classification (accuracy, F1, ...).
/// Model selection: train_test_split, KFold, cross_val_score.
/// Sequential transformer pipelines.
/// Generate polynomial feature combinations.
pub use CategoricalTransformerKind;
pub use ;
pub use ;
pub use ;
pub use ;
pub use LabelSpace;
pub use ;
pub use ;
pub use ;
pub use ;
pub use TargetTransformerKind;
pub use ;
pub use TransformerKind;