Skip to content

Instantly share code, notes, and snippets.

Implementing K-Means Clustering From Scratch

Overview

This project implements the K-Means clustering algorithm completely from scratch using NumPy without using any built-in clustering functions.

A synthetic dataset with 500 samples, 4 numerical features, and 4 clusters was generated to test the algorithm.

The clustering performance was evaluated using the Silhouette Score from scikit-learn.