BUG: OLS add constant has to be forced
The number of samples within a generator call for sets (train, val, test) might be smaller than `window_history'. This results in problems during post-processing the data for the OLS reference prediction.
If a variable in input space is constant, statsmodels api detects this input variable as a constant and doesn't add the default constant that is required. Therefore, explicitly add a flag, that add_constant should always add a constant independently from the given input data. NOTE: This happens only for very short time series (in the recent case: length was 2 samples / time steps)
sm.add_constant(data) -> sm.add_constant(data, has_constant='add')
Edited by Ghost User