Implement K-Means Clustering in PyTorch

Easyclassical-mlauto-graded

Code Lloyd's algorithm with PyTorch tensors: random init, distance computation, centroid updates, and convergence check.

Solve it

Check your answer

The grader verifies properties of your implementation, so a correct solution written differently from ours still passes.

pip install torchleet

from torchleet import check
check("kmeans", kmeans)

Company tags

How these tags are sourced