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

fix_dist -> fix_parameters #733

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

fix_dist -> fix_parameters #733

wants to merge 1 commit into from

Conversation

sbfnk
Copy link
Contributor

@sbfnk sbfnk commented Aug 2, 2024

Description

This PR closes #715.

Initial submission checklist

  • My PR is based on a package issue and I have explicitly linked it.
  • I have tested my changes locally (using devtools::test() and devtools::check()).
  • I have added or updated unit tests where necessary.
  • I have updated the documentation if required and rebuilt docs if yes (using devtools::document()).
  • I have followed the established coding standards (and checked using lintr::lint_package()).
  • I have added a news item linked to this PR.

After the initial Pull Request

  • I have reviewed Checks for this PR and addressed any issues as far as I am able.

Copy link
Contributor

github-actions bot commented Aug 2, 2024

This is how benchmark results would change (along with a 95% confidence interval in relative change) if 81258af is merged into main:

  • ✔️default: 33.9s -> 35.3s [-14.92%, +23.37%]
  • ✔️no_delays: 39.9s -> 43.7s [-10.59%, +29.37%]
  • ✔️random_walk: 10.4s -> 9.96s [-11.72%, +2.77%]
  • ✔️stationary: 19.6s -> 19.3s [-13.01%, +9.43%]
  • ✔️uncertain: 53.8s -> 52.2s [-21.96%, +15.89%]
    Further explanation regarding interpretation and methodology can be found in the documentation.

@sbfnk sbfnk enabled auto-merge August 2, 2024 13:28
@sbfnk sbfnk requested a review from jamesmbaazam August 2, 2024 13:28
@@ -11,6 +11,10 @@
- The interface for defining delay distributions has been generalised to also cater for continuous distributions
- When defining probability distributions these can now be truncated using the `tolerance` argument

## Package changes

- `fix_dist()` has been renamed to `fix_parameters()`. By @sbfnk in and reviewed by.
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
- `fix_dist()` has been renamed to `fix_parameters()`. By @sbfnk in and reviewed by.
- `fix_dist()` has been renamed to `fix_parameters()`. By @sbfnk in #733 and reviewed by @jamesmbaazam.

#' @param strategy Character; either "mean" (use the mean estimates of the
#' mean and standard deviation) or "sample" (randomly sample mean and
#' standard deviation from uncertainty given in the `<dist_spec>`
fix_parameters <- function(x, strategy = c("mean", "sample")) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
fix_parameters <- function(x, strategy = c("mean", "sample")) {
fix_dist <- function(x, strategy = c("mean", "sample")) {

#' standard deviation from uncertainty given in the `<dist_spec>`
fix_parameters <- function(x, strategy = c("mean", "sample")) {
lifecycle::deprecate_warn(
"1.6.0", "fix_parameters()", "fix_parameters()"
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
"1.6.0", "fix_parameters()", "fix_parameters()"
"1.6.0", "fix_dist()", "fix_parameters()"

@@ -108,7 +108,8 @@ reference:
- bound_dist
- collapse
- discretise
- fix_dist
- fix_parameters
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
- fix_parameters

Copy link
Contributor

@jamesmbaazam jamesmbaazam left a comment

Choose a reason for hiding this comment

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

Thanks. You could also add a test for deprecation of fix_dist().

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.

rename fix_dist
2 participants