[AutoARIMA] when using AutoARIMA on a constant time series the forecast fitted values are zero no matter the constant.
What happened + What you expected to happen
When fitting AutoARIMA to a constant series the forecast fitted values will be zeros even though the out of sample forecast will be correct.
Versions / Dependencies
library: 1.7.5 Python: 3.12.4 OS: macOS 14.5
Reproduction script
from statsforecast import StatsForecast from statsforecast.models import AutoARIMA import pandas as pd import numpy as np
size = 100 df = pd.DataFrame({'unique_id': 0, 'ds': range(size), 'y': np.full(size, 7)})
sf = StatsForecast(models=[AutoARIMA()], freq=1) fcst = sf.forecast(1, df, fitted=True) print(fcst) print()
fitted = sf.forecast_fitted_values() print(fitted)
Issue Severity
Low: It annoys or frustrates me.
Hi @omriKramer , I just checked the code, with Nixtla version 2.0.1 it does not happen. The forecast is 7 in this case.