DBSCAN algorithm and Rand index

6 visualizzazioni (ultimi 30 giorni)
as nem
as nem il 3 Mag 2016
Risposto: Marco Riani il 2 Set 2021
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 ?

Risposte (1)

Marco Riani
Marco Riani il 2 Set 2021
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

Categorie

Scopri di più su Statistics and Machine Learning Toolbox in Help Center e File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by