/K-Means-Algorithm-From-Scratch

The K-Means algorithm, written from scratch using the Python programming language

Primary LanguageJupyter NotebookMIT LicenseMIT

K-Means-Algorithm-From-Scratch

The K-Means algorithm, written from scratch using the Python programming language. The main jupiter notebook shows how to write k-means from scratch and shows an example application - reducing the number of colors.

drawing

Getting Started

The main file is K-means.ipynb

The code itself, without comments, can be found in the k-means.py file

Image

Image used as example for color reduction was downloaded from here

drawing

Prerequisites

-numpy
-sklearn
-matplotlib
-cv2

Authors

License

This project is licensed under the MIT License - see the LICENSE file for details