View License

Download apps, toolboxes, and other File Exchange content using Add-On Explorer in MATLAB.

» Watch video

Highlights from
Clustering results measurement

Join the 15-year community celebration.

Play games and win prizes!

» Learn more

Be the first to rate this file! 15 Downloads (last 30 days) File Size: 1.61 KB File ID: #32197 Version: 1.2

Clustering results measurement

by

 

12 Jul 2011 (Updated )

Measure percentage of Accuracy and the Rand index of clustering results

| Watch this File

File Information
Description

Measure percentage of Accuracy and the Rand index of clustering results
The number of class must equal to the number cluster
Output
 Acc = Accuracy of clustering results
 rand_index = Rand's Index, measure an agreement of the clustering results
 match = 2xk matrix which are the best match of the Target and clustering results
Input
 T = 1xn target index
 idx =1xn matrix of the clustering results

 EX:
 X=[randn(200,2);randn(200,2)+6,;[randn(200,1)+12,randn(200,1)]]; T=[ones(200,1);ones(200,1).*2;ones(200,1).*3];
 idx=kmeans(X,3,'emptyaction','singleton','Replicates',5);
  [Acc,rand_index,match]=AccMeasure(T,idx)

MATLAB release MATLAB 7 (R14)
MATLAB Search Path
/
Tags for This File   Please login to tag files.
Please login to add a comment or rating.
Comments and Ratings (4)
11 Jul 2016 Praisan Padungweang

@roslan armina, replace Acc_measure with AccMeasure will work. It's my fault for the example code in the description. It's fixed now.

Comment only
11 Jul 2016 Praisan Padungweang

@Pedro, thank you for pointing out. It's fixed now.

Comment only
08 May 2015 roslan armina

when i use your example, this error come out Undefined function or method 'Acc_measure' for input arguments of type 'double'.
how to solve it? thanks

Comment only
30 Jan 2014 Pedro

Pedro (view profile)

there is a bug in your code since AccMeasure([1 1 1],[2 2 1]) and AccMeasure([2 2 2],[1 1 2]) give different accuracies

Comment only
Updates
11 Aug 2011 1.1

correct the example code

11 Jul 2016 1.2

1. Bug fix.
2. Corrected the example code.

Contact us