Description Usage Arguments Details Value See Also Examples
View source: R/modeltime_wfs_fit.R
allows working with workflow sets and modeltime. Combination of recipes and models are trained and evaluation metrics are returned.
1 | modeltime_wfs_fit(.wfsets, .split_prop, .serie)
|
.wfsets |
workflow_set object, generated with the |
.split_prop |
time series split proportion. |
.serie |
time series dataframe. |
Given a workflow_set containing multiple time series recipes and models, adjusts all the possible combinations on a time series. It uses a split proportion in order to train on a time series partition and evaluate metrics on the testing partition.
tbl_df containing the model id (based on workflow_set), model description and metrics on the time series testing dataframe. Also, a .fit_model column is included, which contains each fitted model.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 | library(dplyr)
library(earth)
data <- sknifedatar::data_avellaneda %>% mutate(date=as.Date(date)) %>% filter(date<'2012-06-01')
recipe_date <- recipes::recipe(value ~ ., data = data) %>%
recipes::step_date(date, features = c('dow','doy','week','month','year'))
mars <- parsnip::mars(mode = 'regression') %>% parsnip::set_engine('earth')
wfsets <- workflowsets::workflow_set(
preproc = list(
R_date = recipe_date),
models = list(M_mars = mars),
cross = TRUE)
sknifedatar::modeltime_wfs_fit(.wfsets = wfsets,
.split_prop = 0.8,
.serie = data)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.