Expand description
Data preprocessing for regularized regression.
This module provides standardization utilities that match glmnet’s behavior:
- Predictors are centered and scaled (if enabled)
- The intercept column is not penalized, so it’s handled specially
- Coefficients can be unstandardized back to the original scale
§Standardization Convention
The scaling factor used is sqrt(sum(x²) / n), which gives unit variance
under the 1/n convention (matching glmnet).
Structs§
- Standardization
Info - Information stored during standardization, used to unstandardize coefficients.
- Standardize
Options - Options for standardization.
Functions§
- predict
- Computes predictions using unstandardized coefficients.
- standardize_
xy - Standardizes X and y for regularized regression (glmnet-compatible).
- unstandardize_
coefficients - Unstandardizes coefficients from the standardized space back to original scale.