Class Leader<O>

  • Type Parameters:
    O - Object type
    All Implemented Interfaces:
    elki.Algorithm, ClusteringAlgorithm<Clustering<PrototypeModel<O>>>

    @Reference(authors="J. A. Hartigan",
               title="Chapter 3: Quick Partition Algorithms, 3.2 Leader Algorithm",
               booktitle="Clustering algorithms",
               url="http://dl.acm.org/citation.cfm?id=540298",
               bibkey="books/wiley/Hartigan75/C3")
    public class Leader<O>
    extends java.lang.Object
    implements ClusteringAlgorithm<Clustering<PrototypeModel<O>>>
    Leader clustering algorithm.

    Reference:

    J. A. Hartigan
    Clustering algorithms, Chapter 3, Quick Partition Algorithms

    This implementation does not use the linear process described, but uses index structures. This may or may not be faster.

    TODO: when no index is available, fall back to the original approach.

    Since:
    0.7.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 elki.distance.Distance<? super O> distance
      Distance function used.
      private static elki.logging.Logging LOG
      Class logger.
      protected double threshold
      Maximum distance from leading object,
    • Constructor Summary

      Constructors 
      Constructor Description
      Leader​(elki.distance.Distance<? super O> distance, double threshold)
      Constructor.
    • Field Detail

      • LOG

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

        protected elki.distance.Distance<? super O> distance
        Distance function used.
      • threshold

        protected double threshold
        Maximum distance from leading object,
    • Constructor Detail

      • Leader

        public Leader​(elki.distance.Distance<? super O> distance,
                      double threshold)
        Constructor.
        Parameters:
        distance - Distance function
        threshold - Maximum distance from leading object
    • Method Detail

      • getInputTypeRestriction

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

        public Clustering<PrototypeModel<O>> run​(elki.database.relation.Relation<O> relation)
        Run the leader clustering algorithm.
        Parameters:
        relation - Data set
        Returns:
        Clustering result