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

Hyperparameters for season in the Hill model (in R demo only) #117

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

eschrom
Copy link
Collaborator

@eschrom eschrom commented Feb 5, 2025

I have updated the R demo to incorporate hyperparameters into the Hill model that allow the final uptake and the half-maximal date to vary by season. Because this is just in the R demo, which is for brainstorming and will not be part of the final codebase, it doesn't require a detailed review. This is just to demonstrate few points, using the flu data.

As a reminder, here is what the entirety of the available flu data looks like:
image

If a Hill model is fit to these data, and then a forecast for the 2024/25 season is made from late October 2024 onward, we get:
image
Notice how 1) the forecast does not align with the data on the forecast date, and 2) the 95% credible interval starts off wide without widening much into the future.

Now we do the same thing, but including hyperparameters to allow the exact shape of the Hill curve to vary by season:
image
Both problems are nearly solved! The forecast aligns closely (though not perfectly) with the data on the forecast date, and the credible interval starts off much thinner (though still encompassing some values lower than observed cumulative uptake on the forecast date).

We can probably ignore the last vestiges of these two problems, because we are moving toward a refactor in which we no longer trust the observed data to be synonymous with the true latent uptake. In that case, some uncertainty about what the true uptake is, even on dates that have already been observed, is totally acceptable.

I think this is a nice validation of @swo's intuition for how prediction uncertainty should be greater at the tail of a sigmoid curve as opposed to the middle, and a nice validation of our collective intuition that grouping the data on season is important.

@eschrom eschrom requested review from Fuhan-Yang and swo February 5, 2025 23:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant