[BUG] Chronos predictions are offset by a constant value if time series has a high mean value #4132
Labels
bug
Something isn't working
module: timeseries
related to the timeseries module
priority: 1
High priority
Milestone
Describe the bug
When using TimeSeriesPredictor on a 5min frequency TimeSeriesDataFrame, the predictions are always X points above the trained/tested/trend line. The following screenshot clearly shows the gap issue:
Expected behavior
Regardless of which model/data is used, I would expect TimeSeriesPredictor to start predicting at an appropriate value level (i.e. value close to the last available observation).
To Reproduce
This is the code straight from the Autogluon TimeSeries Tutorial (https://auto.gluon.ai/stable/tutorials/timeseries/forecasting-chronos.html), simply adapted to read a 5T/5min freq. data frame. Note that while this is specifically using "chronos_small", this is reproducible with any other kind of model (RecursiveTabular, TemporalFusionTransformer, etc.), trained or not.
The example data (G_5min_sample.csv) file is here: G_5min_sample.csv
Installed Versions
accelerate : 0.21.0
autogluon : 1.1.0
autogluon.common : 1.1.0
autogluon.core : 1.1.0
autogluon.features : 1.1.0
autogluon.multimodal : 1.1.0
autogluon.tabular : 1.1.0
autogluon.timeseries : 1.1.0
boto3 : 1.34.81
catboost : 1.2.3
defusedxml : 0.7.1
evaluate : 0.4.1
fastai : 2.7.14
gluonts : 0.14.3
hyperopt : 0.2.7
imodels : None
jinja2 : 3.1.3
joblib : 1.4.0
jsonschema : 4.21.1
lightgbm : 4.1.0
lightning : 2.1.4
matplotlib : 3.8.4
mlforecast : 0.10.0
networkx : 3.3
nlpaug : 1.1.11
nltk : 3.8.1
nptyping : 2.4.1
numpy : 1.26.4
nvidia-ml-py3 : 7.352.0
omegaconf : 2.2.3
onnxruntime-gpu : None
openmim : 0.3.9
optimum : 1.18.1
optimum-intel : None
orjson : 3.10.0
pandas : 2.1.4
pdf2image : 1.17.0
Pillow : 10.3.0
psutil : 5.9.8
pytesseract : 0.3.10
pytorch-lightning : 2.1.4
pytorch-metric-learning: 1.7.3
ray : 2.10.0
requests : 2.28.2
scikit-image : 0.20.0
scikit-learn : 1.4.0
scikit-learn-intelex : None
scipy : 1.12.0
seqeval : 1.2.2
setuptools : 60.2.0
skl2onnx : None
statsforecast : 1.4.0
tabpfn : None
tensorboard : 2.16.2
text-unidecode : 1.3
timm : 0.9.16
torch : 2.1.2
torchmetrics : 1.2.1
torchvision : 0.16.2
tqdm : 4.65.2
transformers : 4.38.2
utilsforecast : 0.0.10
vowpalwabbit : None
xgboost : 2.0.3
What I have tried so far:
I always observe the same "level gap" at any point in time, regardless of model and data.
The only way in which I can get expected results is by using the Autogluon Tutorial Dataset ("https://autogluon.s3.amazonaws.com/datasets/timeseries/m4_hourly_tiny/train.csv") which is freq=H, so not really helpful to debug why the 5min freq. doesn't work as expected.
Thanks!
The text was updated successfully, but these errors were encountered: