What it does

K-Means groups dots by putting them near the closest center point.

Cluster: A group of similar things • Centroid: Middle of a cluster

How it works

  • Choose how many groups you want.
  • Place center points.
  • Move each center to the middle of the dots assigned to it, then repeat.

Uses & Applications

  • A store can group shoppers with similar habits.
  • A classroom app can group students by the topics they need to practice.
  • A photo app can group similar colors in an image.
In short

It finds hidden types of items in a big list.

Try it yourself

Make groups of nearby dots

Imagine making teams so that each person stands close to their team leader. Big dots are the leaders.

Your turn

Change one setting at a time. Reset example puts everything back.

Assign points and update centers

Step 1
Why this happens

Look closer at the numbers
Numbers used in this example