How to create exact ONE cluster containing 50% of the data using hierachical clustering

2 次查看(过去 30 天)
Hi all,
usually, I cluster my data using the pdist, linkage and cluster function as already build-in in Matlab. Now, I need to construct only one cluster that contains e.g. 50% (or 75%) of my data, while the others should not be clustered. I already have manipulated the linkage function and used the "centroid" mode for the distance measure. Would it be possible also to manipulate the cluster function in that way, that only one cluster is constructed that contains 50% (or 75%) of the data based on the linkage calculated before?
Many thanks in advance!
Cheers,
Nico

回答(1 个)

Vatsal
Vatsal 2023-10-5
Hi Nico,
I understand that you want to create a single cluster that includes either 50% or 75% of the data, while leaving the remaining points unclustered. However, achieving this directly using the "cluster" and "linkage" functions is not possible. As a workaround, I suggest using the k-means or cluster function to create two clusters and set the "cutoff" parameter value to a large number. This will result in larger clusters, and then you can adjust the cluster size accordingly.
I hope this suggestion proves helpful to you!

类别

Help CenterFile Exchange 中查找有关 Classification 的更多信息

产品


版本

R2021a

Community Treasure Hunt

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

Start Hunting!

Translated by