Skip to content
This repository


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

A Data.Vector based implementation of the kmeans clustering algorithm

branch: master

Fetching latest commit…


Cannot retrieve the latest commit at this time

Octocat-spinner-32 Math
Octocat-spinner-32 tests
Octocat-spinner-32 .travis.yml
Octocat-spinner-32 LICENSE
Octocat-spinner-32 README.markdown
Octocat-spinner-32 Setup.hs
Octocat-spinner-32 kmeans-vector.cabal

k-means clustering algorithm in Haskell

kmeans-vector is a Haskell library to perform the k-means clustering algorithm. It is based on the very efficient 'vector' library.

Build Status

Feel free to contribute, may it be features, performance improvements, etc.

Performances (0.1 version)

kmeans-vector is much faster than the existing kmeans package. For example, the kmeans package performs k-means on 10000 2D points with k=5 in 21.099s while kmeans-vector does the same in 6.605s. For 50000 3D points, with k=5 still, kmeans-vector performs in 47.853s while I Ctrl+C'd the kmeans version after 6 minutes and a half.

Performances (0.2 version)

In addition to contributing a feature, Ville Tirronen also claimed to make the library about 50% faster, which was confirmed after running the algorithm on a dataset I had lying around.


This library is written and maintained by Alp Mestanogullari, Ville Tirronen contributed code to the 0.2 version.

Something went wrong with that request. Please try again.