Back to GalleryK-Means Clustering
K-Means is a centroid-based clustering algorithm. It partitions data into K distinct clusters by minimizing within-cluster variance. It iterates between: (1) assigning each point to the nearest centroid, and (2) updating centroids to the mean of their assigned points.
Key Parameters & Visual Influence:
• K (Clusters): The number of clusters to partition the data into. The visualizer will show K Voronoi cell partitions in the coordinate space.
• Initialization: K-Means++ initializes centroids far apart from each other, which prevents poor local minima and speeds up convergence compared to random placement.
Dataset Studio
CSV format: Headers in first row, last column = label/target. All values must be numeric.
Example: x1, x2, label