axe_model_stack: Axing a model_stack.

Description Usage Arguments Value Examples

Description

Axing a model_stack.

Remove the call.

Remove controls used for training.

Remove the training data.

Remove environments.

Remove fitted values.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
## 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

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
# 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))

stacks documentation built on July 23, 2021, 5:08 p.m.