-
Notifications
You must be signed in to change notification settings - Fork 27
/
Copy pathaxe_model_stack.Rd
76 lines (59 loc) · 1.65 KB
/
axe_model_stack.Rd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/butcher.R
\name{axe_model_stack}
\alias{axe_model_stack}
\alias{axe_call.model_stack}
\alias{axe_ctrl.model_stack}
\alias{axe_data.model_stack}
\alias{axe_env.model_stack}
\alias{axe_fitted.model_stack}
\title{Axing a model_stack.}
\usage{
\method{axe_call}{model_stack}(x, verbose = FALSE, ...)
\method{axe_ctrl}{model_stack}(x, verbose = FALSE, ...)
\method{axe_data}{model_stack}(x, verbose = FALSE, ...)
\method{axe_env}{model_stack}(x, verbose = FALSE, ...)
\method{axe_fitted}{model_stack}(x, verbose = FALSE, ...)
}
\arguments{
\item{x}{A model object}
\item{verbose}{Print information each time an axe method is executed.
Notes how much memory is released and what functions are disabled.
Default is \code{FALSE}.}
\item{...}{Additional arguments. Currently ignored.}
}
\value{
Axed model_stack object.
}
\description{
Axing a model_stack.
Remove the call.
Remove controls used for training.
Remove the training data.
Remove environments.
Remove fitted values.
}
\examples{
\dontshow{if (rlang::is_installed("ranger") & rlang::is_installed("kernlab")) (if (getRversion() >= "3.4") withAutoprint else force)(\{ # examplesIf}
\donttest{
# 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))
}
\dontshow{\}) # examplesIf}
}