
7.7 Hierarchical Clustering Algorithms 203
To run the generalized agglomerative scheme (GAS), type
[bel, thres] = agglom(prox_mat,code)
where
prox_mat is the N×N dissimilarity matrix for the N vectors of the data set X,
( prox_mat(i, j) is the distance between vectors x
i
and x
j
),
code is an integer indicating the specific clustering algorithm to be used (1 stands for single link;
2 stands for complete link),
bel is an N ×N matrix whose (i, j) element contains the cluster label for the jth vector in the ith
clustering. (The first row of bel corresponds to the N -cluster clustering; the second row, to the
(N −1)-cluster clustering; and the Nth row, to th