Add a Model into a Modeltime Table
See also
combine_modeltime_tables()
: Combine 2 or more Modeltime Tables togetheradd_modeltime_model()
: Adds a new row with a new model to a Modeltime Tabledrop_modeltime_model()
: Drop one or more models from a Modeltime Tableupdate_modeltime_description()
: Updates a description for a model inside a Modeltime Tableupdate_modeltime_model()
: Updates a model inside a Modeltime Tablepull_modeltime_model()
: Extracts a model from a Modeltime Table
Examples
# \donttest{
library(tidymodels)
#> ── Attaching packages ────────────────────────────────────── tidymodels 1.2.0 ──
#> ✔ broom 1.0.7 ✔ tibble 3.2.1
#> ✔ dials 1.3.0 ✔ tidyr 1.3.1
#> ✔ ggplot2 3.5.1 ✔ tune 1.2.1
#> ✔ infer 1.0.7 ✔ workflows 1.1.4
#> ✔ modeldata 1.4.0 ✔ workflowsets 1.1.0
#> ✔ purrr 1.0.2 ✔ yardstick 1.3.1
#> ✔ recipes 1.1.0
#> ── Conflicts ───────────────────────────────────────── tidymodels_conflicts() ──
#> ✖ yardstick::accuracy() masks smooth::accuracy(), greybox::accuracy()
#> ✖ purrr::discard() masks scales::discard()
#> ✖ dplyr::filter() masks stats::filter()
#> ✖ dplyr::lag() masks stats::lag()
#> ✖ smooth::pls() masks parsnip::pls()
#> ✖ tidyr::spread() masks greybox::spread()
#> ✖ recipes::step() masks stats::step()
#> • Dig deeper into tidy modeling with R at https://www.tmwr.org
model_fit_ets <- exp_smoothing() %>%
set_engine("ets") %>%
fit(value ~ date, training(m750_splits))
#> frequency = 12 observations per 1 year
m750_models %>%
add_modeltime_model(model_fit_ets)
#> # Modeltime Table
#> # A tibble: 4 × 3
#> .model_id .model .model_desc
#> <int> <list> <chr>
#> 1 1 <workflow> ARIMA(0,1,1)(0,1,1)[12]
#> 2 2 <workflow> PROPHET
#> 3 3 <workflow> GLMNET
#> 4 4 <fit[+]> ETS(A,A,A)
# }