Azzera filtri
Azzera filtri

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

1 visualizzazione (ultimi 30 giorni)
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!

Risposte (1)

Vatsal il 5 Ott 2023
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!




Community Treasure Hunt

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

Start Hunting!

Translated by