DBSCAN algorithm and Rand index

4 次查看(过去 30 天)
as nem
as nem 2016-5-3
Hi,
I used DBSCAN and clustered a dataset, As known, result clusters have a noise cluster.Then I want to estimate Rand index on result cluster. But I have noise cluster ,There is not a response of noise points in contingency table. how can I use noise cluster for estimate contingency table ? Whether I ignore noise result or not ?

回答(1 个)

Marco Riani
Marco Riani 2021-9-2
Function RandIndexFS of the FSDA toolbox does what you asked.
For a preview of the documentation of this function please see
Below there is an example of the use of this function
load fisheriris
% first partition c1 is the true partition
c1=species;
% second partition c2 is the output of tclust clustering procedure
k=3;
out=tclust(meas,k,0.1,100,'msg',0);
c2=out.idx;
% Units inside c2 which contain number 0 are referred to trimmed observations
% With option noisecluster you can decide to ignore or not to ignore
% noise cluster
noisecluster=0;
[ARI,RI,MI,HI]=RandIndexFS(c1,c2,noisecluster);
disp("adjusted ARI index ignoring noise cluster")
disp(ARI)
% Contingency table
[tbl,~,~,labels]=crosstab(c1,c2);
TBL=array2table(tbl,'RowNames',labels(1:3,1),'VariableNames',labels(1:k+1,2));
disp(TBL)
Hope it helps
Marco

类别

Help CenterFile Exchange 中查找有关 Statistics and Machine Learning Toolbox 的更多信息

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by