Skip to content

classbagg objects are created from the ipred package, which leverages various resampling and bagging techniques to improve predictive models.

Usage

# S3 method for classbagg
axe_call(x, verbose = FALSE, ...)

# S3 method for classbagg
axe_data(x, verbose = FALSE, ...)

# S3 method for classbagg
axe_env(x, verbose = FALSE, ...)

Arguments

x

A model object.

verbose

Print information each time an axe method is executed. Notes how much memory is released and what functions are disabled. Default is FALSE.

...

Any additional arguments related to axing.

Value

Axed classbagg object.

Examples

# Load libraries
library(ipred)
library(rpart)
library(MASS)

# Load data
data("GlaucomaM", package = "TH.data")

classbagg_fit <- bagging(Class ~ ., data = GlaucomaM, coob = TRUE)

out <- butcher(classbagg_fit, verbose = TRUE)
#>  Memory released: "2.88 MB"
#>  Disabled: `print()` and `summary()`

# Fit another model
data("DLBCL", package = "ipred")

mod <- bagging(Gene.Expression ~ MGEc.1 + MGEc.2 + MGEc.3 + MGEc.4 + IPI,
               data = DLBCL,
               coob = TRUE)

out <- butcher(mod, verbose = TRUE)
#>  Memory released: "4.46 MB"
#>  Disabled: `print()` and `summary()`