Class ReynoldsPAM<O>

  • Type Parameters:
    O - vector datatype
    All Implemented Interfaces:
    Algorithm, ClusteringAlgorithm<Clustering<MedoidModel>>, KMedoidsClustering<O>

    @Reference(authors="A. P. Reynolds, G. Richards, B. de la Iglesia, V. J. Rayward-Smith",
               title="Clustering Rules: A Comparison of Partitioning and Hierarchical Clustering Algorithms",
               booktitle="J. Math. Model. Algorithms 5(4)",
               url="https://doi.org/10.1007/s10852-005-9022-1",
               bibkey="DBLP:journals/jmma/ReynoldsRIR06")
    public class ReynoldsPAM<O>
    extends PAM<O>
    The Partitioning Around Medoids (PAM) algorithm with some additional optimizations proposed by Reynolds et al.

    In our implementation, we could not observe a substantial improvement over the original PAM algorithm. This may be because of modern CPU architectures, where saving an addition may be neglibile compared to caching and pipelining.

    Reference:

    A. P. Reynolds, G. Richards, B. de la Iglesia, V. J. Rayward-Smith
    Clustering Rules: A Comparison of Partitioning and Hierarchical Clustering Algorithms
    J. Math. Model. Algorithms 5(4)

    Since:
    0.5.0
    Author:
    Erich Schubert
    • Field Detail

      • LOG

        private static final Logging LOG
        The logger for this class.
      • KEY

        private static final java.lang.String KEY
        Key for statistics logging.
    • Constructor Detail

      • ReynoldsPAM

        public ReynoldsPAM​(Distance<? super O> distance,
                           int k,
                           int maxiter,
                           KMedoidsInitialization<O> initializer)
        Constructor.
        Parameters:
        distance - distance function
        k - k parameter
        maxiter - Maxiter parameter
        initializer - Function to generate the initial means
    • Method Detail

      • run

        public Clustering<MedoidModel> run​(Relation<O> relation,
                                           int k,
                                           DistanceQuery<? super O> distQ)
        Description copied from interface: KMedoidsClustering
        Run k-medoids clustering with a given distance query.
        Not a very elegant API, but needed for some types of nested k-medoids.
        Specified by:
        run in interface KMedoidsClustering<O>
        Overrides:
        run in class PAM<O>
        Parameters:
        relation - relation to use
        k - Number of clusters
        distQ - Distance query to use
        Returns:
        result
      • getLogger

        protected Logging getLogger()
        Description copied from class: PAM
        Get the static class logger.
        Overrides:
        getLogger in class PAM<O>