Skip to content

GP: lengthscale: Use inverse-gamma prior if ls_sd = 0 #257

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

Merged
merged 6 commits into from
Oct 8, 2021

Conversation

hsbadr
Copy link
Contributor

@hsbadr hsbadr commented Jun 4, 2021

This is a proposal to address #255. It allows using an inverse-gamma prior on Gaussian process (GP) length-scale parameter while keeping the user interface and the default log-normal prior unchanged. The parameters of the inverse-gamma prior are a function of ls_max and have been tested for both short and long simulations where the default prior makes the model unstable. The new prior is more stable for long simulations and adaptively change the distribution based on the simulation length (total number of days) without relying on the user inputs or the fixed defaults. It can be tested by setting ls_sd = 0 in gp_opts().

I haven't updated the docs (roxygen2::roxygenize()) or reconfigured because I use the development version on Stan.

Here's the summary plot from the example with gp = gp_opts(ls_sd = 0):

image

@seabbs Feel free to make any changes to this proposal.

@hsbadr
Copy link
Contributor Author

hsbadr commented Jun 4, 2021

@seabbs In the manual, ls_min defaults to 7 while it's actually ls_min = 3. I'd like to change the default to ls_min = 0 and update the docs. What do you think?

@hsbadr
Copy link
Contributor Author

hsbadr commented Jun 14, 2021

@seabbs I've tested this. It's ready to go.

Copy link

@mommamgaypay mommamgaypay left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Contributor

@seabbs seabbs left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @hsbadr,

Apologies this really got away from me over the summer. This seems like a sensible change and works as advertised. Thanks for pushing this forward!

@seabbs seabbs merged commit 703db20 into epiforecasts:master Oct 8, 2021
sbfnk pushed a commit that referenced this pull request May 3, 2024
* GP: lengthscale: Use inverse-gamma prior if ls_sd = 0

* GP: lengthscale: ls_min defaults to 0

* GP: alpha_sd defaults to 0.05 for stability

* stan: Update upper and lower bounds for Rt

* man: roxygen2::roxygenize()
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.

3 participants