facebook / facebook/prophet

Daily data with regressors, cross_validation function errors

Open
#1,956 1 comment 0 reactions 0 assignees View on GitHub
R
Dominant language
Python
Stars
20.4k
Forks
4.6k
Avg merge
19h 52m
Merged PRs (30d)
1

Description

Hi, I built a prophet model with regressors and wanted to use cross_validation function to evaluate the model.
Here is the code:
df.cv <- prophet::cross_validation(train_model2, horizon=180, units = 'days')
and it outputs an error message:
**Error in if (model$uncertainty.samples) { : argument is of length zero**

> str(train_model2)
'data.frame': 396 obs. of 7 variables:
$ T_TV_imp : num 17.2 17.7 18.2 18 18 ...
$ T_sem_spend: num 12.2 12.7 12.9 13 13 ...
$ T_dsp_spend: num 11.4 11.8 11.9 11.9 11.8 ...
$ T_sop_spend: num 10.4 10.9 11.2 11.5 11.6 ...
$ T_bch_spend: num 10.9 11.6 11.9 12.3 12.5 ...
$ ds : chr "2020-03-16" "2020-03-17" "2020-03-18" "2020-03-19" ...
$ y : int 7****

Could you help me understand what went wrong with the code or the training dataset?

Thanks!

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.