en_benchmark: Tunes a model via elastic net with 'glmnet' and returns

Description Usage Arguments Value See Also

View source: R/en_benchmark.R

Description

en_benchmark tunes a model with glmnet and returns a one row data.frame with the results. rsample is used to split the dataset into training and test datasets. The results returned

Usage

1
en_benchmark(x, y, name = "Data", loss = "default")

Arguments

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.

loss

Value for loss argument in glmnet. Options are "default", "class", "auc", "mse", or "mae". If "default" is selected,

Value

Saves a matrix to the indicated path that contains the results for each of the runs. The final file contains the following variables:

data

Name of the dataset.

package

This will always be "glmnet".

method

Type of model that was fit. This will always be "en" for elastic net.

optimizer

Optimization method. It will be "1se" or "min" to reflect the criteria used for lambda selection by glmnet.

assess

The method used to assess the model during tuning. It will always 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.

See Also

tm_benchmark, EZtune::eztune


jillbo1000/EZtuneTest documentation built on Oct. 5, 2021, 4:16 p.m.