Class NaiveMeanShiftClustering<V extends NumberVector>

  • Type Parameters:
    V - Vector type
    All Implemented Interfaces:
    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 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
    • Constructor Detail

      • NaiveMeanShiftClustering

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

      • getInputTypeRestriction

        public TypeInformation[] getInputTypeRestriction()
        Description copied from interface: Algorithm
        Get the input type restriction used for negotiating the data query.
        Specified by:
        getInputTypeRestriction in interface Algorithm
        Returns:
        Type restriction
      • run

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