
SVM Radial Model
svm_r_model.RdThis function trains a Support Vector Machine with Radial Basis Function kernel using the parsnip
and workflows packages. It performs hyperparameter tuning using Bayesian optimization with the
tune package, evaluates the model using resampling, and saves the fitted model and resampling
results as bundles in a specified directory.
Arguments
- data
Data frame containing the training data.
- target_var
Character string of the target variable column name.
- folds
Resampling object (e.g., vfold_cv) for cross-validation.
- metrics
Metrics object for model evaluation.
- control
Control object for tuning and resampling.
- directory_to_save
Character string specifying the directory to save the model bundles. Default is NULL (do not save).