PRTools Contents

PRTools User Guide

hclust

HCLUST

hierarchical clustering, faster version

   [LABELS, DENDRO] = HCLUST(D,TYPE,K,OLD)
    DENDRO = HCLUST(D,TYPE)

Input
 D dissimilarity matrix
 TYPE string name of clustering criterion (optional)  's' or 'single' : single linkage (default)  'c' or 'complete' : complete linkage  'a' or 'average' : average linkage  (weighted over cluster sizes)
 K number of clusters (optional)
 OLD Logical, if TRUE return dendrogram in PRTools format. Default
 FALSE

Output
 LABELS vector with labels
 DENDRO arrsy with dendrogram

Description

Computation of cluster labels and a clustering dendrogram for the  objects with a given dissimilarity matrix D. K is the desired number of

clusters. The dendrogram may be plotted by PRTools's PLOTDG or by
Matlab's DENDROGRAM.

    DENDRO = HCLUST(D,TYPE)

As in this case no clustering level is supplied, just the entire  dendrogram is returned. The first row now contains the object indices.

Faster and more advanced tools for cluster analysis may be found in the  ClusterTools toolbox.

Example(s)

 a = gendats([25 25],20,5);     % 50 points in 20-dimensional feature space
 d = sqrt(distm(a));            % Euclidean distances
 dendg = hclustf(d,'complete'); % dendrogram
 plotdg(dendg)
 lab = hclust(d,'complete',2); % labels
 confmat(lab,getlabels(a));     % confusion matrix

See also

plotdg, prkmeans, kcentres, modeseek, emclust, dendrogram,

PRTools Contents

PRTools User Guide

This file has been automatically generated. If badly readable, use the help-command in Matlab.