Interface AgglomerationMethod

  • All Known Implementing Classes:
    AverageLinkage, CentroidLinkage, CompleteLinkage, MedianLinkage, SingleLinkage, WardLinkage, WeightedAverageLinkage

    public interface AgglomerationMethod
    An AgglomerationMethod represents the Lance-Williams dissimilarity update formula used for hierarchical agglomerative clustering. The general form of the Lance-Williams matrix-update formula: d[(i,j),k] = ai*d[i,k] + aj*d[j,k] + b*d[i,j] + g*|d[i,k]-d[j,k]| Parameters ai, aj, b, and g are defined differently for different methods: Method ai aj b g ------------- ------------------ ------------------ ------------------------ ----- Single 0.5 0.5 0 -0.5 Complete 0.5 0.5 0 0.5 Average ci/(ci+cj) cj/(ci+cj) 0 0 Centroid ci/(ci+cj) cj/(ci+cj) -ci*cj/((ci+cj)*(ci+cj)) 0 Median 0.5 0.5 -0.25 0 Ward (ci+ck)/(ci+cj+ck) (cj+ck)/(ci+cj+ck) -ck/(ci+cj+ck) 0 WeightedAverage 0.5 0.5 0 0 (ci, cj, ck are cluster cardinalities)
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      double computeDissimilarity​(double dik, double djk, double dij, int ci, int cj, int ck)
      Compute the dissimilarity between the newly formed cluster (i,j) and the existing cluster k.
    • Method Detail

      • computeDissimilarity

        double computeDissimilarity​(double dik,
                                    double djk,
                                    double dij,
                                    int ci,
                                    int cj,
                                    int ck)
        Compute the dissimilarity between the newly formed cluster (i,j) and the existing cluster k.
        Parameters:
        dik - dissimilarity between clusters i and k
        djk - dissimilarity between clusters j and k
        dij - dissimilarity between clusters i and j
        ci - cardinality of cluster i
        cj - cardinality of cluster j
        ck - cardinality of cluster k
        Returns:
        dissimilarity between cluster (i,j) and cluster k.