Skip to contents

Make a tuned model specification object.

Usage

internal_set_args_to_tune(.model_tbl)

Arguments

.model_tbl

The model table that is generated from a function like fast_regression_parsnip_spec_tbl(), must have a class of "tidyaml_mod_spec_tbl".

Value

A list object of workflows.

Details

This will take a model specification that is created from a function like fast_regression_parsnip_spec_tbl() and update the model_spec args to tune::tune(). This is done dynamically, meaning you do not need to know the names of the parameters inside of the model specification.

Author

Steven P. Sanderson II, MPH

Examples

library(dplyr)

mod_tbl <- fast_regression_parsnip_spec_tbl()
mod_tbl$model_spec[[1]]
#> Linear Regression Model Specification (regression)
#> 
#> Computational engine: lm 
#> 

updated_mod_tbl <- mod_tbl |>
  mutate(model_spec = internal_set_args_to_tune(mod_tbl))
updated_mod_tbl$model_spec[[1]]
#> Linear Regression Model Specification (regression)
#> 
#> Main Arguments:
#>   penalty = tune::tune()
#>   mixture = tune::tune()
#> 
#> Computational engine: lm 
#>