File Exchange

image thumbnail

CVAP: Cluster Validity Analysis Platform (cluster analysis and validation tool)

version 1.3 (80.5 KB) by

supplying over 17 validity indices and 5 clustering algorithms based on GUI

17 Ratings



View License

Cluster validation is an important and necessary step in cluster analysis. This visual cluster validation tool CVAP based on GUI provides important tools and convenient analysis environment for validity evaluation of clustering solutions, estimation of the number of clusters and performance comparison between candidate clustering algorithms.

CVAP includes 4 External validity indices, 14 Internal validity indices and 5 clustering algorithms (K-means, PAM, hierarchical clustering and etc.). It supports other clustering algorithms via loading a solution file with class labels, or by adding new codes. And similarity metrics of Euclidean distance and Pearson correlation coefficient are supported.

Some useful information and references are in help files "Readme.txt", please read them first.

Comments and Ratings (39)

CVAP does not run correctly in versions of Matlab superior to 2013.

Phu Lai

Dunn Index needs to be reviewed.

Phu Lai

Agree with NR P's comment below. DB Index also needs to be reviewed.

Phu Lai

Be careful when using internal validation. The computation of CH and KL Index seem to be not correct.

Phu Lai

I've found some problem with 2016b, GUI doesn't semm to have all buttuns and funcionalities

Auri A

Auri A (view profile)

CVAP runs perfectly in 2012 matlab version.

Auri A

Auri A (view profile)

I am facing problem while including fuzzy c-means algorithm in CVAP code.Can anyone help me with this?

follow up with my previous question, I found the answer!

Hi All,
I am facing problem with using PAM, it seems that the function pamc in line 158 from the pam function is missing!
have anyone faced the same problem before?
pls, advice?

Anis Najar

Hello, the tool does not seem to work properly in Matlab2015a!!

Great tool, very useful.
I´ll like to know how can be added new distances measures to the GUI, since I´ll like try specific measures for the data i´m working with, like Mahalanobis distance.


please can you indicate me codes about the (f-meseare index) and (silhouette index)
i'm begginer in matlab and i must prepare a home work this week using these indexes

please help me if it is possible

On the main form, DateSet is not loading. ANy suggestions?

Bikram Kawan

I am using matlab r2014b. It seems not working with this version. Have anyone tried in this version?



Thank you for this work

i am working for my project on dynamic clustering of iris data using pso
i hav used your code for db index in my code
but i have a trouble with the results
most of the papers give 0.45 for the mean value of db index
but i find 0.219 as mean value for db index
can you please indicate me if it is possible

arturo Garcia

Hola estoy haciendo un trabajo sobre clustering, y necesito validar el grupo de datos.


NR P (view profile)

Please review valid_internal_deviation.m: I believe it has errors in the correction factors for Calinski-Harabasz and Krzanowski-Lai indices, and Davies-Bouldin index estimante apper to derive for incomplete pairwise estimates.


NR P (view profile)


When applying kmeans algorithm with euclidean distance function, kmeans algorithm in valid_clusteringAlgs.m (at line 29 of CVAP 3.7 version) uses the distance function R = 'sqEuclidean';. However, when evaluating with silhouette measure in valid_internal.m(at line of 28), the code uses R = 'euclidean';. I think the same distance function should be used.

Nejc Ilc

Nejc Ilc (view profile)

Many thanks to the author for his valuable and useful contribution. However, I think there is a bug in the implementation of the Dunn's index.

I have compared results from CVAP with the Julian Ramos' implementation ( and also with R package clValid. Output values from clValid and Ramos' code are identical, whereas the CVAP results are not in an agreement with them. I think there are errors in computing the diameter of clusters and the shortest distance between clusters (function 'valid_sumsqures'). Please, consider revising this part of code.


Lucas (view profile)

As this was made for an older version of matlab, the pamc.dll is no longer valid.
To solve errors with the pamc function, download the latest mex files from here:

32-bit win => pamc.mexw32
64-bit win => pamc.mexw64

Alternatively, 32-bit windows users can also try renaming the pamc.dll to pamc.mexw32 although this has not been tested.


Lucas (view profile)

The link below should be :


LI (view profile)

I find there is a problem in the CVAP, when I used the pam.m, it must call the pamc.m, but the pamc.m is not exist in this CVAP


Joseph (view profile)

What is the best place to add a validity indices? I saw the place for a new clustering algorithm, but don't see anything similar for indices.


can (view profile)

I think this tool is good.


Karin (view profile)

I am having trouble uploading a data file. Mine is a .txt, but I still get loads of errors. Why?

??? Attempted to access data(:,1); index out of bounds because size(data)=[0,0].
Error in ==> valid_data_load at 18
   handles.truelabels = data(:,1);

zhen gao

How to use it. When I type "mainCVAP"
It shows "Undefined function or variable 'mainCVAP'". Why?

agnes cawas

I'm looking for method to validate the result cluster with k-means and I exactly refuse to know about validate k-means you have any idea?
then i read this article and I want to know how to calculate the error rate of the result for k-means clustering...
is this use SSE(sum square error)?
please replies me...

Cara Tobin

Hello, this model is very user-friendly with the demo files. However, if I have 8000 parameter sets (each with 3 parameters), how does one prepare the input file? I had a matrix of 8000 rows with 3 columns (no classes) and this didnt seem to work. Any suggestions? THANK YOU!! Cara

Gilles Criton

Very useful, I have looked for such a tool for a long time. Do you have developed a validity indice for subspace clustering ?

Thank you very much, great job !

Dennis Lorch

Very good tool. Does anyone know how to include alternative distances in this GUI?

Guillermo Quintas

I found this job really good and very usefull. I have include the option of using matrices from the workspace. I thonk that it really improve the usefulness of the GUI.

Leon Kegel

Very useful toolbox.
You have done realy a great job on CVAP!

yurniar rica

i need matlab code hierarchical clustering for image...

ling zhao

 I think your toolbox is just fine. It will be used for me.



new release (version 3.7)


new release (version 3.6)


new release CVAP3.6

new release CVAP3.5

new release (version 3.42)

new release (version 3.4)

MATLAB Release
MATLAB 7.2 (R2006a)

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

» Watch video