Skip to content
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

growth_rate has some error #345

Open
dsweber2 opened this issue Jun 25, 2024 · 4 comments
Open

growth_rate has some error #345

dsweber2 opened this issue Jun 25, 2024 · 4 comments
Labels
bug Something isn't working

Comments

@dsweber2
Copy link
Contributor

@dajmcdon mentioned there was some kind of error in the `growth rate calculation

@dsweber2 dsweber2 added the bug Something isn't working label Jun 25, 2024
@dajmcdon
Copy link
Contributor

I believe only the method = "rel_change" will work correctly. The rest should not be used. A good stop gap would be to just remove those as possible arguments. But eventually, we'd want to fit the growth rate correctly on training data, and extrapolate correctly for test data.

@dsweber2
Copy link
Contributor Author

dsweber2 commented Oct 3, 2024

just confirming, is the problem here or in epiprocess? If I used test_data that was the full data of the training set, would it work correctly? I'm thinking about using this as a replacement for most of the derivative estimates in a flusion-like model, as the way I wrote those is very slow.

@dajmcdon
Copy link
Contributor

dajmcdon commented Oct 3, 2024

just epipredict.

Yes, the error is that the calculation made in get_test_data only applies when method = "rel_change". If you give it the whole training set, then it's fine.

@dajmcdon
Copy link
Contributor

dajmcdon commented Oct 3, 2024

I think I removed the other methods for the moment?

And the "proper fix" in my mind is to deprecate get_test_data in favor of a fix to forecast() such that it takes the whole training set, appends any new data, does all the preprocessing, then returns only the predictions at the test data (rather than selecting a subset of data needed to do the preprocessing).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants