Interface ClusteringAlgorithm

All Known Implementing Classes:
DefaultClusteringAlgorithm, PDistClusteringAlgorithm

public interface ClusteringAlgorithm
Defines algorithms that produce hierarchical clusters from distance data.
Since:
1.0
Author:
Lars Behnke, 2013, Michael J. Schnieders
  • Method Summary

    Modifier and Type
    Method
    Description
    performClustering(double[][] distances, String[] clusterNames, LinkageStrategy linkageStrategy)
    Performs hierarchical agglomerative clustering on a square distance matrix.
    performFlatClustering(double[][] distances, String[] clusterNames, LinkageStrategy linkageStrategy, Double threshold)
    Performs a flat clustering by agglomerating until the next linkage distance would exceed the provided threshold, and returns the list of clusters at that cut.
    performWeightedClustering(double[][] distances, String[] clusterNames, double[] weights, LinkageStrategy linkageStrategy)
    Performs hierarchical clustering when each initial element has an associated weight.
  • Method Details

    • performClustering

      Cluster performClustering(double[][] distances, String[] clusterNames, LinkageStrategy linkageStrategy)
      Performs hierarchical agglomerative clustering on a square distance matrix.
      Parameters:
      distances - an N x N symmetric matrix of pairwise distances (upper triangle used)
      clusterNames - an array of N names corresponding to rows/columns of distances
      linkageStrategy - the linkage criterion used to update inter-cluster distances
      Returns:
      the root Cluster of the resulting hierarchy (dendrogram)
    • performWeightedClustering

      Cluster performWeightedClustering(double[][] distances, String[] clusterNames, double[] weights, LinkageStrategy linkageStrategy)
      Performs hierarchical clustering when each initial element has an associated weight.
      Parameters:
      distances - an N x N symmetric matrix of pairwise distances
      clusterNames - an array of N names corresponding to the input elements
      weights - an array of N non-negative weights for the input elements
      linkageStrategy - the linkage criterion used to update inter-cluster distances
      Returns:
      the root Cluster of the resulting hierarchy (dendrogram)
    • performFlatClustering

      List<Cluster> performFlatClustering(double[][] distances, String[] clusterNames, LinkageStrategy linkageStrategy, Double threshold)
      Performs a flat clustering by agglomerating until the next linkage distance would exceed the provided threshold, and returns the list of clusters at that cut.
      Parameters:
      distances - an N x N symmetric matrix of pairwise distances
      clusterNames - an array of N names corresponding to the input elements
      linkageStrategy - the linkage criterion used to update inter-cluster distances
      threshold - the maximum allowed inter-cluster linkage distance for merging
      Returns:
      list of clusters obtained at the specified threshold