kmeans-par-1.2.0: Sequential and parallel implementations of Lloyd's algorithm.
Algorithms.Lloyd.Sequential
data Point a Source
Constructors
Fields
Instances
useMetric :: Metric a => (Vector Double -> a) -> Vector Double -> Vector Double -> DoubleSource
data Cluster Source
data PointSum Source
emptyPointSum :: Int -> PointSumSource
addPoint :: PointSum -> Point a -> PointSumSource
toCluster :: Int -> PointSum -> ClusterSource
(//) :: Double -> Int -> DoubleSource
closestCluster :: Metric a => (Vector Double -> a) -> [Cluster] -> Point b -> ClusterSource
assign :: Metric a => (Vector Double -> a) -> [Cluster] -> [Point b] -> Vector PointSumSource
makeNewClusters :: Vector PointSum -> [Cluster]Source
step :: Metric a => (Vector Double -> a) -> [Cluster] -> [Point b] -> [Cluster]Source
kmeans :: Metric a => Int -> (Vector Double -> a) -> [Point b] -> [Cluster] -> [Cluster]Source
kmeans' :: Metric a => Int -> (Vector Double -> a) -> Int -> [Point b] -> [Cluster] -> [Cluster]Source