Class MeanShiftClustering


  • public final class MeanShiftClustering
    extends java.lang.Object
    Sequential Mean Shift Clustering using a gaussian kernel and euclidian distance measurement.
    Author:
    thomasjungblut
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static java.util.List<de.jungblut.math.DoubleVector> cluster​(java.util.List<de.jungblut.math.DoubleVector> points, double windowSize, double mergeWindow, int maxIterations, boolean verbose)
      Clusters a bunch of given points using the Mean Shift algorithm.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • MeanShiftClustering

        public MeanShiftClustering()
    • Method Detail

      • cluster

        public static java.util.List<de.jungblut.math.DoubleVector> cluster​(java.util.List<de.jungblut.math.DoubleVector> points,
                                                                            double windowSize,
                                                                            double mergeWindow,
                                                                            int maxIterations,
                                                                            boolean verbose)
        Clusters a bunch of given points using the Mean Shift algorithm. It first observes possible centers that are within the given windowSize. Once we have initial centers found, we do a meanshift step and afterwards merge centers that are within the mergeWindow of each other. This algorithm is guranteed to converge to a minimum solution.
        Parameters:
        points - the points to cluster.
        windowSize - the window size to observe points arround the center in. This is also used to observe initial centers.
        mergeWindow - the merge window size, if a pair of centers is within this mergeWindow the centers are merged together.
        maxIterations - the maximum number of iterations to do before breaking.
        verbose - if true, progress will be reported after each iteration.
        Returns:
        the centers of the meanshift algorithm.