Learn R Programming

autostats (version 0.4.1)

get_params: get params

Description

s3 method to extract params of a model with names consistent for use in the `autostats` package

Usage

get_params(model, ...)

# S3 method for xgb.Booster get_params(model, ...)

# S3 method for workflow get_params(model, ...)

Value

list of params

Arguments

model

a model

...

additional arguments

Examples

Run this code

iris %>%
  framecleaner::create_dummies() -> iris_dummies

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

## reuse these parameters to find the cross validated error

rlang::exec(auto_model_accuracy, data = iris_dummies, formula = p_form, !!!get_params(xgb))

Run the code above in your browser using DataLab