Skip to content

cmanton/kmeans

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

32 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

kmeans

C++ implementation of K-Means. Build Status

Usage:

kmeans <file>

where file is a list of points (space-separated), one point per line. example:

 1.23 4.56 7.89
 3.21 6.54 9.87

Build instructions:

mkdir build
cd build
cmake ..
make
make test

Run on some sample data

There are some traces of sample data in the src/sample_data folder. data_N_D.txt contains N D-dimensional points.

For example, you can run kmeans on 200 2-dimensional points.

cd build
./kmeans data_200_2.txt 2

This produces a file means.txt that looks something like:

3.96207 -1.92886
-2.01688 -2.98501

About

C++ implementation of K-Means

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C++ 86.2%
  • Python 10.3%
  • CMake 0.9%
  • M4 0.8%
  • Shell 0.6%
  • C 0.6%
  • Makefile 0.6%