Top Python Libraries

Top Python Libraries

Share this post

Top Python Libraries
Top Python Libraries
EM Clustering (Part 1): Dividing a Dish Between Two People(Practical Data Analysis 22)

EM Clustering (Part 1): Dividing a Dish Between Two People(Practical Data Analysis 22)

Learn how the Expectation-Maximization (EM) algorithm works in clustering, focusing on parameter estimation and soft clustering using models like GMM.

Meng Li's avatar
Meng Li
Jan 27, 2025
∙ Paid

Share this post

Top Python Libraries
Top Python Libraries
EM Clustering (Part 1): Dividing a Dish Between Two People(Practical Data Analysis 22)
1
Share
The expectation-maximization algorithm - Part 1 | Let's talk about science!

Welcome to the "Practical Data Analysis" Series.

Table of Contents

Table of Contents

Meng Li
·
July 12, 2024
Read full story

Today, I'm going to teach you about EM clustering. The "E" in EM stands for Expectation, and "M" stands for Maximization, so the EM algorithm is also known as the Expectation-Maximization algorithm.

Let's start with a simple scenario: Suppose you cooked a dish and want to divide it evenly into two plates. How would you do it?

Very few people would weigh the dish and calculate half of the weight to split it evenly.

Most people would first place a portion of the dish on Plate A, then divide the remainder between Plate B. Afterward, they would check whether the amounts on Plate A and Plate B are the same. If one plate has more, they would move some of the food to the plate with less, and repeat the process until the portions are equal.

You can see three main steps in this process: initialize the parameters, observe the expected results, and re-estimate.

First, you initialize some amount of food on each plate, then observe the expected result. These two steps are the Expectation steps.

If there is any discrepancy in the results, you need to re-estimate the parameters. This is the Maximization step. These two steps together form the EM algorithm.

This post is for paid subscribers

Already a paid subscriber? Sign in
© 2025 Meng Li
Privacy ∙ Terms ∙ Collection notice
Start writingGet the app
Substack is the home for great culture

Share