This message was deleted.
# statsforecast
s
This message was deleted.
m
Hi @Toni Borders I noticed that when you use the forecast method, the forecast horizon is 1500. Then, in the fit and predict method, the horizon is defined as
h = round((valid['ds'].nunique()) * 0.5)
Is this also equal to 1500?
also, please make sure that you're using the latest version of statsforecast, since the forecast method should produce the same result as fit & predict.
t
it is also equal to roughly 1500. Let me try to change it explicitly….
I have changed the code such that the inputs to the forecast method replicate exactly what is in the fit/predict method and I still get and error, albeit a different error.
Copy code
Traceback (most recent call last):
  File "/<path>/<my_script>.py", line 297, in <module>
    main(data)
  File "/<path>/<my_script>.py", line 277, in main
    forecast, model_aliases = forecast_only(dfUsage_clean, season)
  File "/<path>/<my_script>.py", line 125, in forecast_only
    forecast = model.forecast(h=h, level=[95])
  File "<site-packages_path>/statsforecast/core.py", line 1899, in forecast
    return super().forecast(
  File "<site-packages_path>/statsforecast/core.py", line 1097, in forecast
    res_fcsts = self._forecast_parallel(h=h, fitted=fitted, X=X, level=level)
  File "<site-packages_path>/statsforecast/core.py", line 1376, in _forecast_parallel
    gas, Xs = self._get_gas_Xs(X=X)
  File "<site-packages_path>/statsforecast/core.py", line 1315, in _get_gas_Xs
    gas = self.ga.split(self.n_jobs)
AttributeError: 'StatsForecast' object has no attribute 'ga'
I am on StatsForecast 1.6.0, which I think is the most recent version…
Any thoughts @Mariana Menchero?
j
Can you try providing the df to forecast? e.g.
model.forecast(df=train, h=h, level=[95])
t
That was it. Thanks very much @José Morales !