Description Usage Arguments Value See Also
tm_benchmark tunes a model with tidymodels and returns the accuracy results and computation time in seconds.
1 2 3 4 5 6 7 8 9 | tm_benchmark(
x,
y,
name = "Data",
method = "svm",
test = "grid",
grid_size = 5,
bayes_iter = 10
)
|
x |
Matrix or data frame containing the dependent variables. |
y |
Vector of responses. Can either be a factor or a numeric vector. |
name |
Name of the dataset. Used to name the output file and as an identifier within the output dataset. |
method |
Model to be fit. Choices are "ada" for adaboost, "en" for elastic net, "gbm" for gradient boosting machines, and "svm" for support vector machines. |
test |
Type of tuning to be done. Choices are "bayes" for iterative Bayesian optimization and "grid" for grid search. |
grid_size |
Number of values for each hyperparameter for tidymodels grid. This is ignored if iterative Bayesian optimization is selected. |
bayes_iter |
Number of iterations for the Bayesian optimization. This is ignored if test = "grid" |
Returns a single row matrix with the following elements:
data |
Name of the dataset. |
package |
This will always be "tidymodels". |
method |
Type of model that was fit. It will gbm for gradient boosting machines or svm for support vector machines. |
optimizer |
Type of optimizer used. It will be Grid or Iterative Bayes. |
assess |
The method used to assess the model during tuning. For tidymodels it will be cross-validation. |
tuned_on |
Metric that was used as the loss function |
acc_rmse |
The best accuracy or RMSE obtained from the model as determined by a validation dataset. |
auc_mae |
The best AUC or MAE obtained from the model as determined by a validation dataset. |
time |
Time to complete the calculations in seconds. |
The models are verified using rsample to split the data into training and testing datasets.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.