Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/dokato/simple_kmeans

own implementation of kmeans algorithm
https://github.com/dokato/simple_kmeans

Last synced: 18 days ago
JSON representation

own implementation of kmeans algorithm

Awesome Lists containing this project

README

        

# K-means

Simple python implemetation of this well-known machine
learning algorithm.

## How to use?

Kmeans algorithm has only one main parameter: *k* which is the number
of clusters into you want to divide your data. You may also want
to specify `eps` which is convergence constant and implies when
to stop algorithm.

In this case I decided to use Forgy initialization which is simply
chosing random data as initial clusters.

## Examples

Two examples provided:

* one in main `kmeans.py` script

* second shows image compression using k-means in `compression.py`