Class ElkanKMeans<V extends elki.data.NumberVector>

  • Type Parameters:
    V - vector datatype
    All Implemented Interfaces:
    elki.Algorithm, ClusteringAlgorithm<Clustering<KMeansModel>>, KMeans<V,​KMeansModel>

    @Reference(authors="C. Elkan",
               title="Using the triangle inequality to accelerate k-means",
               booktitle="Proc. 20th International Conference on Machine Learning, ICML 2003",
               url="http://www.aaai.org/Library/ICML/2003/icml03-022.php",
               bibkey="DBLP:conf/icml/Elkan03")
    public class ElkanKMeans<V extends elki.data.NumberVector>
    extends SimplifiedElkanKMeans<V>
    Elkan's fast k-means by exploiting the triangle inequality.

    This variant needs O(n*k) additional memory to store bounds.

    See HamerlyKMeans for a close variant that only uses O(n*2) additional memory for bounds.

    Reference:

    C. Elkan
    Using the triangle inequality to accelerate k-means
    Proc. 20th International Conference on Machine Learning, ICML 2003

    Since:
    0.7.0
    Author:
    Erich Schubert
    • Field Detail

      • LOG

        private static final elki.logging.Logging LOG
        The logger for this class.
    • Constructor Detail

      • ElkanKMeans

        public ElkanKMeans​(elki.distance.NumberVectorDistance<? super V> distance,
                           int k,
                           int maxiter,
                           KMeansInitialization initializer,
                           boolean varstat)
        Constructor.
        Parameters:
        distance - distance function
        k - k parameter
        maxiter - Maxiter parameter
        initializer - Initialization method
        varstat - Compute the variance statistic
    • Method Detail

      • run

        public Clustering<KMeansModel> run​(elki.database.relation.Relation<V> relation)
        Description copied from interface: KMeans
        Run the clustering algorithm.
        Specified by:
        run in interface KMeans<V extends elki.data.NumberVector,​KMeansModel>
        Overrides:
        run in class SimplifiedElkanKMeans<V extends elki.data.NumberVector>
        Parameters:
        relation - Relation to process.
        Returns:
        Clustering result
      • getLogger

        protected elki.logging.Logging getLogger()
        Description copied from class: AbstractKMeans
        Get the (STATIC) logger for this class.
        Overrides:
        getLogger in class SimplifiedElkanKMeans<V extends elki.data.NumberVector>
        Returns:
        the static logger