Class WeightedAverageLinkage

  • All Implemented Interfaces:
    Linkage

    @Reference(authors="R. R. Sokal, C. D. Michener",
               title="A statistical method for evaluating systematic relationship",
               booktitle="University of Kansas science bulletin 28",
               url="https://archive.org/details/cbarchive_33927_astatisticalmethodforevaluatin1902",
               bibkey="journals/kansas/SokalM1902")
    @Alias({"wpgma","WPGMA"})
    @Priority(-1)
    public class WeightedAverageLinkage
    extends java.lang.Object
    implements Linkage
    Weighted average linkage clustering method (WPGMA).

    This is somewhat a misnomer, as it actually ignores that the clusters should likely be weighted differently according to their size when computing the average linkage. See GroupAverageLinkage for the UPGMA method that uses the group size to weight the objects the same way. Because of this, it is sometimes also called "simple average".

    There does not appear to be a closed form distance for this clustering, but it is only defined recursively on the previous clusters simply by \[d_{\text{WPGMA}}(A\cup B,C):=\tfrac{1}{2}d(A,C)+\tfrac{1}{2}d(B,C)\]

    MedianLinkage (WPGMC) is similar in the sense that it is ignoring the cluster sizes, and therefore the weight of points decreases with the depth of the tree. The method is "weighted" in the sense that the new members get the weight adjusted to match the old cluster members.

    Reference:

    R. R. Sokal, C. D. Michener
    A statistical method for evaluating systematic relationship
    University of Kansas science bulletin, 28, 1409-1438. (1958)

    Since:
    0.6.0
    Author:
    Erich Schubert
    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
      static class  WeightedAverageLinkage.Par
      Class parameterizer.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      double combine​(int sizex, double dx, int sizey, double dy, int sizej, double dxy)
      Compute combined linkage for two clusters.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • WeightedAverageLinkage

        @Deprecated
        public WeightedAverageLinkage()
        Deprecated.
        use the static instance STATIC instead.
        Constructor.
    • Method Detail

      • combine

        public double combine​(int sizex,
                              double dx,
                              int sizey,
                              double dy,
                              int sizej,
                              double dxy)
        Description copied from interface: Linkage
        Compute combined linkage for two clusters.
        Specified by:
        combine in interface Linkage
        Parameters:
        sizex - Size of first cluster x before merging
        dx - Distance of cluster x to j before merging
        sizey - Size of second cluster y before merging
        dy - Distance of cluster y to j before merging
        sizej - Size of candidate cluster j
        dxy - Distance between clusters x and y before merging
        Returns:
        Combined distance