apaClustering.Hierarchical.AverageLinkage(DistanceMatrix)
=apaClustering.Hierarchical.AverageLinkage(DistanceMatrix)Result
Performs a hierarchical cluster analysis based on the average-linkage (UPGMA) algorithm. Returns a (NumberOfElements-1) x 4 matrix with one row per merge. Column 1 is the index of the cluster, column 2 the index of the first cluster constituent, column 3 the index of the second cluster constituent and column 4 the height of the cluster, i.e. the distance at which the two constituents are merged, on the scale of the input distances.
Syntax
DistanceMatrix: n x n distance matrix, e.g. from apaDistances.Euclidian
Algorithm
See https://en.wikipedia.org/wiki/UPGMA
Remarks
The distance between two clusters is the mean of all pairwise distances between the members of the first and the members of the second cluster (unweighted pair group method with arithmetic mean). After a merge of clusters A and B, the distance to any other cluster C is updated as (nA·d(A,C) + nB·d(B,C)) / (nA + nB), where nA and nB are the numbers of elements in A and B. The results correspond to the average-linkage method of standard statistical software (e.g. scipy or R).
