Fork of K means clustering
✓ Published0🌍 Public
Ssmeiljoe
Last edited Apr 27, 2021
Created on Apr 27, 2021
This example demonstrates the k-means clustering algorithm on a small dataset of ten points loaded from a CSV file. Two initial centroids are randomly placed, and the animation iteratively assigns each point to the nearest centroid using Euclidean distance, updates cluster centers by computing their mean, and recolors the points accordingly over ten iterations. The SVG chart, rendered with D3 v6, uses `d3.csv` to load the data and `transition().delay()` to animate the movement of circles and centroids, with a label displaying the current iteration.
AI-generated descriptionMIT Licensed