Hi, i am running different methods and sometimes f...
# hierarchicalforecast
j
Hi, i am running different methods and sometimes for average_proportions and proportion_averages I only get NaN values. I guess this is related so some kind of short history over many articles or so, but would love to know if there is a systematic rule or so?
so even if i restrict the fitted period to the most recent period, I still get NaN and I would love to understand why πŸ™‚
my fitted and hat df don't have nan values
ok, found the problem: it is a bit complex, but maybe good for you guys to understand. so we have the hierarchical in real production and run inference every week. now the forecast min date always jumps by one week of course. and I concatenate one more week of fitted values from my originally trained model. but this code had a bug it turns out and i didn't add the last week for the fitted values. interestingly the code didn't break, but just gave NaN on the proportional foreasts, which i guess makes sense as the fitted dates didn't match until the first forecast date. Some error message would be lovely here πŸ˜‰ maybe I could even do the PR, let's see.
o
Ah, ok good to know
Indeed maybe a message on date alignment would be helpful, if you file a PR / draft I'll have a look!
j
let me try. i have never dived so deep into your source code and never did a PR for an open source project. let's see how for i come πŸ™‚
πŸ‘ 1
m
@jan rathfelder, we always encourage first contributors. We hope to see your PR soon.
j
i am trying, my work keeps my so busy + 2 young kids... even weekends are packed πŸ™‚
πŸ˜… 1
@Olivier there is a PR here, let's see what you are saying: https://github.com/Nixtla/hierarchicalforecast/pull/335
Maybe one more comment: the feature branch name does not really resemble the issue anymore. It started off with nan values in my work projects when there was the date misalignment between fitted and hat values. But when I was trying to replicate this with your examples the problem don’t appear. But what I could show is that nan values in the initial dfs created nan values after the hierarchical methods. But only for average proportion and proportion averages. So this is included into the PR, but the branch name is slightly different. I hope that is still fine
o
Thanks! I'll have a look, and post my comments in the PR
I left some comments in the PR
j
Perfect!