# \donttest{
# Load data and set seet
set.seed(123)
data("banknote")
dat <- banknote[-1]
# set up kmeans, see help('mset_kmeans')
KM <- mset_kmeans(K = 2:5)
# set up Gaussian model-based clustering via gmix()
GMIX <- mset_gmix(K=2:5, erc=c(1, 50 , 100))
# combine tuned methods
mlist <- mbind(KM, GMIX)
# perform bootstrap
# se 'ncores' to the number of available physical cores
res <- bqs(dat, mlist, B = 20, type = "both", rankby=NA, ncores = 1,
oob = TRUE, savescores = TRUE, saveparams = FALSE)
# Methods are not ranked; this will raise an error
try(bqs_select(res, rank = 1))
# Rank method dynamically
ranked_res <- bqs_select(res, rank = 2, rankby = "lq", boot_na_share = 0.25)
names(ranked_res)
# }
Run the code above in your browser using DataLab