tidyverts / fabletools

General fable features useful for extension packages
http://fabletools.tidyverts.org/
89 stars 31 forks source link

reconciliation with immutable forecasts #352

Closed AngelPone closed 3 days ago

AngelPone commented 2 years ago

Keeping base forecasts of some nodes in the hierarchy immutable after reconciliation can be beneficial and necessary sometimes. I suggest adding this functionality to forecast.lst_mint_mdl method. And I can work on it. References: Zhang, B.; Kang, Y.; Panagiotelis, A.; Li, F. Optimal Reconciliation with Immutable Forecasts. arXiv:2204.09231 [econ, stat] 2022.

mitchelloharawild commented 2 years ago

This would be great, I recently heard about this work. I haven't had the chance to read your paper yet, but can this concept be applied to all forms of reconciliation (not just MinT)? I've got a rework in mind for reconciliation to reduce code duplication, and am thinking that a method like this would be nice to make available more generally across all compatible reconciliation techniques.

AngelPone commented 2 years ago

It can be applied to all kinds of weighting matrix in mint. As for other forms of reconciliation, do you mean top-down, middle-out and bottom-up? Yes, they can be a special case of our method that keeps the specified level immutable.

mitchelloharawild commented 2 years ago

Yes, that's what I expected. So I think this should be implemented a bit more generally as part of the reconciliation rewrite. Do you have some sample code available for your method that I can consider for this rewrite?

AngelPone commented 2 years ago

I implemented my method in forecast.lst_mint_mdl. I can pull a request later.

mitchelloharawild commented 2 years ago

Oh, great. Well if it's ready to go then a PR would be great :)