The count of output clusters
2 views (last 30 days)
eucD = pdist(idx,'euclidean');
Z = linkage(eucD,'average');
How can I show the number of output clusters of dbscan and linkage? Please help me.
Cris LaPierre on 30 Jan 2020
Edited: Cris LaPierre on 2 Feb 2020
I would think max(idx) should tell you the number of clusters dbscan found.
For linkage, I think this is easiest if you use the cluster function. This example comes from the documentation.
X = rand(20000,3);
Z = linkage(X,'ward');
c = cluster(Z,'Maxclust',4);
Therefore, max(c) should tell you the number of clusters.