Skip to content
← World of AI

Machine Learning

K-Means

Splits data into k groups by repeatedly moving cluster centres to the mean of their members.

Pick k starting centres, assign every point to its nearest centre, move each centre to the average of its assigned points, repeat until nothing moves. It is fast, it always converges, and it is usually the first clustering anyone tries.

It also assumes clusters are round, similarly sized and separated by distance, so it fails on elongated or nested shapes. Choosing k is a judgement call informed by the elbow method or silhouette scores, not a result the algorithm gives you.

JOIN NOW

Begin the first module

It is free, it is the real curriculum, and if it is not for you, you have lost nothing but an evening.

Join any time · Build AI skills at your pace