Search⌘ K
AI Features

Scaling, Binning, and Creating Derived Features

Explore how to apply feature scaling methods like standardization and normalization, convert continuous variables into bins, and create derived features to improve model performance. Understand the importance of fitting parameters only on training data to prevent leakage and ensure reliable data transformations for machine learning models.

Numeric columns can describe the same customer at radically different magnitudes. In a response-prediction table, annual_income might contain 72000, while click_rate contains 0.04. A scale-sensitive model can give the larger-numbered column disproportionate influence unless we transform the columns first.

Feature scaling changes a numeric column’s magnitude without changing the ordering of its rows. Standardization, also called z-score scaling, expresses each value as its distance from the column mean in standard deviation units. Normalization, also called min-max scaling, moves values into a fixed range, usually from 0 to 1. Both transformations make numeric columns comparable for methods sensitive to magnitude. They do not make an income value more meaningful, remove outliers, or establish a relationship with the target.

For a value xx, standardization uses the column mean μ\mu and standard deviation σ\sigma.

Min-max normalization uses the observed minimum xmin⁡x_{\min} and maximum xmax⁡x_{\max}.

The parameters ...