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
//! # 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
//! - [`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.
//! Regression estimators implement the [`Regressor`] trait
//! (`fit` with features + target, then `predict`).
//! 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).
//!
//! [`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.
//!
//! The default build has **zero external dependencies**.
/// Error types returned by fallible operations.
/// Wrap arbitrary functions as a [`Transformer`].
/// 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 ;
pub use ;
pub use Pipeline;
pub use TargetTransformerKind;
pub use ;
pub use TransformerKind;