liveBook · Manning

Standardization

As explained in Data Without Labels

Standardization is the transformation of numeric variables to a common scale, typically by centering them and scaling by their variability.

Standardization transforms numeric variables onto a comparable scale by centering and scaling their variability. It prevents naturally larger dimensions from dominating distance calculations. section 2.3.5

A practical clustering workflow is:

  • Inspect the dataset, class distribution, plots, and missing-value counts before transformation. section 2.3.5
  • Remove the nonnumeric class column, then standardize the remaining features with scipy.stats.zscore or sklearn.preprocessing.StandardScaler. section 2.3.5
  • Plot the standardized features and use Euclidean-distance distortions with the elbow method before fitting k-means. section 2.3.5

Vehicle clustering

For vehicle data, standardize every feature after excluding class, inspect X_standard with a scatter plot, and use it as k-means input. The elbow plot indicates three clusters as a suitable choice. section 2.3.5

import pandas as pd
vehicle_df = pd.read_csv('vehicle.csv').dropna()

Start with the supplied vehicle-data loading and cleaning workflow before checking and standardizing features. section 2.3.5

How Data Without Labels covers it

How deep it goes
Demonstrates feature selection, z-score and StandardScaler implementations, visualization, and k-means use.
Examples
Uses a vehicle dataset, feature scatter plots, and an elbow plot comparing one through nine clusters.
What it assumes
Assumes basic Python data handling and introduces preprocessing checks before clustering.
What you can do after
Apply standardization with scipy.stats.zscore or sklearn.preprocessing.StandardScaler before fitting k-means.
How it connects
Connects standardization to k-means clustering, Euclidean distance, scatter plots, and the elbow method.

Also explained in

Compare how 5 books explain standardization →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Data Without Labels. The section links point to the parts of the book it draws on.