View source: R/internals-full-make-wflw.R
full_internal_make_wflw | R Documentation |
This function creates a full internal workflow for a model and recipe combination.
full_internal_make_wflw(.model_tbl, .rec_obj)
.model_tbl |
A model specification table ( |
.rec_obj |
A recipe object. |
The function checks if the input model specification table inherits the class 'tidyaml_mod_spec_tbl'. It then manipulates the input table, making adjustments for factors and creating a list of grouped models. For each model-recipe pair, it uses the appropriate internal function based on the model type to create a workflow object. The specific internal function is selected using a switch statement based on the class of the model.
The function returns a workflow object for the first model-recipe pair based on the internal function selected.
Steven P. Sanderson II, MPH
Other Utility:
core_packages()
,
create_splits()
,
create_workflow_set()
,
fast_classification_parsnip_spec_tbl()
,
fast_regression_parsnip_spec_tbl()
,
install_deps()
,
load_deps()
,
match_args()
library(dplyr)
library(recipes)
rec_obj <- recipe(mpg ~ ., data = mtcars)
mod_tbl <- make_regression_base_tbl()
mod_tbl <- mod_tbl |>
filter(
.parsnip_engine %in% c("lm", "glm") &
.parsnip_fns == "linear_reg"
)
class(mod_tbl) <- c("tidyaml_mod_spec_tbl", class(mod_tbl))
mod_spec_tbl <- internal_make_spec_tbl(mod_tbl)
result <- full_internal_make_wflw(mod_spec_tbl, rec_obj)
result
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.