Class SingleLinkage

  • All Implemented Interfaces:
    Linkage

    @Reference(authors="K. Florek, J. \u0141ukaszewicz, J. Perkal, H. Steinhaus, S. Zubrzycki",
               title="Sur la liaison et la division des points d\'un ensemble fini",
               booktitle="Colloquium Mathematicae 2(3-4)",
               bibkey="journals/misc/FlorekLPSZ51")
    @Alias({"single-link","single","slink","nearest","nearest-neighbor"})
    @Priority(100)
    public class SingleLinkage
    extends java.lang.Object
    implements Linkage
    Single-linkage ("minimum") clustering method.

    The distance of two clusters is simply the minimum of all pairwise distances between the two clusters.

    The distance of two clusters is defined as: \[d_{\min}(A,B):=\min_{a\in A}\min_{b\in B} d(a,b)\]

    This can be computed recursively using: \[d_{\min}(A\cup B,C) = \min(d(A,C), d(B,C))\]

    Note that with similarity functions, one would need to use the maximum instead to get the same effect.

    Reference:

    K. Florek, J. Ɓukaszewicz, J. Perkal, H. Steinhaus, S. Zubrzycki
    Sur la liaison et la division des points d'un ensemble fini
    Colloquium Mathematicae 2(3-4)

    Since:
    0.6.0
    Author:
    Erich Schubert
    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
      static class  SingleLinkage.Par
      Class parameterizer.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static SingleLinkage STATIC
      Static instance of class.
    • Constructor Summary

      Constructors 
      Constructor Description
      SingleLinkage()
      Deprecated.
      use the static instance STATIC instead.
    • 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
    • Field Detail

      • STATIC

        public static final SingleLinkage STATIC
        Static instance of class.
    • Constructor Detail

      • SingleLinkage

        @Deprecated
        public SingleLinkage()
        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