hps-kmeans- A nice implementation of the k-Means algorithm.

Safe HaskellSafe-Infered




euclideanDist :: (RealFloat a, Unbox a) => Vector a -> Vector a -> aSource

Euclidean Distance between two points

distanceToCenters :: (t -> a -> b) -> Vector a -> t -> Vector bSource

Distance from a Point to a set of Centers

assignCluster :: Ord a => Vector (Vector a) -> Vector IntSource

Assign Points to a Cluster based on the Minimum distance to each Center

cloudCenter :: (Fractional a, Unbox a) => Vector (Vector a) -> Vector aSource

Calculates the Center of a Cloud of Points

selectFrom :: Vector a -> Vector Int -> Vector aSource

Selects elements of a Vector given its indices

kMeans :: (RealFloat a, Unbox a) => (Vector a -> Vector a -> a) -> a -> Vector (Vector a) -> Vector (Vector a) -> Vector (Vector a)Source

k-Means classifier for a given Distance, Variation Guard and Cloud