フィルターのクリア

The count of output clusters

3 ビュー (過去 30 日間)
Silpa K
Silpa K 2020 年 1 月 30 日
編集済み: Cris LaPierre 2020 年 2 月 2 日
clc;
clear;
data=xlsread('Pimaxl.xlsx');
minpts=4;
epsilon=2;
tic
idx=dbscan(asc,epsilon,minpts);
eucD = pdist(idx,'euclidean');
Z = linkage(eucD,'average');
toc
How can I show the number of output clusters of dbscan and linkage? Please help me.

採用された回答

Cris LaPierre
Cris LaPierre 2020 年 1 月 30 日
編集済み: Cris LaPierre 2020 年 2 月 2 日
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);
scatter3(X(:,1),X(:,2),X(:,3),10,c)
Therefore, max(c) should tell you the number of clusters.

その他の回答 (0 件)

Community Treasure Hunt

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

Start Hunting!

Translated by