ClusterTools Contents

ClusterTools User Guide

mclustcerr

MCLUSTCERR

Cluster classification error based on combining clusterings

    [E,N} = MCLUSTCERR(LABC,LABT)
    [E,N] = MCLUSTCERR(LABC,A)
    [E,N] = LABC*MCLUSTCERR(LABT)

Input
 LABC Index array, size [M,K], indices of cluster prototypes for M objects in K clusterings.
 LABT Vector of M elements with true object labels.
 A PRTools labeled dataset used for the clustering.

Output
 E Vector with classification errors of the clusterings in LABC.
 N Vector with number of clusters per clustering.

Description

This routine evaluates a clustering of a dataset A by comparing the true  labels LABT of A with cluster labels derived from a cluster prototype  object by combining the multilevel clustering LABC using CLUSTC. This  can be understood as evaluating the clusterings by active labeling.

A is a labeled dataset with M objects. LABT should be a vertical vector  containing the true numeric labels of A. LABT = GETNLAB(A). LABC is a set  of K clustering results with indices pointing for every object to a  cluster prototype in A.

E is the fraction of misclassified objects in A. It reports an error for  every clustering (column of LABC). Use CLUSTCERR for a faster result that  does not combine cluster levels and which has thereby usually a smaller  performance. The length of E and N might differ from K.

Example(s)

 A = gendat(mnist8,25000);
 labc = A*clustm([],false); % do not recluster
 [e1,n1] = clustcerr(labc,A);
 [e2,n2] = mclustcerr(labc,A);
 figure;
 semilogx(n1,e1); hold on
 semilogx(n2,e2);
 title(['Active learning curve: ' getname(A)])
 xlabel('Training set size - number of clusters')
 ylabel('Classification error')
 legend('Single clusterings','Combined clusterings')
 fontsize(16)

See also

datasets, mappings, knnc, cluste, clusth, clustk, clustkh, clustm, clustf, clustr, dcluste, dclustf, dclusth, dclustk, dclustm, dclustr, clusteval, clustc, clustnum, clustcerr, mclustlcurve,

ClusterTools Contents

ClusterTools User Guide

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