Log inStart free
LESSON 22.11 · 6 STAGES · 3 CONTROLS · 3 CHECKSPRO · PREVIEW

IVF

Watch k-means split 200 points into cells, then a search open only the nearest cells.


Pro lesson. Stage 1 is free to watch. Pro opens all 6 stages, 3 controls and 3 checks, in this lesson and every other.

Go Pro · $8.25/mo
EXPLAINER · 22.11 · INDEX BAY8 SEEDS FROM 200 POINTS
01
Stage 1 of 6 · Pick seeds
IVF first trains k-means on the points. k-means++ picks 8 spread-out points as seeds.
Explain it simply

You see 8 ochre rings on 8 of the points. These seeds are the first guesses for the centers of 8 groups. The method picks each next seed at random, most often far from the seeds it has. So the seeds spread over the clusters.

8 seed points ringed: p162, p29, p78, p42, p121, p125, p89, p24.

points, queryseeds, centroidscell bordersprobed cells, resultstrue 3 nearestmissed
8 k-means++ seedsk-means cost per step0751500123456Lloyd step146.48 k-means++ seedsk-means cost per step0751500123456Lloyd step146.4
Toy: 200 2-D points and 5 queries, shared with 22.C2
STAGE 1 / 6
MATH · STAGE 1HOVER A SYMBOL OR A SHAPE
P(x)=D(x)2∑x′D(x′)2P(\sy{x}{data}{x}) = \dfrac{D(x)^2}{\sum_{x'} D(x')^2}
k=8; seed 1=p162k = 8;\ \text{seed 1} = p_{162}

A point far from every seed is more likely to be the next seed.

Common mix-ups

MYTHThe nearest centroid's cell holds the nearest points.

The fix, and 1 more mix-up with the diagram to show them, come with Pro.

Predict, then reveal
3 CHECKS · PRO
Q01With 8 cells and 2 probes, does q2 find all 3 true nearest points?

Make your guess, then test it in the diagram. All 3 checks come with Pro.

PRO LESSON · YOU WATCHED STAGE 1 OF 6
Unlock the full explainer
  • 5 more stages and 3 live controls
  • 2 mix-up cards and 3 predict-then-reveal checks
  • Watch it as a narrated video, in three voices
  • Every Pro lesson and capstone · 656 in total

$99 a year, or $15 a month. Cancel any time.