Class NaiveMeanShiftClustering<V extends elki.data.NumberVector>

  • Type Parameters:
    V - Vector type
    All Implemented Interfaces:
    elki.Algorithm, ClusteringAlgorithm<Clustering<MeanModel>>

    @Reference(authors="Y. Cheng",
               title="Mean shift, mode seeking, and clustering",
               booktitle="IEEE Transactions on Pattern Analysis and Machine Intelligence 17-8",
               url="https://doi.org/10.1109/34.400568",
               bibkey="DBLP:journals/pami/Cheng95")
    public class NaiveMeanShiftClustering<V extends elki.data.NumberVector>
    extends java.lang.Object
    implements ClusteringAlgorithm<Clustering<MeanModel>>
    Mean-shift based clustering algorithm. Naive implementation: there does not seem to be "the" mean-shift clustering algorithm, but it is a general concept. For the naive implementation, mean-shift is applied to all objects until they converge to other. This implementation is quite naive, and various optimizations can be made.

    It also is not really parameter-free: the kernel needs to be specified, including a radius/bandwidth.

    By using range queries, the algorithm does benefit from index structures!

    TODO: add methods to automatically choose the bandwidth?

    Reference:

    Y. Cheng
    Mean shift, mode seeking, and clustering
    IEEE Transactions on Pattern Analysis and Machine Intelligence 17-8

    Since:
    0.5.5
    Author:
    Erich Schubert
    • Nested Class Summary

      • Nested classes/interfaces inherited from interface elki.Algorithm

        elki.Algorithm.Utils
    • Field Summary

      Fields 
      Modifier and Type Field Description
      protected double bandwidth
      Range of the kernel.
      protected elki.distance.NumberVectorDistance<? super V> distance
      Distance function used.
      protected elki.math.statistics.kernelfunctions.KernelDensityFunction kernel
      Density estimation kernel.
      private static elki.logging.Logging LOG
      Class logger.
      protected static int MAXITER
      Maximum number of iterations.
    • Constructor Summary

      Constructors 
      Constructor Description
      NaiveMeanShiftClustering​(elki.distance.NumberVectorDistance<? super V> distance, elki.math.statistics.kernelfunctions.KernelDensityFunction kernel, double range)
      Constructor.
    • Field Detail

      • LOG

        private static final elki.logging.Logging LOG
        Class logger.
      • distance

        protected elki.distance.NumberVectorDistance<? super V extends elki.data.NumberVector> distance
        Distance function used.
      • kernel

        protected elki.math.statistics.kernelfunctions.KernelDensityFunction kernel
        Density estimation kernel.
      • bandwidth

        protected double bandwidth
        Range of the kernel.
      • MAXITER

        protected static final int MAXITER
        Maximum number of iterations.
        See Also:
        Constant Field Values
    • Constructor Detail

      • NaiveMeanShiftClustering

        public NaiveMeanShiftClustering​(elki.distance.NumberVectorDistance<? super V> distance,
                                        elki.math.statistics.kernelfunctions.KernelDensityFunction kernel,
                                        double range)
        Constructor.
        Parameters:
        distance - Distance function
        kernel - Kernel function
        range - Kernel radius
    • Method Detail

      • getInputTypeRestriction

        public elki.data.type.TypeInformation[] getInputTypeRestriction()
        Specified by:
        getInputTypeRestriction in interface elki.Algorithm
      • run

        public Clustering<MeanModel> run​(elki.database.relation.Relation<V> relation)
        Run the mean-shift clustering algorithm.
        Parameters:
        relation - Data relation
        Returns:
        Clustering result