solow-preprocessing
Feature preprocessing for the Solow statistical stack — scalers, encoders, and feature construction.
Every preprocessor exposes the classical fit / transform /
fit_transform / inverse_transform shape from
preprocessing, so a the reference practitioner can migrate a
pipeline call-for-call. The types are also composable through
solow-cv-style cross-validated scoring
and through the higher-level solow-fit formula surface.
Modules
- [
scalers] — [StandardScaler], [MinMaxScaler], [RobustScaler], [MaxAbsScaler], [Normalizer]. All supportpartial_fit-style incremental statistics update where applicable and deriveSerialize/Deserializeunder the opt-inserdefeature. - [
encoders] — [LabelEncoder] (1-D categoricalusize↔ label), [OrdinalEncoder] (per-column labels for a matrix), and [OneHotEncoder] with an optionaldrop_firstfor regression design-matrix compatibility. - [
polynomial] — [PolynomialFeatures] withdegree,interaction_only, andinclude_biasmatching the reference semantics exactly. - [
discretize] — [KBinsDiscretizer] withUniform,Quantile, andKMeansbinning strategies.
Every preprocessor's transform is deterministic and side-effect-free;
there is no hidden RNG. KBinsDiscretizer::KMeans is the only
stochastic component and takes an explicit seed.
Example — a full preprocessing chain
use array;
use ;
let x = array!;
// Standardize.
let scaler = fit.unwrap;
let x_std = scaler.transform.unwrap;
// Expand to polynomial features up to degree 2 (no bias column).
let poly = new.include_bias;
let x_poly = poly.fit_transform.unwrap;
assert_eq!; // x0, x1, x0², x0·x1, x1²