-- Hoogle documentation, generated by Haddock
-- See Hoogle, http://www.haskell.org/hoogle/


-- | K-means clustering algorithm
--   
--   A simple library for k-means clustering
@package kmeans
@version 0.1.3


-- | A simple implementation of the standard k-means clustering algorithm:
--   <a>http://en.wikipedia.org/wiki/K-means_clustering</a>. K-means
--   clustering partitions points into clusters, with each point belonging
--   to the cluster with th nearest mean. As the general problem is NP
--   hard, the standard algorithm, which is relatively rapid, is heuristic
--   and not guaranteed to converge to a global optimum. Varying the input
--   order, from which the initial clusters are generated, can yield
--   different results. For degenerate and malicious cases, the algorithm
--   may take exponential time.
module Data.KMeans

-- | Cluster points in a Euclidian space, represented as lists of Doubles,
--   into at most k clusters. The initial clusters are chosen arbitrarily.
kmeans :: Int -> [[Double]] -> [[[Double]]]

-- | A generalized kmeans function. This function operates not on points,
--   but an arbitrary type which may be projected into a Euclidian space.
--   Since the projection may be chosen freely, this allows for weighting
--   dimensions to different degrees, etc.
kmeansGen :: (a -> [Double]) -> Int -> [a] -> [[a]]
instance GHC.Classes.Eq (Data.KMeans.WrapType a)
instance GHC.Classes.Ord (Data.KMeans.WrapType a)
