Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error: Tuning nnetar_reg() hyperparameter num_networks #34

Closed
MxNl opened this issue Aug 31, 2020 · 1 comment
Closed

Error: Tuning nnetar_reg() hyperparameter num_networks #34

MxNl opened this issue Aug 31, 2020 · 1 comment

Comments

@MxNl
Copy link

MxNl commented Aug 31, 2020

Hello Matt,

thanks again for you fas implementation of NNETAR. I tried it out today and came accross the following error after trying to tune the num_networks hyperparameter using the following code:

tune_nnetar_model <-
  nnetar_reg(
    seasonal_period = 12,
    non_seasonal_ar = 1,
    seasonal_ar = 1,
    hidden_units = tune(),
    num_networks = tune(),
    penalty = tune(),
    epochs = tune()
  ) %>%
  set_engine("nnetar") %>%
  set_mode("regression")

Tuning

n_levels <- 1
tune_grid <- grid_regular(
  hidden_units(),
  num_networks(),
  penalty(),
  epochs(),
  levels = n_levels
)

Workflow

nnetar_workflow <- 
  workflow() %>% 
  add_model(tune_nnetar_model) %>% 
  add_recipe(steenkopies_recipe)

Modelling with resamples

nnetar_resampling <- 
  nnetar_workflow %>% 
  tune_grid(
    resamples = resampling_strategy_cv5fold,
    grid = tune_grid)
Error: Problem with `mutate()` input `object`. x Error when calling num_networks(): Error : 'num_networks' is not an exported object from 'namespace:dials' i Input `object` is `purrr::map(call_info, eval_call_info)`.

Sorry for asking if the cause should be obvious but I couldn't find anything related in the documentation.
I can add a reprex if needed.

mdancho84 added a commit that referenced this issue Aug 31, 2020
@mdancho84
Copy link
Contributor

It should work now. I accidentally had it pointing to dials when num_networks() is in modeltime

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants