Class KMediansLloyd.Instance

    • Method Detail

      • iterate

        protected int iterate​(int iteration)
        Description copied from class: AbstractKMeans.Instance
        Main loop function.
        Specified by:
        iterate in class AbstractKMeans.Instance
        Parameters:
        iteration - Iteration number (beginning at 1)
        Returns:
        Number of reassigned points
      • medians

        protected double[][] medians​(java.util.List<? extends DBIDs> clusters,
                                     double[][] medians,
                                     Relation<? extends NumberVector> relation)
        Returns the median vectors of the given clusters in the given database.
        Parameters:
        clusters - the clusters to compute the means
        medians - the recent medians
        relation - the relation containing the vectors
        Returns:
        the mean vectors of the given clusters in the given database