danigiro / FoReco

Forecast Reconciliation - Classical (bottom-up), optimal and heuristic combination forecast reconciliation procedures for cross-sectional, temporal, and cross-temporal linearly constrained time series.
https://danigiro.github.io/FoReco/
GNU General Public License v3.0
30 stars 5 forks source link

Converting the Package to Python #2

Closed nikeshnaik closed 3 years ago

nikeshnaik commented 3 years ago

@daniGiro I wanted to convert this package to Python and use it in produciton. But I am not able to find alternatives to the some parts of code. Any info on what will be best way to convert it.. where do I start..

danigiro commented 3 years ago

Hi, the python version of FoReco is one of my goals in the future (I would like to at least release a pre release by the end of this year). However the structure is based on matrices so in my opinion it is not so difficult conceptually to transpose in python. Obviously it is not possible to translate pieces of code blindly since R has very different behaviors (for example, to speed up the calculation, I tried to use as few cycles as possible, I use a lot of sparse matrix, etc). The formulas that are reported in the manual could be very useful to you, which are often re-elaborations of the results of papers in the references This is the idea behind: paper -> formula -> function.

noahsa commented 3 years ago

@daniGiro thanks for the awesome implementation!!! I got a Python implementation of the octrec() function using OLS combination going here https://github.com/noahsa/ctfr. It's very constrained right now and was designed to see if I could reproduce the results from your example in Python. I'm planning on continuing to build a more general implementation like you have here. Wanted to share this. I'd love to hear about any progress y'all have made or discuss future development and collaboration

danigiro commented 3 years ago

@daniGiro thanks for the awesome implementation!!! I got a Python implementation of the octrec() function using OLS combination going here https://github.com/noahsa/ctfr. It's very constrained right now and was designed to see if I could reproduce the results from your example in Python. I'm planning on continuing to build a more general implementation like you have here. Wanted to share this. I'd love to hear about any progress y'all have made or discuss future development and collaboration

@noahsa Oh well, I'll check it out as soon as I'm less busy. In any case, you can also send me a message by email if there are any doubts or if you want to share something.