make_learner_stack: Make a stack of sl3 learners

Description Usage Arguments Value Examples

View source: R/make_learner_stack.R

Description

Produce a stack of learners by passing in a list with IDs for the learners. The resultant stack of learners may then be used as normal.

Usage

1

Arguments

...

Each argument is a list that will be passed to make_learner

Value

An sl3 Stack consisting of the learners passed in as arguments the list argument to this function. This Stack has all of the standard methods associated with such objects.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
# constructing learners with default settings
sl_stack_easy <- make_learner_stack(
  "Lrnr_mean", "Lrnr_glm_fast",
  "Lrnr_xgboost"
)

# constructing learners with arguments passed in
sl_stack <- make_learner_stack(
  "Lrnr_mean",
  list("Lrnr_hal9001",
    n_folds = 10,
    use_min = TRUE
  )
)

jeremyrcoyle/sl3 documentation built on Feb. 3, 2022, 9:12 a.m.