<< iterthresh Image_Processing_Tool_3 maskthresh >>

Image_Processing_Tool_3 >> Image_Processing_Tool_3 > linkage

linkage

It computes various hierarchical clustering of a given pairwise distance measures.

Calling Sequence

z = linkage(d,method)

Arguments

d

A vector representing a pairwise distance measure.

method

A case insensitive string of three characters representing the name of a method for hiararchical clustering.

z

A three column matrix representing hiararchical clustering matrix for generating a binary tree.

Description

It generates a three column matrix from a pairwise distance vector for generating a binary tree represeting hiarchical clustering. Different method of hierarchical clustering method may be secified in the second parameter as a string of three characters. Possible values of the method are 'ave' for average, 'cen' for centroid, 'com' for complete, 'med' for median, 'sin' for Single (default), 'war' for ward and 'wei' for weighted. If desired complete name of the method may be given. That is, method may be given either as 'sin' or 'single'. The output is a 3 column matrix, first two columns of which represent pairwise cluster indices to be joined and the third column represents the linkage or node distance at which two similar clusters merge.

Examples

// Two column random data 
   x=rand(8,2);
// Pairwise distance between rows of the data
   pdx=pdist(x);
// Linkage matrix of hierarchical clustering
// using 'single' method by default
   y=linkage(pdx)
// Linkage matrix using 'complete' method
   y1=linkage(pdx,'com')

See Also

Authors

<< iterthresh Image_Processing_Tool_3 maskthresh >>