Class SingleLinkage
- java.lang.Object
-
- ch.usi.inf.sape.hac.agglomeration.SingleLinkage
-
- All Implemented Interfaces:
AgglomerationMethod
public final class SingleLinkage extends java.lang.Object implements AgglomerationMethod
The "single linkage", "minimum", "shortest distance", or "nearest neighbor" method is a graph-based approach. The distance between two clusters is calculated as the smallest distance between two objects in opposite clusters. This method tends to produce loosely bound large clusters with little internal cohesion. Linear, elongated clusters are formed as opposed to the more usual spherical clusters. This pheonomenon is called chaining. [The data analysis handbook. By Ildiko E. Frank, Roberto Todeschini] This method can cause "chaining" of clusters.
-
-
Constructor Summary
Constructors Constructor Description SingleLinkage()
-
Method Summary
All Methods Instance Methods Concrete 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.java.lang.String
toString()
-
-
-
Method Detail
-
computeDissimilarity
public double computeDissimilarity(double dik, double djk, double dij, int ci, int cj, int ck)
Description copied from interface:AgglomerationMethod
Compute the dissimilarity between the newly formed cluster (i,j) and the existing cluster k.- Specified by:
computeDissimilarity
in interfaceAgglomerationMethod
- Parameters:
dik
- dissimilarity between clusters i and kdjk
- dissimilarity between clusters j and kdij
- dissimilarity between clusters i and jci
- cardinality of cluster icj
- cardinality of cluster jck
- cardinality of cluster k- Returns:
- dissimilarity between cluster (i,j) and cluster k.
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-