print.bqs: Display Information on Bootstrap Quadratic Scores Objects

View source: R/print_bqs.R

print.bqsR Documentation

Display Information on Bootstrap Quadratic Scores Objects

Description

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.

Usage

## S3 method for class 'bqs'
print(x, ...)

Arguments

x

An object of class bqs, usually the output of the bqs function.

...

Additional arguments passed to or from other methods.

Details

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:

id

Method's index in the methodset list (see Details in bqs).

rank

Method'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.

Value

No return value, called for side effects.

See Also

bqs, bqs_rank

Examples


# 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



qcluster documentation built on June 5, 2026, 5:07 p.m.

Related to print.bqs in qcluster...