-
Notifications
You must be signed in to change notification settings - Fork 973
Description
I have this LinearRegression model.
model_tsmx_luz_temp = LinearRegressionModel(lags=[-1,-2,-3,-4,-5,-6,-7,-14,-21,-30,-60,-90,-120,-150,-180,-210,-240,-365],
output_chunk_length=365,
multi_models=False,
random_state=43)
-- temp_max_ser_luz ranges from 2021-01-01 to 2025-10-22
hfc_params_mult_luz = {
"series": temp_max_ser_luz,
"forecast_horizon": 365,
"verbose": True,
"retrain": True,
}
historical_fcasts_mult_luz = model_tsmx_luz_temp.historical_forecasts(last_points_only=False, stride=3, **hfc_params_mult_luz)
-- len(historical_fcasts_mult_luz) == 99
Using the predict method(), I was able to replicate the same results as in historical_fcasts_mult_luz[0]:
I reinstantiated model_tsmx_luz_temp again...
model_tsmx_luz_temp.fit(samp_temp_exa)
pred_tsmx_luz_temp = model_tsmx_luz_temp.predict(365)
THIS TIME, i tried to replicate historical_fcasts_mult_luz[1]:
I extended my training data (samp_temp_exa) by 3 days to simulate stride=3 in my historical_forecasts.

I reinstantiated model_tsmx_luz_temp again...
model_tsmx_luz_temp.fit(samp_temp_exa)
pred_tsmx_luz_temp = model_tsmx_luz_temp.predict(365)
As you can see, I cannot replicate historical_fcasts_mult_luz[1] which is the 2nd iteration result of my historical_forecasts. How did this happen??