Learn R Programming

SelectBoost.beta (version 0.4.5)

sb_beta_methods: User-friendly methods for sb_beta() results

Description

These S3 helpers make it easier to inspect and visualise the correlation-threshold grid returned by sb_beta(). They surface the stored attributes, reshape the selection frequencies into tidy summaries, and produce quick ggplot2 visualisations for interactive use.

Usage

# S3 method for sb_beta
print(x, digits = 3, ...)

# S3 method for sb_beta summary(object, ...)

# S3 method for summary.sb_beta print(x, digits = 3, n = 10, ...)

autoplot.sb_beta(object, variables = NULL, ...)

Value

summary.sb_beta() returns an object of class summary.sb_beta

containing a tidy data frame of selection frequencies. The plotting and printing methods are invoked for their side effects and return the input object invisibly.

Arguments

x, object

An object of class sb_beta.

digits

Number of decimal places to display when printing.

...

Additional arguments passed on to lower-level methods.

n

Number of rows to show from the summary table when printing.

variables

Optional character vector of variables to retain in the plotted output.

Examples

Run this code
set.seed(42)
sim <- simulation_DATA.beta(n = 50, p = 4, s = 2)
fit <- sb_beta(sim$X, sim$Y, B = 5, step.num = 0.5)
print(fit)
summary(fit)
if (requireNamespace("ggplot2", quietly = TRUE)) {
  autoplot.sb_beta(fit)
}

Run the code above in your browser using DataLab