AlgoViz

K-Means Clustering Visualization

Iteration: 0
Clusters (K):
3
Speed:
Spray Density:
100
Spray Radius:
50
Spray Mode:

How It Works

K-means clustering is an unsupervised learning algorithm that groups similar data points together. The algorithm works by:

  1. Randomly initializing K centroids
  2. Assigning each point to the nearest centroid
  3. Moving centroids to the average position of their assigned points
  4. Repeating steps 2-3 until convergence

Interactive Features

  • Adjust animation speed to control the clustering process
  • Use spray mode to add points by clicking and dragging
  • Modify spray density and radius for different point distributions
  • Change the number of clusters (K) to see different groupings