-- Hoogle documentation, generated by Haddock
-- See Hoogle, http://www.haskell.org/hoogle/
-- | An implementation of the kmeans clustering algorithm based on the vector package
--
-- Provides a simple (but efficient) implementation of the k-means
-- clustering algorithm. The goal of this algorithm is to, given a list
-- of n-dimensional points, regroup them in k groups, such that each
-- point gets to be in the group to which it is the closest to (using the
-- center of the group).
--
-- CHANGELOG
--
-- kmeans-vector-0.2 supports having feature vectors associated to
-- objects, and thus computing kmeans on these vectors, letting you
-- recover the initial objects.
@package kmeans-vector
@version 0.2
-- | An implementation of the k-means clustering algorithm based on the
-- efficient vector package.
module Math.KMeans
-- | Performs the k-means clustering algorithm using trying to use
-- k clusters on the given list of points
kmeans :: Int -> [Point a] -> [[Point a]]
-- | Type holding an object of any type and its associated feature vector
type Point a = (Vector Double, a)
-- | Type representing a cluster (group) of vectors by its center and an id
data Cluster
Cluster :: !Int -> !Vector Double -> Cluster
cid :: Cluster -> !Int
center :: Cluster -> !Vector Double
computeClusters :: [[Vector Double]] -> [Cluster]