openstef icon indicating copy to clipboard operation
openstef copied to clipboard

Make median model autoregressive

Open ylvab opened this issue 10 months ago • 1 comments

After working with the median model for a bit, we realized we would need it to be autoregressive, because we often want a larger forecast horizon than we have historical window. Extending the historical window too far will make the model less responsive to changes.

The way OpenSTEF handles features makes autoregression challenging, but I think we got it working as expected now.

ylvab avatar Apr 28 '25 15:04 ylvab

@clara-de-smet @bartpleiter We found some issues with the median model. Making it autoregressive solve these issues. Please have another look.

JanMaartenvanDoorn avatar May 02 '25 11:05 JanMaartenvanDoorn

Very well documented! I'd suggest to split some isolated functionality from the fit and predict methods to separate (static)methods, since the methods are quite large now. For example the autoregressive step could be a separate method.

Thank you for the review! I have broken the autoregressive step out to a static method, as you suggested, and also moved much of the validation in fit into a static method.

I cannot break into several static methods, since they would depend on each other and no longer be static. It would be possible to put parts as functions outside the class, but I'm not sure that would improve readability.

ylvab avatar May 09 '25 11:05 ylvab