liveBook · Manning

Standardization

As explained in Machine Learning for Tabular Data: XGBoost, Deep Learning, and AI

A standardized feature is a feature transformed to a normalized scale, commonly with a specified mean and standard deviation.

Standardization rescales numeric features by subtracting each feature’s mean and dividing by its standard deviation. The transformed values are centered at 0 with a standard deviation of 1, putting continuous columns with very different ranges onto a consistent scale. section 4.2.2 section 9.4.3

Use it when feature ranges differ enough to make model training less efficient—for example, real-estate Bathrooms values from 0 to 20 alongside Size values from 0 to 11 million. It is used for continuous numeric columns, not as a replacement for encoding categorical variables. section 9.4.3 section 4.2.2

Inspecting the Auto MPG feature scales

Before modeling, standardize selected numeric Auto MPG columns and plot their boxplots. This makes mpg, displacement, horsepower, weight, and acceleration directly comparable despite their original units and spreads. section 2.4.2

standardized = ((data[numeric_feats] - data[numeric_feats].mean()) 
               / data[numeric_feats].std())
standardized.boxplot(column=numeric_feats, figsize= (12, 4))

This pandas calculation subtracts column means, divides by column standard deviations, and visualizes the resulting numeric feature distributions with boxplots. section 2.4.2

A practical tabular-data workflow is:

  • Identify continuous numeric features and check their distributions, variation, and missing values. section 2.4.2 section 2.1.2
  • Impute missing numeric values before scaling; a zero fill followed by standardization makes zero correspond to the feature mean. section 2.4.2 section 4.2.2
  • Place StandardScaler with the model in a Scikit-learn Pipeline, then evaluate the complete pipeline with cross-validation. section 4.1
  • Combine numeric standardization with separate categorical transformations through ColumnTransformer when columns need different handling. section 4.2.2

Standardization can also be called normalization when it adjusts continuous columns into consistent ranges. In deep learning, normalization layers apply this treatment alongside practices such as regularization; in classical tabular workflows, StandardScaler can provide the same numeric rescaling inside a pipeline. section 9.4.3 section 4.1

How Machine Learning for Tabular Data: XGBoost, Deep Learning, and AI covers it

How deep it goes
Defines mean-and-standard-deviation rescaling and demonstrates pandas, Scikit-learn pipelines, and normalization layers without mathematical derivation.
Examples
Uses Auto MPG boxplots, synthetic binary classification, Airbnb NYC feature pipelines, and Kuala Lumpur real-estate columns.
What it assumes
Assumes recognition of continuous numeric columns and introduces their mean, standard deviation, missing-value handling, and separate categorical preprocessing.
What you can do after
Apply it via StandardScaler, pandas calculations, or normalization layers within a preprocessing and model-training workflow.
How it connects
Connects numeric features, missing-value imputation, StandardScaler, Pipeline, ColumnTransformer, one-hot encoding, cross-validation, and regularization.

Also explained in

Compare how 5 books explain standardization →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Machine Learning for Tabular Data: XGBoost, Deep Learning, and AI. The section links point to the parts of the book it draws on.