Preprocessing - CyrilB1531/lodestar GitHub Wiki
Preprocessing
Start here
Namespaces
Feature scaling — Lodestar.Preprocessing — Four scalers, at sklearn.preprocessing parity: StandardScaler centres on the mean and scales to unit variance, MinMaxScaler maps onto a fixed range, MaxAbsScaler divides by the largest absolute value without ever subtracting, and RobustScaler centres on the median and scales by an interpercentile range.
Splitting — Lodestar.Preprocessing — One entry point, Splitters : it cuts the rows into cross-validation folds or into a single train and test split, at sklearn.model_selection parity wherever the reference is deterministic.
Encoding and imputation — Lodestar.Preprocessing — Three encoders and two imputers, at sklearn.preprocessing and sklearn.impute parity, over row-major spans rather than an IDataView: Encoders.OneHot gives each category a column, Encoders.Ordinal gives it a code, Encoders.Label does the same for a target column, SimpleImputer fills what is missing from the column's own statistic, and KnnImputer fills it from the rows that resemble the one with the gap.
Feature transforming — Lodestar.Preprocessing — Five transformers that change the shape of a feature rather than its scale, at sklearn.preprocessing parity: Normalizer scales each row to unit norm, PolynomialFeatures expands a row into its products, KBinsDiscretizer cuts a feature into bins, QuantileTransformer maps a feature onto a uniform or normal distribution by its ranks, and PowerTransformer raises it to the power that makes it most nearly symmetric.
🗂️ Page Index for this GitHub Wiki