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
distribution interface to dist_spec
#504
Conversation
1ed6401
to
d0525df
Compare
This comment was marked as outdated.
This comment was marked as outdated.
d0525df
to
e152fe6
Compare
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
36575a0
to
7673d3a
Compare
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
053f3e4
to
2135b4b
Compare
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
f0bbe0d
to
267c8e0
Compare
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this is good to be merged in after both another site read and a functionality review. A few minor comments outstanding.
I do think that any porting of this for use elsewhere needs to come with a refactor/redesign as the current implementation seems quite brittle (all the ifelse and magic string based detection of distributions).
I also expect there to be a few edge cases this review has missed that will need fixing once this is on main but we will see (and 🤞🏻) .
Nice work on this - a lot of work but worth it as much nicer to use!
This is how benchmark results would change (along with a 95% confidence interval in relative change) if 3a3d8d8 is merged into main:
|
Co-authored-by: Sam Abbott <s.e.abbott12@gmail.com>
This is how benchmark results would change (along with a 95% confidence interval in relative change) if 3a3d8d8 is merged into main:
|
The aim of this PR is to introduce a new distribution interface to replace the current
dist_spec
interface. This should make user interaction more intuitive and be more easily extensible if developers want to add more distributions (Weibull seems an obvious candidate). Eventually (following a deprecation cycle asdist_spec
became part of a release necessitated by updates torstan
)dist_spec
would become an internal function and the user would only interact with it via the distribution functions.Examples of the new interface:
Created on 2024-01-11 with reprex v2.0.2
Somewhat sad to be masking
base::gamma
andstats::sd
but perhaps unavoidable - or of course could name them differently.To do following initial review:
dist_spec
in examples / vignettesadjust_infection_to_report
to use this and deprecategamma_dist_def
andlnorm_dist_def
Tests etc are expected to fail at initial state.
Closes #382
Closes #498