R/classify_text.r
find_best_model.Rd
Find the best version of each algorithm based on the hyperparameters and 10-fold cross-validation.
find_best_model(
lasso_wf,
rand_wf,
xg_wf,
class_folds,
lasso_grid,
rand_grid,
xg_grid,
metric_choice = "accuracy"
)
A lasso workflow (including the search space for the model)
A random forest workflow (including the search space for the model)
An XGBoost workflow (including the search space for the model)
10-fold cross-validation samples
The search spaces for lasso
The search spaces for random forest
The search space for XGBoost
The selected metrics for the model evaluation among accuracy, balanced accuracy (bal_accuracy), F-score (f_means), and Area under the ROC curve (roc_auc). The default value is accuracy.
A list output that contains the best model output for lasso, random forest, and XGBoost.