s3 method to extract params of a model with names consistent for use in the `autostats` package
get_params(model, ...)
# S3 method for xgb.Booster
get_params(model, ...)
# S3 method for workflow
get_params(model, ...)
a model
additional arguments
list of params
iris %>%
framecleaner::create_dummies() -> iris_dummies
#> 1 column(s) have become 3 dummy columns
iris_dummies %>%
tidy_formula(target = Petal.Length) -> p_form
iris_dummies %>%
tidy_xgboost(p_form, mtry = .5, trees = 5L, loss_reduction = 2, sample_size = .7) -> xgb
#> Warning: `early_stop` was reduced to 4.
#> Warning: `early_stop` was reduced to 4.
#> accuracy tested on a validation set
#> # A tibble: 3 × 2
#> .metric .estimate
#> <chr> <dbl>
#> 1 ccc 0.119
#> 2 rmse 2.95
#> 3 rsq 0.908
## reuse these parameters to find the cross validated error
rlang::exec(auto_model_accuracy, data = iris_dummies, formula = p_form, !!!get_params(xgb))
#> → A | warning: `early_stop` was reduced to 4.
#> There were issues with some computations A: x1
#> There were issues with some computations A: x4
#>
4 - fold cross-validated accuracy for regression model of Petal.Length on dataset auto_model_accuracy
model
metric
mean_score
std_err
xgboost
rmse
2.889
0.1386
rsq
0.938
0.0145