| 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 increasing rank
order, for any available scoring method. The available scoring methods are
determined by the type and oob arguments 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:
idMethod's index in the methodset list (see Details
in bqs).
rankMethod's rank according to ranking criterion.
score(Only shown when B=0) Method's quadratic
score on the full data.
mean(Only shown when B>0) Method's mean
bootstrap quadratic score.
sterr(Only shown when B>0) Method's standard error
for the bootstrap quadratic score.
lower_qnt(Only shown for "mean" and "lq"
ranking, when B>0)
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, when B>0)
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, when
B>0) Method's mean bootstrap quadratic score minus 1 standard
error.
+1se(Only shown for "1se" ranking, when
B>0) Method's mean bootstrap quadratic score plus 1 standard
error.
Methods with missing ranks are omitted from the printed summary. If all ranks are missing for a given score component, a short message is printed instead of a table.
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.