You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When provided with a completely constant time series (0,0,0) ARMA is being created with no intercept. Hence, for all the constant time series we predict 0. Slight alteration of time series with epsilon on the other hand leads to (0,0,0) ARMA with mean intercept.
To Reproduce
import pandas as pd
from pmdarima import auto_arima
from IPython.display import display
#Testing the Arima predictions with constant time series (returns 0 predictions)
data = pd.Series([1]*20, index=pd.period_range(start='2024-01-01', periods=20, freq='D'))
auto_arima_model = auto_arima(data, error_action='ignore')
n_periods = 5
forecast = auto_arima_model.predict(n_periods=n_periods)
display(auto_arima_model.summary())
print("Forecast for constant time series:", forecast)
#Testing the Arima predictions with constant time series and one altered value (returns Mean as predictions)
data_non_constant = pd.Series([1]*19 + [1.1], index=pd.period_range(start='2024-01-01', periods=20, freq='D'))
auto_arima_model_non_constant = auto_arima(data_non_constant, error_action='ignore')
n_periods = 5
forecast = auto_arima_model_non_constant.predict(n_periods=n_periods)
display(auto_arima_model_non_constant.summary())
print("Forecast for almost constant time series:", forecast)
Describe the bug
When provided with a completely constant time series (0,0,0) ARMA is being created with no intercept. Hence, for all the constant time series we predict 0. Slight alteration of time series with epsilon on the other hand leads to (0,0,0) ARMA with mean intercept.
To Reproduce
Versions
Expected Behavior
Expect to have ARIMA prediction with a constant (with a mean)
Actual Behavior
Predicts future observations with 0
Additional Context
Error happens in line 443-460, if set with_intercept to True, then we predict with a Mean +- epsilon.
The text was updated successfully, but these errors were encountered: