public class SingleLinkage extends Linkage
Single linkage clustering is essentially the same as Kruskal's algorithm for minimum spanning trees. However, in single linkage clustering, the order in which clusters are formed is important, while for minimum spanning trees what matters is the set of pairs of points that form distances chosen by the algorithm.
Constructor and Description |
---|
SingleLinkage(double[][] proximity)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
merge(int i,
int j)
Merge two clusters into one and update the proximity matrix.
|
java.lang.String |
toString() |
getProximity
public SingleLinkage(double[][] proximity)
proximity
- The proximity matrix to store the distance measure of
dissimilarity. To save space, we only need the lower half of matrix.