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 running Radme code #155

Open
MislavSag opened this issue Feb 28, 2024 · 3 comments
Open

Error running Radme code #155

MislavSag opened this issue Feb 28, 2024 · 3 comments
Assignees

Comments

@MislavSag
Copy link

I have just installed the package and tried smaple code from GitHub Readme:

library(finnts)

# prepare historical data
hist_data <- timetk::m4_monthly %>%
  dplyr::rename(Date = date) %>%
  dplyr::mutate(id = as.character(id))

# call main finnts modeling function
finn_outp33ut <- forecast_time_series(
  input_data = hist_data,
  combo_variables = c("id"),
  target_variable = "value",
  date_type = "month",
  forecast_horizon = 3,
  back_test_scenarios = 6, 
  models_to_run = c("arima", "ets"), 
  run_global_models = FALSE, 
  run_model_parallel = FALSE
)

I get an error

Finn Submission Info
• Experiment Name: finn_fcst
• Run Name: finn_fcst-20240228T132002Z

✔ Prepping Data [15.9s]                                                                                                            
✔ Creating Model Workflows [1.4s]                                                                                                  
✔ Creating Model Hyperparameters [1.3s]                                                                                            
ℹ Turning ensemble models off since no multivariate models were chosen to run.                                                     
✔ Creating Train Test Splits [9.7s]                                                                                                
→ A | warning: A correlation computation is required, but the inputs are size zero or one and the standard                         
               deviation cannot be computed. `NA` will be returned.
There were issues with some computations   A: x1
→ A | warning: A correlation computation is required, but the inputs are size zero or one and the standard
               deviation cannot be computed. `NA` will be returned.
There were issues with some computations   A: x1
→ A | warning: A correlation computation is required, but the inputs are size zero or one and the standard                         
               deviation cannot be computed. `NA` will be returned.
There were issues with some computations   A: x1
→ A | warning: A correlation computation is required, but the inputs are size zero or one and the standard
               deviation cannot be computed. `NA` will be returned.
There were issues with some computations   A: x1
→ A | warning: A correlation computation is required, but the inputs are size zero or one and the standard                         
               deviation cannot be computed. `NA` will be returned.
There were issues with some computations   A: x1
→ B | warning: A correlation computation is required, but `estimate` is constant and has 0 standard deviation,
               resulting in a divide by 0 error. `NA` will be returned.
→ A | warning: A correlation computation is required, but the inputs are size zero or one and the standard
               deviation cannot be computed. `NA` will be returned.
There were issues with some computations   A: x1
→ B | warning: A correlation computation is required, but `estimate` is constant and has 0 standard deviation,
               resulting in a divide by 0 error. `NA` will be returned.
→ A | warning: A correlation computation is required, but the inputs are size zero or one and the standard                         
               deviation cannot be computed. `NA` will be returned.
There were issues with some computations   A: x1
→ A | warning: A correlation computation is required, but the inputs are size zero or one and the standard
               deviation cannot be computed. `NA` will be returned.
There were issues with some computations   A: x1
✔ Training Individual Models [2m 42.3s]
ℹ Ensemble models have been turned off.                                                                                            
✔ Training Ensemble Models [239ms]
Error in { : task 3 failed - "subscript out of bounds"                                                                             
In addition: Warning messages:
1: In guerrero(x, lower, upper) :
  Guerrero's method for selecting a Box-Cox parameter (lambda) is given for strictly positive data.
2: In guerrero(x, lower, upper) :
  Guerrero's method for selecting a Box-Cox parameter (lambda) is given for strictly positive data.
3: More than one set of outcomes were used when tuning. This should never happen. Review how the outcome is specified in your model. 
4: More than one set of outcomes were used when tuning. This should never happen. Review how the outcome is specified in your model. 
5: More than one set of outcomes were used when tuning. This should never happen. Review how the outcome is specified in your model. 
6: More than one set of outcomes were used when tuning. This should never happen. Review how the outcome is specified in your model. 
7: More than one set of outcomes were used when tuning. This should never happen. Review how the outcome is specified in your model. 
8: More than one set of outcomes were used when tuning. This should never happen. Review how the outcome is specified in your model. 
9: More than one set of outcomes were used when tuning. This should never happen. Review how the outcome is specified in your model. 
10: More than one set of outcomes were used when tuning. This should never happen. Review how the outcome is specified in your model. 
✖ Selecting Best Models [1.2s]
@mitokic
Copy link
Collaborator

mitokic commented Mar 14, 2024

Hey @MislavSag can you please let me know what version of R you are using?

@mitokic mitokic self-assigned this Mar 14, 2024
@MislavSag
Copy link
Author

I am on latest version, 4.3.3. I have updateded all packages including fnints, but still getting an error:

Finn Submission Info
• Experiment Name: finn_fcst
• Run Name: finn_fcst-20240321T113248Z

✔ Prepping Data [14.5s]                                                                                                           
✔ Creating Model Workflows [1.6s]                                                                                                 
✔ Creating Model Hyperparameters [1.6s]                                                                                           
ℹ Turning ensemble models off since no multivariate models were chosen to run.                                                    
✔ Creating Train Test Splits [10.2s]                                                                                              
→ A | warning: A correlation computation is required, but the inputs are size zero or one and the standard                        
               deviation cannot be computed. `NA` will be returned.
There were issues with some computations   A: x1
→ A | warning: A correlation computation is required, but the inputs are size zero or one and the standard
               deviation cannot be computed. `NA` will be returned.
There were issues with some computations   A: x1
→ A | warning: A correlation computation is required, but the inputs are size zero or one and the standard                        
               deviation cannot be computed. `NA` will be returned.
There were issues with some computations   A: x1
→ A | warning: A correlation computation is required, but the inputs are size zero or one and the standard
               deviation cannot be computed. `NA` will be returned.
There were issues with some computations   A: x1
→ A | warning: A correlation computation is required, but the inputs are size zero or one and the standard                        
               deviation cannot be computed. `NA` will be returned.
There were issues with some computations   A: x1
→ B | warning: A correlation computation is required, but `estimate` is constant and has 0 standard
               deviation, resulting in a divide by 0 error. `NA` will be returned.
→ A | warning: A correlation computation is required, but the inputs are size zero or one and the standard
               deviation cannot be computed. `NA` will be returned.
There were issues with some computations   A: x1
→ B | warning: A correlation computation is required, but `estimate` is constant and has 0 standard
               deviation, resulting in a divide by 0 error. `NA` will be returned.
→ A | warning: A correlation computation is required, but the inputs are size zero or one and the standard                        
               deviation cannot be computed. `NA` will be returned.
There were issues with some computations   A: x1
→ A | warning: A correlation computation is required, but the inputs are size zero or one and the standard
               deviation cannot be computed. `NA` will be returned.
There were issues with some computations   A: x1
✔ Training Individual Models [2m 32.1s]
ℹ Ensemble models have been turned off.                                                                                           
✔ Training Ensemble Models [266ms]
Error in { : task 3 failed - "subscript out of bounds"                                                                            
In addition: Warning messages:
1: More than one set of outcomes were used when tuning. This should never happen. Review how the outcome is specified in your model. 
2: More than one set of outcomes were used when tuning. This should never happen. Review how the outcome is specified in your model. 
3: More than one set of outcomes were used when tuning. This should never happen. Review how the outcome is specified in your model. 
4: More than one set of outcomes were used when tuning. This should never happen. Review how the outcome is specified in your model. 
5: More than one set of outcomes were used when tuning. This should never happen. Review how the outcome is specified in your model. 
✖ Selecting Best Models [1.1s]

@mitokic
Copy link
Collaborator

mitokic commented Apr 10, 2024

Hmm this is a strange error, since this is the same code that runs as tests every day in CRAN. So in theory it should work. I would suggest checking if the finnts dependencies are old on your machine, and update them if needed. Also maybe try using another data set. For example the quarterly data set from timetk instead.

https://business-science.github.io/timetk/reference/index.html#time-series-datasets

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