Skip to content

Axing a model_stack.

Remove the call.

Remove controls used for training.

Remove the training data.

Remove environments.

Remove fitted values.

Usage

# S3 method for class 'model_stack'
axe_call(x, verbose = FALSE, ...)

# S3 method for class 'model_stack'
axe_ctrl(x, verbose = FALSE, ...)

# S3 method for class 'model_stack'
axe_data(x, verbose = FALSE, ...)

# S3 method for class 'model_stack'
axe_env(x, verbose = FALSE, ...)

# S3 method for class 'model_stack'
axe_fitted(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.

...

Additional arguments. Currently ignored.

Value

Axed model_stack object.

Examples

if (FALSE) {

# build a regression model stack
st <-
  stacks() %>%
  add_candidates(reg_res_lr) %>%
  add_candidates(reg_res_sp) %>%
  blend_predictions() %>%
  fit_members()
  
# remove any of the "butcherable"
# elements individually
axe_call(st)
axe_ctrl(st)
axe_data(st)
axe_fitted(st)
axe_env(st)

# or do it all at once!
butchered_st <- butcher(st, verbose = TRUE)

format(object.size(st))
format(object.size(butchered_st))
}