Return clusters generated from a distance vector created by the pdist function.
Methods can be:
- ‘"single" (default)’
- Shortest distance between two clusters (aka a minimum spanning tree)
- ‘"complete"’
- Furthest distance between two clusters
- ‘"average"’
- Unweighted average distance (aka group average)
- ‘"weighted"’
- Weighted average distance
- ‘"centroid"’
- Centroid distance (not implemented)
- ‘"median"’
- Weighted center of mass distance
- ‘"ward"’
- Inner squared distance (minimum variance)
x is an ((m-1)*(m/2) x 1) distance vector as generated by pdist, and the output, y is an ((m - 1) x 3) vector defined with columns where the first and second columns are the cluster numbers of the two sub-clusters in the cluster, and the third column is the distance between those sub-clusters. The sub-clusters are numbered where 1 to m are the input elements, and m+1 to the end are subsequently defined clusters.