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

Feature: exponential delays #84

Merged
merged 16 commits into from
Jul 4, 2022
Merged

Feature: exponential delays #84

merged 16 commits into from
Jul 4, 2022

Conversation

seabbs
Copy link
Collaborator

@seabbs seabbs commented Jun 30, 2022

This PR closes #83 by adding support for exponential delays. It has no impact on default functionality. Checking the exponential delays posteriors they look reasonable. Checking posterior predictions indicates that performance is slightly worse than with the log-normal (at least on this very limited test set). The major issue seems to be capturing the first day of reporting which I find a little surprising.

README-week_nowcast-1

README-nowcast-1
README-pp-1

@seabbs seabbs changed the base branch from main to develop June 30, 2022 17:56
@seabbs seabbs added the enhancement New feature or request label Jun 30, 2022
Copy link
Collaborator

@sbfnk sbfnk left a comment

Choose a reason for hiding this comment

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

Looking good to me. Would it be worth reserving dist == 0 for a model option without parametric delay distribution at all, i.e. the nonparametric components only?

Minor point: should update the comment in l.33 of inst/stan/epinowcast.stan.

R/model-tools.R Outdated Show resolved Hide resolved
@seabbs
Copy link
Collaborator Author

seabbs commented Jul 4, 2022

Thanks for the review. Yeah, I considered this and decided against it initially. Reconsidering I think you are right, retooling this now and adding the ability to turn the parametric model on/off at the same time (though without putting anything else in so this will just break if accessed).

Note bumped from ctb -> aut based on contributions: 597e5cb

Comment fixed in: 2f254b3

@seabbs
Copy link
Collaborator Author

seabbs commented Jul 4, 2022

I've updated this so that dist = 0 corresponds with no parametric hazard model. At the moment that gives something fairly silly as the non-parametric reference day model is not in place but will be useful for the future.

As part of these changes I've done a little bit of internal refactoring to make things easier (@adrian-lison
I will add this in to #64 before we catch up on it).

@codecov
Copy link

codecov bot commented Jul 4, 2022

Codecov Report

Merging #84 (2ae1a32) into develop (6390031) will decrease coverage by 0.50%.
The diff coverage is 27.77%.

❗ Current head 2ae1a32 differs from pull request most recent head 10f49c6. Consider uploading reports for the commit 10f49c6 to get more accurate results

@@             Coverage Diff             @@
##           develop      #84      +/-   ##
===========================================
- Coverage    55.65%   55.14%   -0.51%     
===========================================
  Files           12       12              
  Lines          911      923      +12     
===========================================
+ Hits           507      509       +2     
- Misses         404      414      +10     
Impacted Files Coverage Δ
R/model-tools.R 0.00% <0.00%> (ø)
R/model.R 22.54% <62.50%> (+0.51%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 6390031...10f49c6. Read the comment docs.

@seabbs
Copy link
Collaborator Author

seabbs commented Jul 4, 2022

Merging but we should circle back with a check beforedevelop -> main

@seabbs seabbs merged commit 37ad9b7 into develop Jul 4, 2022
@seabbs seabbs deleted the feature-exp-delays branch July 4, 2022 15:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Support exponential delay distributions
3 participants