Nixtla / neuralforecast

Scalable and user friendly neural :brain: forecasting algorithms.
https://nixtlaverse.nixtla.io/neuralforecast
Apache License 2.0
2.92k stars 333 forks source link

How to predict sequences of infinite length when exogenous variables are used? #1060

Closed robot-xyh closed 3 weeks ago

robot-xyh commented 1 month ago

Thank you so much for open sourcing such an excellent repository of forecast algorithms. This will help me a lot.I have encountered some confusion in the use of hope to be answered.

My problem is this: my dataset has y values and future external variables. I hope to achieve real-time infinite length prediction through external variables after training. Now my trained algorithm can only predict values of fixed length. Longer horizons cannot be predicted.

I came up with the following method:

  1. Use the predicted result as the real value to continue the training after the transfer training, but this method is particularly easy to lead to cumulative errors, resulting in a rapid increase in errors. Related issue issue 1 issue 2

  2. Truncate the time series and directly predict the following data, but an error is reported: 'ValueError: There are missing combinations of ids and times in "futr_df". You can run the "make_future_dataframe()" method to get the expected combinations or the "get_missing_future(futr_df)" method to get the missing combinations.` You added an assertion that can only be predicted if it is continuous, and I tried to remove that assertion, but it still got an error. issue 1

  3. I tried to modify the learning rate of transfer learning to a minimum value so as to fix the weight to avoid cumulative errors, but I found that the results obtained in transfer learning using different learning rates were consistent. issue 1

  4. There are related issues, but they can't help me solve them. issue 1

Is there a better way to do this? thank you

elephaint commented 1 month ago

If I understand correctly, your goal is to do something like:

fcst = NeuralForecast(models = [NHITS(h=VERY_LARGE)], freq = FREQ)
fcst.fit(....)
fcst.predict(futr_df = X_test_df)

What exactly is the issue?

github-actions[bot] commented 3 weeks ago

This issue has been automatically closed because it has been awaiting a response for too long. When you have time to to work with the maintainers to resolve this issue, please post a new comment and it will be re-opened. If the issue has been locked for editing by the time you return to it, please open a new issue and reference this one.