Machine Learning, FoundationsLesson 21 of 92

Module 3 · The data is the job

Scaling, and the transforms that change what a model can see

In this lesson

  • 9 min read
  • 7 reading sections
  • Knowledge check
  • Lesson 2 of 12 in this chapter

This chapter’s goalTake a raw table with mixed types, missing values, high-cardinality categories, dates and free text, and produce a fitted preprocessing pipeline that leaks nothing from the held-out data, handles categories unseen at training time, and whose every transformation you can justify by what the downstream model requires.

This chapter’s media

The film explains chapter ideas. The audiobook narrates the complete teaching text.

FormatEnglishहिंदी
Chapter filmWatch1:44Not available
Full audiobookNot availableNot available

A little at a time

Explore an idea, try it, then check what stays.

Step 1 of 9Free · no account needed
Lesson steps

Which models need scaling, and why

Scaling is not a universal good. It is required by a specific set of models for a specific reason, and applying it blindly wastes time while not applying it where needed silently ruins results.

Needs scaling:

  • Anything with a distance in it: k-nearest neighbours, k-means, SVMs with RBF kernels. If income runs to millions and age to tens, the distance between two people is essentially the difference in their incomes; age contributes nothing.
  • Anything with a penalty on coefficients: ridge, lasso, regularised logistic regression. As module 2 showed, the penalty applies to coefficient size, so it lands on features by unit of measurement rather than by importance.
  • Anything fitted by gradient descent: neural networks, SGDClassifier. Mismatched scales create a long, narrow loss surface that one learning rate cannot navigate.
  • PCA, because it maximises variance, and a feature in rupees has more variance than one in kilometres for no meaningful reason.

Your place and first choices stay on this browser. Classroom credit is recorded separately.

Every lesson here is open. Your progress is recorded once you pass the How a Language Model Actually Works exam.

Stuck on something?Ask Funke, your AI tutor

How to cite: Addaly (2026) ‘Scaling, and the transforms that change what a model can see’, in Machine Learning, Foundations. Edited by M. Mun. Addaly. Available at: https://addaly.com/learn/machine-learning-foundations/numerical-features (Accessed: 29 November 2026).