optClust | R Documentation |
The optClust is a simple attempt to set a threshold on where to cut the an hclust tree. The aim is to maximize the number of clusters with multiple-cells while minimizing the number of one-cell clusters.
optClust(cnr, opt.range = seq(0.005, 0.6, by = 0.005))
cnr |
a cnr bundle |
opt.range |
range of tree heights that need to be optimized |
Returns a matrix where rows are the heights in the opt.range and three columns.
One-cell specifies the number of clusters with only one cell, Multi-cell specifies the number of clusters with multiple cells (>=2), and the percentage of cells in multi-cell clusters (
A suitable threshold is one that minimizes the one-cell cluster and maximizes the
data(cnr)
cnr <- phylo_cnr(cnr)
## macro optimization
optClust(cnr, opt.range = seq(0, 0.3, by = 0.05))
## for micro-optimization
optClust(cnr, opt.range = seq(0, 0.2, by = 0.001))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.