Standardization › When to Use Standardization

Michael BrenndoerferApril 25, 20252 min read
Machine Learning from ScratchAll chapters
Part 3 of 9Foundations
Chapter 25Standardization › When to Use Standardization
Reading section 6 of 10 · When to Use Standardization · 2 minSection 6 of 10 · 2 min

Book contents

Section 6 of 10 · 2 min read

Standardization › When to Use StandardizationOne section · Sections in this chapter6 / 10 ↓
Reading tools Definitions & inline links

Choose your expertise level to adjust how many terms are explained. Beginners see more tooltips, experts see fewer to maintain reading flow. Hover over underlined terms for instant definitions.

Article links

Make inline references clickable

Standardization is especially important for certain types of machine learning algorithms, while for others it is less critical.

Algorithms that require standardization include:

  • LASSO and Ridge regression: These methods use regularization penalties that assume all features are on the same scale. Without standardization, features with larger numeric ranges can dominate the penalty and skew the model.
  • k-means clustering: Since this algorithm relies on distance calculations, features must be on comparable scales to ensure that no single variable dominates the clustering process.
  • Support Vector Machines: The kernel functions used in SVMs are distance-based.
  • Neural networks: Gradient-based optimization in neural networks converges more efficiently when inputs are normalized.
  • Principal Component Analysis (PCA): As PCA is based on variance, standardizing features ensures that each variable contributes appropriately to the dimensionality reduction.

When standardization is less critical:

  • Decision trees: These algorithms are scale-invariant, meaning their splitting criteria are unaffected by the magnitude of input variables.
  • Random Forest: As an ensemble of decision trees, Random Forests inherit this scale invariance.
  • Logistic regression: While standardization is not strictly required, it becomes important when regularization is used, as the penalty terms are sensitive to feature scale.