time-series-foundation-models / lag-llama

Lag-Llama: Towards Foundation Models for Probabilistic Time Series Forecasting
Apache License 2.0
1.2k stars 146 forks source link

Cannot predict the feature timestamps #49

Open gkoays opened 5 months ago

gkoays commented 5 months ago

Hi, thanks for the model and instructions. I could not get the idea of predicting the last part of the data. I tried zero-shot learning with my own data. Let's say I have 1 week of hourly data. When I want to use the "get_lag_llama_predictions" function, the "forecasts" object has the same timestamp as the last part of the given data. But I want to predict the future timestamps. I want to give 1 week of data to model and predict the next 2 days. How can I achieve that? Thanks.

ashok-arjun commented 5 months ago

Hi.

Lag-Llama can predict for any future timepoints. It's the structure of the code at the moment that needs the timesteps at the end of the data object (with any dummy value), since the code right now automatically does forecasting for the last "prediction_length" timesteps in the dataset. This is also noted in Colab Demo 1. I agree that this can be improved.

The prediction function provided in this notebook performs a prediction autoregressively for the last prediction_length steps in the dataset passed. For the time being, if you would like to perform prediction, please include in the CSV/dataframe the timestamps you want to perform prediction for (with a dummy value), and set the prediction length to the required horizon.

Can you try that and let me know if it works?