Description Usage Arguments Value Examples
This is a method for ggplot2::autoplot()
.
1 2 |
object |
A mirvie_learning_curve_cv
object (i.e. the output of a call to |
metric |
A string. The metric used to evaluate the performance. |
smooth |
A flag. Use a loess smoothed line instead of joining the dots? |
meansd |
A flag. If there are multiple repeats, rather than plotting all of them, plot means with standard deviation error bars? |
... |
Arguments passed to |
A ggplot2::ggplot()
.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | data("BostonHousing", package = "mlbench")
bh <- dplyr::select_if(BostonHousing, is.numeric)
mod <- parsnip::linear_reg(penalty = 0, mixture = 0) %>%
parsnip::set_engine("lm")
wf <- workflows::workflow() %>%
workflows::add_formula(medv ~ .) %>%
workflows::add_model(mod)
metric_calculator <- ~ yardstick::mae(., medv, .pred)$.estimate
lccv <- suppressWarnings(
learn_curve_cv(bh, wf, 2:9, 8, metric_calculator, n_cores = 4)
)
autoplot(lccv, metric = "mae")
autoplot(lccv, metric = "mae", smooth = TRUE)
autoplot(lccv, metric = "mae", meansd = TRUE)
autoplot(lccv, metric = "mae", smooth = TRUE, meansd = TRUE)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.