How do I extract each element from dbscan clusters

6 ビュー (過去 30 日間)
George
George 2023 年 7 月 6 日
コメント済み: George 2023 年 7 月 6 日
For my project I use dbscan for clustering. To proceed now I want to know all corepoints of each cluster.
I know that dbscan function in matlab takes data, eps, and minpts as the arguments, and return idx. But how to get info regarding which corepoints belong to each cluster.
Any help from community will be very helpful. Thanks

採用された回答

VM Sreeram
VM Sreeram 2023 年 7 月 6 日
If you refer to the documentation you'll find an alternate syntax for dbscan which might be useful in your case.
[idx,corepts] = dbscan(data,eps,minpts);
Here, corepts is a logical vector containing core points identified by dbscan. A value 1 in any row of corepts indicates that the corresponding observation is a core point. Otherwise it has a value 0.
If what you meant by corepoints is the data of core points, and if you want cluster numbers of these core points you may do
[idx,corepts] = dbscan(data,eps,minpts);
corepoints = data(corepts,:);
clust_nums = idx(corepts,:);
  1 件のコメント
George
George 2023 年 7 月 6 日
Thank you for your response.

サインインしてコメントする。

その他の回答 (0 件)

製品


リリース

R2022a

Community Treasure Hunt

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

Start Hunting!

Translated by