plot.bqs: Plot (Bootstrap) Quadratic Score Results

View source: R/plot_bqs.R

plot.bqsR Documentation

Plot (Bootstrap) Quadratic Score Results

Description

Produce a plot of bqs (Bootstrap Quadratic Scores). This function creates plots based on the BQS (Bootstrap Quality Scores) data.

Usage

## S3 method for class 'bqs'
plot(x, score = NULL, perc_scale = FALSE, top = NULL, annotate = NULL, ...)

Arguments

x

An S3 object of class bqs as returned by the bqs function. x must be ranked, i.e. it must have a non-missing rankby component.

score

Character vector specifying the score(s) to be plotted. Valid scores are "hard", "smooth", "oob_hard", and "oob_smooth". If NULL (default), all score components available in x are plotted.

perc_scale

Logical; if TRUE, scales the plot using percentages, relative to the best score. Default is FALSE.

top

Numeric; specifies the number of top models to individually highlight. Must be a single number less than or equal to the length of x$methodset. If NULL (default), top is automatically determined based on the score values. Top models are emphasized visually, not filtered.

annotate

Logical; if TRUE, annotates the top models in the plot. Default is automatically determined (TRUE if the number of methods M <= 30, FALSE otherwise). Annotations include method names and plotted score values.

...

Further arguments passed to or from other methods.

Details

The annotate argument is mainly intended to control built-in labels, but setting it to FALSE also leaves more room for expert users to add custom annotations after the plot is drawn.

Value

No return value, called for side effects.

See Also

bqs

Examples


# load data
data("banknote")
dat <- banknote[-1]

# set up methods
mlist <- mset_gmix(K = 1:3, erc = c(1, 100))

# perform bootstrap
# change B and ncores to a much larger value in real problems
res <- bqs(dat, mlist, B = 3, type = "both", rankby = "lq",
           ncores = 1, oob = TRUE, savescores = FALSE, saveparams = FALSE)

# Plot with default settings
plot(res)

# Plot in percentage scale relative to first model
plot(res, perc_scale = TRUE)



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

Related to plot.bqs in qcluster...