In contrast to stats::cutree(), this can output more than k clusters. However, the output should contain k clusters that are of nontrivial size. The largest cluster should be labeled as "1", the next biggest as "2" and so on
1 | MPcutree(tree, k = 2, minsize = 1/(10 * k))
|
tree |
tree object output by hclust |
k |
integer, number of clusters to output |
minsize |
numeric in range [0, 1], minimal size of the clusters |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.