Expand description
Core transformers — all dependency-free and always available.
Scaling (StandardScaler, MinMaxScaler), imputation
(SimpleImputer), encoding (OneHotEncoder), outlier clipping
(Winsorize), de-skewing (PowerTransform), and per-subset composition
(ColumnTransformer) all implement the Transformer trait. The
supervised TargetEncoder needs the target, so it fits on a
Dataset rather than a bare frame. (SMOTE-style
resampling lives in the balance module behind the preprocessing
feature.)
Structs§
- Column
Transformer - Apply different transformers to different column subsets, in the
scikit-learn
ColumnTransformerstyle. Columns not named by any group pass through unchanged (unlessColumnTransformer::drop_remainderis set). - MinMax
Scaler - Scale each column into
[0, 1]:(x - min) / (max - min). - OneHot
Encoder - One-hot encode integer-coded categorical columns.
- Power
Transform - Yeo-Johnson power transform: spread out a skewed, heavy-tailed column toward
normality. A per-column
λis chosen from a grid to minimize skew; the transform is defined for negative values too (unlike Box-Cox). Missing values pass through. - Simple
Imputer - Replace missing values (
NaN) with a per-column statistic. - Standard
Scaler - Standardize columns to zero mean and unit variance:
(x - mean) / std. - Target
Encoder - Supervised target (mean) encoding for categorical columns: replace each
category with the smoothed mean of the target over its rows. Because it needs
the target, it fits on a
Datasetand is applied before (or outside) the unsupervised pipeline — not a plainTransformer. Categories are the integral values of the selected columns (as produced byTablelabel-encoding). - Winsorize
- Clip each column to a learned
[lower, upper]quantile band — the robust answer to heavy tails and outliers. Missing values pass through.
Enums§
- Impute
Strategy - The fill strategy for
SimpleImputer.