Skip to content

A simple implementation of K-means (and Bisecting K-means) clustering algorithm in Python

Notifications You must be signed in to change notification settings

munikarmanish/kmeans

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

k-means Clustering

This is a simple pythonic implementation of the two centroid-based partitioned clustering algorithms: k-means and bisecting k-means.

Requirements

To run this program, you need to have python 3.x installed with following packages:

  • numpy (for matrix calculations)
  • matplotlib (for visualization)
  • click (for command line interface)

You can install these with the following command:

pip3 install -r requirements.txt

Usage

First of all, you need to have a data file. A sample data file demo/data.txt is included in this repo.

For running the program on the sample dataset, run:

python3 test_kmeans.py --verbose

To test bisecting k-means, use your own datasets, and change various clustering paramters, see help text.

python3 test_kmeans.py --help

Author

Manish Munikar [email protected]

About

A simple implementation of K-means (and Bisecting K-means) clustering algorithm in Python

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages