convert_to_learners: Converts List of Base Learner Specs into one Super Learner...

Description Usage Arguments Value

View source: R/convert_learners.R

Description

The "Learner Spec" objects in both sherlock_calculate and est_cate can be an instantiated learner object, or a list of learners to be instantiated. To use base learners that require model specification (e.g., GLMs or regularized regression), then we need to specify the interaction terms using the original column names from the input dataset. This internal function converts those names to the abstracted names.

Usage

1
convert_to_learners(learner, npsem, use_cv_selector = F)

Arguments

learner

Either an instantiated learner object, with class inheriting from Lrnr_base, from sl3, or a list. If list, each entry can be an instantiated learner object, or can be a list where one item is an instantiated learner object whose modeling requires specification, and the other item is a list of character vectors, where each vector specifies an interaction term.

@param use_cv_selector If TRUE, then will use Cross-Validation to choose the best among a list of learners. If FALSE, then will use the default metalearner for the outcome type. If the learner argument is not a list but one instantiated learner object, then this argument is ignored.

Value

an instantiated learner object, with class inheriting from Lrnr_base, from sl3.


Netflix/sherlock documentation built on Dec. 17, 2021, 5:22 a.m.