View source: R/modeling_helpers.R
tof_find_cv_predictions | R Documentation |
Calculate and store the predicted outcomes for each validation set observation during model tuning
tof_find_cv_predictions(
split_data,
prepped_recipe,
lambda,
alpha,
model_type,
outcome_colnames
)
split_data |
An 'rsplit' object from the |
prepped_recipe |
A trained |
lambda |
A single numeric value indicating which penalty (lambda) value should be used to make the predictions |
alpha |
A single numeric value indicating which mixture (alpha) value should be used to make the predictions |
model_type |
A string indicating which kind of elastic net model to build. If a continuous response is being predicted, use "linear" for linear regression; if a categorical response with only 2 classes is being predicted, use "two-class" for logistic regression; if a categorical response with more than 2 levels is being predicted, use "multiclass" for multinomial regression; and if a time-to-event outcome is being predicted, use "survival" for Cox regression. |
outcome_colnames |
Quoted column names indicating which columns in the data being fit represent the outcome variables (with all others assumed to be predictors). |
A tibble containing the predicted and true values for the outcome for each of the validation observations in 'split_data'.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.