https://github.com/nixtla logo
#general
Title
# general
p

Phi Nguyen

09/08/2022, 4:02 PM
Copy code
ValueError                                Traceback (most recent call last)
/home/ray/workspace-project-nixtla-m5/nixtla-m5-v2.ipynb Cell 10' in <cell line: 2>()
      1 init = time()
----> 2 Y_hat = fcst.forecast(28)
      3 end = time()
      4 print(f'Minutes taken by StatsForecast using: {(end - init) / 60}')

File ~/anaconda3/lib/python3.8/site-packages/statsforecast/core.py:405, in StatsForecast.forecast(self, h, df, X_df, level, fitted, sort_df)
    403 X, level = self._parse_X_level(h=h, X=X_df, level=level)
    404 if self.n_jobs == 1:
--> 405     res_fcsts = self.ga.forecast(models=self.models, h=h, fitted=fitted, X=X, level=level)
    406 else:
    407     res_fcsts = self._forecast_parallel(h=h, fitted=fitted, X=X, level=level)

File ~/anaconda3/lib/python3.8/site-packages/statsforecast/core.py:148, in GroupedArray.forecast(self, models, h, fitted, X, level)
    146 if has_level:
    147     kwargs['level'] = level
--> 148 res_i = model.forecast(h=h, y=y_train, X=X_train, X_future=X_f, fitted=fitted, **kwargs)
    149 cols_m = [key for key in res_i.keys() if any(key.startswith(m) for m in matches)]
    150 fcsts_i = np.vstack([res_i[key] for key in cols_m]).T

File ~/anaconda3/lib/python3.8/site-packages/statsforecast/models.py:245, in ETS.forecast(self, y, h, X, X_future, fitted)
    237 def forecast(
    238         self, 
...
--> 950 data_positive = min(y) > 0
    951 if (not data_positive) and errortype == 'M':
    952     raise ValueError('Inappropriate model for data with negative or zero values')

ValueError: min() arg is an empty sequence
7 Views