Valeriy
08/15/2022, 12:42 PMMax (Nixtla)
08/15/2022, 1:45 PMSlackbot
08/15/2022, 1:45 PMNelson Elías Troncoso Martínez
08/16/2022, 4:31 PMSlackbot
08/16/2022, 5:28 PMSlackbot
08/17/2022, 2:48 PMSlackbot
08/17/2022, 7:14 PMSlackbot
08/17/2022, 9:24 PMValeriy
08/17/2022, 9:24 PMKin Gtz. Olivares
08/17/2022, 9:25 PMMax (Nixtla)
08/17/2022, 11:04 PMSlackbot
08/18/2022, 9:51 AMJason
08/18/2022, 2:14 PMSlackbot
08/18/2022, 2:15 PMSlackbot
08/18/2022, 6:06 PMSlackbot
08/19/2022, 9:45 AMSlackbot
08/23/2022, 11:28 AMSlackbot
08/31/2022, 11:35 AMSlackbot
09/03/2022, 5:33 AMPhi Nguyen
09/08/2022, 4:02 PMPhi Nguyen
09/08/2022, 4:02 PMValueError 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
Phi Nguyen
09/08/2022, 4:03 PMPhi Nguyen
09/08/2022, 4:03 PMY_df.describe()
Phi Nguyen
09/08/2022, 4:03 PMy
count 1941.000000
mean 10.786193
std 1.259658
min 10.000000
25% 10.000000
50% 10.000000
75% 11.000000
max 25.000000
Phi Nguyen
09/08/2022, 4:03 PMPhi Nguyen
09/08/2022, 4:03 PMfcst = StatsForecast(
df=Y_df,
models=[ETS(season_length=7, model='ZNA')],
freq='D'
)
Phi Nguyen
09/08/2022, 4:04 PMY_hat = fcst.forecast(28)
Phi Nguyen
09/08/2022, 4:04 PMMax (Nixtla)
09/08/2022, 4:28 PMMax (Nixtla)
09/08/2022, 4:31 PMI have filtered down my dataset to just one unique IDProbably you droped the id column and that is causing the error. Just add a
unique_id
column with any value (e.g. “series_1”) so you have a DF with the following columns:`unique_id:string` , ds:datestamp
, y:float
.