plot_bqs: Plot (Bootstrap) Quadratic Score Results

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 is expected to have the component rankby set.

score

Character vector specifying the score(s) to be plotted. Valid scores are "hard", "smooth", "oob_hard", and "oob_smooth". If NULL (default), all valid scores present 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.

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).

...

Further arguments passed to or from other methods.

Value

A plot displaying the Bootstrap Quality Scores.

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 April 3, 2025, 6:16 p.m.

Related to plot_bqs in qcluster...