liveBook · Manning

Normalization

As explained in Grokking Machine Learning

A mathematical operation that rescales nonnegative quantities by their sum so that the resulting quantities sum to one.

Normalization rescales quantities by their sum so they add to one while preserving their relative ratio. It turns competing probability weights into a valid probability distribution. section 8.2

Filtering spam probabilities

After restricting attention to emails containing “lottery,” only spam and ham remain possible. Divide each corresponding probability by their sum; the normalized results are 3/4 and 1/4, which add to one. section 8.2

Apply normalization in three steps:

  • Identify the possible cases that remain after conditioning on the observed event. section 8.2
  • Add their unnormalized quantities to obtain the total. section 8.2
  • Divide every quantity by that total. section 8.2
Figure 8.9 From the tree in figure 8.8, we have removed the two branches where the emails don’t contain the word lottery.

The reduced probability tree makes normalization intuitive: remove impossible branches, then redistribute the remaining relative weights so they sum to one. section 8.2

How Grokking Machine Learning covers it

How deep it goes
Defines normalization, explains ratio preservation, gives the divide-by-sum formula, and stops short of broader numerical methods.
Examples
Uses a spam-detection tree in which emails containing “lottery” yield normalized spam and ham probabilities of 3/4 and 1/4.
What it assumes
Uses basic probability, conditional events, joint events, and the product rule as working context.
What you can do after
Apply it via division to turn compatible probability weights into values that sum to one.
How it connects
Connects normalization with conditional probability, Bayes’ theorem, joint probability, and the product rule.

Also explained in

Compare how 21 books explain normalization →

Related concepts

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