felixduvallet / kmeans

C++ implementation of K-Means

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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

License:BSD 3-Clause "New" or "Revised" License


Languages

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