as.model_list: Make models into model_list object

Description Usage Arguments Value

View source: R/model_list_constructors.R

Description

Make models into model_list object

Usage

1
2
3
as.model_list(..., listed_models = NULL, target = ".outcome", model_class,
  tuned = TRUE, recipe = NULL, positive_class = NULL, model_name = NULL,
  best_levels = NULL, original_data_str, versions)

Arguments

...

caret-trained models to put into a model list

listed_models

Use this if your models are already in a list

target

Quoted name of response variable

model_class

"classification" or "regression". Will be determined if not provided

tuned

Logical; if FALSE, will have super-class untuned_models

recipe

recipe object from prep+_data, or NULL if the data didn't go through prep_data

positive_class

If classification, the positive outcome class, otherwise NULL

model_name

Quoted, name of the model. Defaults to the name of the outcome variable.

best_levels

best_levels list as attached to data frames from add_best_levels

original_data_str

zero-row data frame with names and classes of all columns except the outcome as they came into either the model training function such as tune_models or prep_data

versions

A list containing the following environmental variables from model training: r_version, hcai_version, and other_packages (a tibble). If not provided, will be extracted from the current session. See healthcareai:::attach_session_info for details

Value

A model_list with child class type_list


healthcareai documentation built on Sept. 2, 2018, 1:03 a.m.