Open Patrikios opened 5 months ago
In general you specify a hyperparameter for tuning by passing, e.g. growth = tune()
. There is a full walkthrough of the process here.
Alternatively, you can use create_model_grid
to create a list of model that you need to train.
Below the code:
library(modeltime)
library(tidymodels)
m750
models <-
grid_regular(
changepoint_num(),
growth(),
levels = 3) |>
create_model_grid(
f_model_spec = prophet_reg,
engine_name = "prophet",
mode = "regression"
) |>
select(.models) |>
pull() # or pluck(1)
preprocessing <-
list(basic_preproc = recipe(value ~ date, data = m750))
wf <- workflow_set(preproc = preprocessing,
models = models)
modeltime_fit_workflowset(wf, data = m750)
As the documentation does not povide a an example for hyperparameter tuning a prophet model, I tired a simple snippet like follows:
which fails with
Is this usage correc?