nclust: No.of clusters

Description Usage Arguments Details Value References See Also Examples

View source: R/nclust.R

Description

Estimates the number of clusters from the bmt run

Usage

1
nclust(bmt_output, prob_threshold = 0.5)

Arguments

bmt_output

output from the bmt run

prob_threshold

probability threshold. Default is 0.5. Do not change it unless you know what you are doing. See the referenced paper

Details

Estimates the number of clusters as the number of big merges + 1. The probability threshold is an adjustment that renders this estimation process more robust to sampling fluctuations. If the sum of the sample frequencies for the two merging clusters in the last big merge is less than 50 percent, we do not report any merges and thus are left with just 1 cluster. See the referenced paper for more details.

Value

The number of clusters

References

  1. P. Radchenko, G. Mukherjee, Convex clustering via l1 fusion penalization, J. Roy. Statist, Soc. Ser. B (Statistical Methodology) (2017) doi:10.1111/rssb.12226.

See Also

bmt

Examples

1
2
3
4
5
library(fusionclust)
set.seed(42)
x<- c(rnorm(1000,-2,1), rnorm(1000,2,1))
out<- bmt(x)
k<- nclust(out)

trambakbanerjee/fusionclust documentation built on June 18, 2021, 5:40 a.m.