print.bqs | R Documentation |
This function provides a print method for objects of class bqs
, which are produced by the bqs
function. It prints a summary of the bootstrapped quadratic score results for the clustering solutions considered.
## S3 method for class 'bqs'
print(x, ...)
x |
An object of class |
... |
Additional arguments passed to or from other methods. |
The print.bqs
function provides a print method for objects of class bqs
.
If clustering solutions in bqs
are not ranked, the printing method displays a message to the user signalling it. Otherwise, the printing method shows a summary of the top-6 ranked solutions, in decreasing order, for any available scoring method (this is determined by the oob
argument used in input to the bqs
function. See Details in bqs
).
The summary tables for ranked methods has row.names
set to the method's codename, and shows the following information along the columns:
id
Method's index in the methodset
list (see Details in bqs
).
rank
Method's rank according to ranking criterion.
mean
Method's mean (bootstrap) quadratic score.
sterr
Method's standard error for the (bootstrap) quadratic score.
lower_qnt
(Only shown for "mean" and "lq" ranking) Method's lower alpha/2
-level quantile of the bootstrap distribution of the quadratic score (alpha
is given in input to bqs
function).
upper_qnt
(Only shown for "mean" and "lq" ranking) Method's upper alpha/2
-level quantile of the bootstrap distribution of the quadratic score (alpha
is given in input to bqs
function).
-1se
(Only shown for "1se" ranking) Method's mean (bootstrap) quadratic score minus 1 standard error.
-1se
(Only shown for "1se" ranking) Method's mean (bootstrap) quadratic score plus 1 standard error.
No return value, called for side effects
bqs
, bqs_rank
# 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 = 100, type = "both", rankby=NA, ncores = 1,
oob = TRUE, savescores = TRUE, saveparams = FALSE)
# Methods are not ranked; only available components are shown
res
# Rank method and show summaries
ranked_res <- bqs_rank(res, rankby = "lq", boot_na_share = 0.25)
ranked_res
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.