Class KMC2

  • All Implemented Interfaces:
    KMeansInitialization
    Direct Known Subclasses:
    AFKMC2

    @Title("K-MC\u00b2")
    @Reference(authors="O. Bachem, M. Lucic, S. H. Hassani, A. Krause",
               title="Approximate K-Means++ in Sublinear Time",
               booktitle="Proc. 30th AAAI Conference on Artificial Intelligence",
               url="http://www.aaai.org/ocs/index.php/AAAI/AAAI16/paper/view/12147",
               bibkey="DBLP:conf/aaai/BachemLHK16")
    public class KMC2
    extends AbstractKMeansInitialization
    K-MC² initialization

    Reference:

    O. Bachem, M. Lucic, S. H. Hassani, A. Krause
    Approximate K-Means++ in Sublinear Time
    Proc. 30th AAAI Conference on Artificial Intelligence

    Since:
    0.8.0
    Author:
    Erich Schubert
    • Field Detail

      • LOG

        private static final Logging LOG
        Class logger.
      • m

        protected int m
        Number of sampling attempts.
    • Constructor Detail

      • KMC2

        public KMC2​(int m,
                    RandomFactory rnd)
        Constructor.
        Parameters:
        m - M parameter
        rnd - Random generator.
    • Method Detail

      • chooseInitialMeans

        public double[][] chooseInitialMeans​(Relation<? extends NumberVector> relation,
                                             int k,
                                             NumberVectorDistance<?> distance)
        Description copied from interface: KMeansInitialization
        Choose initial means
        Parameters:
        relation - Relation
        k - Parameter k
        distance - Distance function
        Returns:
        List of chosen means for k-means