-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Issue 127: add offset to ts models #129
Conversation
I would've thought offset of 1 for raw counts; we're using 1 / max_visits as the offset for proportions |
@dylanhmorris Agree that it's not consistent with what we do in the scoring, but an offset of 1 could be relatively big since the case counts can be so low. |
Just subtract 1 when you convert the forecast back to natural scale? (i.e. we explicitly forecast the quantity log(1+x) and then compute x) |
@dylanhmorris Yes. Let's actually "undo" the offset here after fitting the model, before saving the results. (The output of Somewhere in here: pyrenew-hew/pipelines/timeseries_forecasts.R Lines 85 to 89 in dbcfb6b
|
@SamuelBrand1 can you implement? |
The same underlying idea applies I think: in |
|
As above, I think the back-transform is done automatically... Do you want this for the pyrenew output? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@SamuelBrand1 fable is very impressive! Thanks!
This PR closes #127.
@damonbayer identified that the problem with
NA
forecast output was occurring in numerator forecasts when the data hit zero due tolog
transform.I've added an offset following identical pattern (1 / max observed to symmetrise in log domain) to elsewhere in this repo.