Skip to contents

This is a boilerplate function to create automatically the following:

  • recipe

  • model specification

  • workflow

  • tuned model (grid ect)

Usage

hai_auto_svm_rbf(
  .data,
  .rec_obj,
  .splits_obj = NULL,
  .rsamp_obj = NULL,
  .tune = TRUE,
  .grid_size = 10,
  .num_cores = 1,
  .best_metric = "f_meas",
  .model_type = "classification"
)

Arguments

.data

The data being passed to the function. The time-series object.

.rec_obj

This is the recipe object you want to use. You can use hai_svm_rbf_data_prepper() an automatic recipe_object.

.splits_obj

NULL is the default, when NULL then one will be created.

.rsamp_obj

NULL is the default, when NULL then one will be created. It will default to creating an rsample::mc_cv() object.

.tune

Default is TRUE, this will create a tuning grid and tuned workflow

.grid_size

Default is 10

.num_cores

Default is 1

.best_metric

Default is "f_meas". You can choose a metric depending on the model_type used. If regression then see hai_default_regression_metric_set(), if classification then see hai_default_classification_metric_set().

.model_type

Default is classification, can also be regression.

Value

A list

Details

This uses the parsnip::svm_rbf() with the engine set to kernlab

Author

Steven P. Sanderson II, MPH

Examples

if (FALSE) { # \dontrun{
data <- iris

rec_obj <- hai_svm_rbf_data_prepper(data, Species ~ .)

auto_rbf <- hai_auto_svm_rbf(
  .data = data,
  .rec_obj = rec_obj,
  .best_metric = "f_meas"
)

auto_rbf$recipe_info
} # }