Skip to contents

Shows the cross-validation error as a function of lambda for ridge, lasso, or elastic net models fitted with cv.glmnet.

Usage

tl_plot_regularization_cv(model, ...)

Arguments

model

A tidylearn regularized model object (ridge, lasso, or elastic_net)

...

Additional arguments (currently unused)

Value

A ggplot object.

Examples

# \donttest{
model <- tl_model(mtcars, mpg ~ ., method = "ridge")
tl_plot_regularization_cv(model)

# }