MeanShift-0.1: Mean shift algorithm

Safe HaskellSafe-Infered




Basic Meanshift routines

meanShift :: Double -> [Vector] -> Vector -> VectorSource

Calculate the Mean shift for a point in a dataset. This is efficient only when we cannot make an a priori estimate on which points contribute to the mean shift at given location.

meanShiftWindow :: Int -> Window -> Double -> Vector -> VectorSource

Mean shift with a windowing function. Performing mean shift is more efficient if we can index and calculate only those points that are in the support of our kernel.

Auxiliary functions for iterating the meanshift steps.

fixedPoint :: Eq a => (a -> a) -> a -> [a]Source

Find a path to the fixed point of a function.

fixedPointE :: Double -> (Vector -> Vector) -> Vector -> [Vector]Source


type Window = Support -> [Vector]Source

type Support = (Vector, Double)Source

(multidimensional) Kernel Density Estimates

kde :: Double -> [Vector] -> Vector -> DoubleSource

Kernel density estimate of given points. Uses a normal kernel.