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