Skip to content

Commit

Permalink
restore alpha prior SD to 0.05
Browse files Browse the repository at this point in the history
  • Loading branch information
sbfnk committed Oct 29, 2024
1 parent 4c5c7b3 commit 25b4118
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 5 deletions.
3 changes: 2 additions & 1 deletion NEWS.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
## Model changes

- A bug in the spectral densities of Matern kernels of order other than 3/2 has been fixed and the vignette updated accordingly. By @sbfnk in #835 and reviewed by @seabbs.
- Changed the prior on the (square root of the) magnitude alpha of the Gaussian Process back to HalfNormal(0, 0.05) based on user feedback of unexpected results. By @sbfnk in #PR and reviewed by.

## Package changes

Expand All @@ -25,7 +26,7 @@ A release that introduces model improvements to the Gaussian Process models, alo
- When defining probability distributions these can now be truncated using the `tolerance` argument
- Ornstein-Uhlenbeck and 5 / 2 Matérn kernels have been added. By @sbfnk in #741 and reviewed by @seabbs.
- Gaussian processes have been vectorised, leading to some speed gains 🚀 , and the `gp_opts()` function has gained three more options, "periodic", "ou", and "se", to specify periodic and linear kernels respectively. By @seabbs in #742 and reviewed by @jamesmbaazam.
- Prior predictive checks have been used to update the following priors: the prior on the magnitude of the Gaussian process (from HalfNormal(0, 1) to HalfNormal(0, 0.1)), and the prior on the overdispersion (from 1 / HalfNormal(0, 1)^2 to 1 / HalfNormal(0, 0.25)). In the user-facing API, this is a change in default values of the `sd` of `phi` in `obs_opts()` from 1 to 0.25. By @seabbs in #742 and reviewed by @jamesmbaazam.
- Prior predictive checks have been used to update the following priors: the prior on the magnitude of the Gaussian process (from HalfNormal(0, 0.05)^2 to HalfNormal(0, 0.01)^2), and the prior on the overdispersion (from 1 / HalfNormal(0, 1)^2 to 1 / HalfNormal(0, 0.25)). In the user-facing API, this is a change in default values of the `sd` of `phi` in `obs_opts()` from 1 to 0.25. By @seabbs in #742 and reviewed by @jamesmbaazam.
- The default stan control options have been updated from `list(adapt_delta = 0.95, max_treedepth = 15)` to `list(adapt_delta = 0.9, max_treedepth = 12)` due to improved performance and to reduce the runtime of the default parameterisations. By @seabbs in #742 and reviewed by @jamesmbaazam.
- Initialisation has been simplified by sampling directly from the priors, where possible, rather than from a constrained space. By @seabbs in #742 and reviewed by @jamesmbaazam.
- Unnecessary normalisation of delay priors has been removed. By @seabbs in #742 and reviewed by @jamesmbaazam.
Expand Down
4 changes: 2 additions & 2 deletions R/opts.R
Original file line number Diff line number Diff line change
Expand Up @@ -458,7 +458,7 @@ backcalc_opts <- function(prior = c("reports", "none", "infections"),
#' deviation of the Gaussian process (logged Rt in case of the renewal model,
#' logged infections in case of the nonmechanistic model).
#'
#' @param alpha_sd Numeric, defaults to 0.1. The standard deviation of the
#' @param alpha_sd Numeric, defaults to 0.05. The standard deviation of the
#' magnitude parameter of the Gaussian process kernel. Can be tuned to adjust
#' how far alpha is allowed to deviate form its prior mean (`alpha_mean`).
#'
Expand Down Expand Up @@ -509,7 +509,7 @@ gp_opts <- function(basis_prop = 0.2,
ls_min = 0,
ls_max = 60,
alpha_mean = 0,
alpha_sd = 0.01,
alpha_sd = 0.05,
kernel = c("matern", "se", "ou", "periodic"),
matern_order = 3 / 2,
matern_type,
Expand Down
4 changes: 2 additions & 2 deletions man/gp_opts.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 25b4118

Please sign in to comment.