https://github.com/nixtla logo
g

Gerard Conangla Planes

08/17/2023, 8:37 AM
Hello, I would like to use the forward method (https://nixtla.github.io/statsforecast/src/core/models.html#autoarima.forward) with the StatsForecast object, but I don't see a documented way to do so. Otherwise, it looks that I'm forced to train the models every time to make predictions for new time series data. Is this possible? Alternatively, how could I use a StatsForecast object with trained models and make a prediction with a different time series?
m

Matej

08/17/2023, 12:31 PM
(am just a new user as well) imho, you do not need to retrain everytime clearly for instance the cross_validate method
Copy code
crossvalidation_df = sf.cross_validation(
    df = Y_df,
    h = 3,
    n_windows=...
    fitted=True,
    refit= False
  )
has refit=False option hence it definitely predicts without retrain. Tho, I wonder how I would go about setting up for example a weekly refit over the data for example. Currently, It seems quite tricky to assure that the Y_df does not leak into the Y_df_test that is derived from the n_windows and h parameters.
g

Gerard Conangla Planes

08/17/2023, 12:45 PM
Maybe I'm missing something. If I fit a model with StatsForecast over some timeseries data, and then I want to make predictions over a different timeseries dataset (for instance, future data that I didn't have at the moment of training), intuition tells me that I would need to use the https://nixtla.github.io/statsforecast/src/core/core.html#satstforecast.predict predict method. However, there is no y time series data as an argument of that method. So where do I put this?
In the forward method that I was referring to before (https://nixtla.github.io/statsforecast/src/core/models.html#autoarima.forward) this is more clear, but this functionality seems hidden with the StatsForecast wrapper. Perhaps you need to update the
df
attribute of the StatsForecast object? In any case I find it could be made more clear
Hi @Mariana Menchero , I have a couple of questions 1. I've seen your other reply to Akash. That seems to confirm that you need to "train every time" if you, for instance, update the data (for instance because you got more recent time series). Is that so? 2. The
forward
method appears in the underlying models but apparently not in the
StatsForecast
object. Could it be made public? That would be a strong reason to use it! Thanks 😉
m

Mariana Menchero

08/21/2023, 5:21 PM
Hi @Gerard Conangla Planes 1. Yes, if your data increases or changes in some way, you’ll need to train again the models from statsforecast. 2. We’re actively working on this. You might also be interested in our TimeGPT. It’s still in beta but maybe it can help your use case. See details here: https://www.nixtla.io/ and here https://docs.nixtla.io/
1
2 Views