1
$\begingroup$

I am trying to implement a hierarchical clustering in Matlab but I don't want to use an arbitrary maximum number of clusters, which you have to specify in the clusterdata or cluster function. Instead I want to use a minimum cluster size threshold (e.g. each cluster must contain at least 1% of the observations).

My workaround so far is to give the cluster function a vector of cutoffs and then keep the results that don't contain any too small clusters for further analysis. However, the drawback here is that I end up with a matrix where each column is an individual run of of the hierarchical clustering with a different maximum amount of clusters and I lose the connections between the clusters of different runs. This is a problem because afterwards I would like to construct a graph with the nodes representing the clusters including internal nodes. Meaning the clusters need to be "connected" across the runs with different cutoffs where individual observations can be assigned to more than one cluster.

For example if I had 10 observations and a cluster size threshold of 20% I would keep the following 5 columns (with descending number of clusters):

[1 3 1 2 1; 2 1 3 1 1: 1 1 3 2 1; 4 2 3 2 1; 5 3 2 2 1; 2 4 2 1 1; 3 4 1 2 1; 3 2 2 1 1; 4 3 1 1 1; 5 1 3 1 1]

This means I can't tell which cluster corresponds to which across different runs and I don't know which clusters have been merged into one from one run to another.

Is there maybe a better solution than my workaround to do a hierarchical clustering with a cluster size threshold?

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.