unit8co / darts

A python library for user-friendly forecasting and anomaly detection on time series.
https://unit8co.github.io/darts/
Apache License 2.0
8.08k stars 880 forks source link

[BUG] ARIMA probabilistic prediction error #1913

Closed yigitcancomlek closed 1 year ago

yigitcancomlek commented 1 year ago

Describe the bug 1) I believe there is some scaling issue with the probabilistic predictions provided by ARIMA. Once I increase n_samples from 1 to any number, the predictions change significantly. (Figure 1, Figure 2, Figure 3)

2) I am confused about how and why predictions without covariates could be better for the model. When training/predicting with covariates, the results are much worse than training/predicting without covariates, even in the first couple steps. (Figure 1 vs Figure 4)

To Reproduce

train_ts, val_ts= target_ts.split_before(train_cutoff) #40 samples for training # 150 samples for validation
train_val_cov  = covariates_ts; # all training and validation covariates (190x4)

model = ARIMA(p=2,d = 1,q=2)

model.fit(series = train_ts,
              future_covariates = covariates_ts)

predictions = model_ts.predict(n=19
              series=train_ts,  
              future_covariates=covariates_ts,
              num_samples = 100 # can be changed to any number)

Please change num_samples from 1 to N to get the probabilistic prediction.

Expected behavior I would expect the predictions to be on the similar scale when predicted with num_samples=1 or with covariates

System (please complete the following information):

Additional context I have examples of predictions provided by num_samples = 1 (Figure 1), =2 (Figure 2), and =100 (Figure 3)

Figure 1 image

Figure 2 image

Figure 3 image

Figure 4 image

dennisbader commented 1 year ago

Hey @yigitcancomlek. This was fixed in #1893 and will be released in the coming two weeks.