Skip to content

Check tail of nonparametric PMFs #752

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
Aug 22, 2024
Merged

Check tail of nonparametric PMFs #752

merged 6 commits into from
Aug 22, 2024

Conversation

jamesmbaazam
Copy link
Contributor

@jamesmbaazam jamesmbaazam commented Aug 21, 2024

Description

This PR closes #738.

This PR adds a check on the tail of a supplied nonparametric vector to see if consecutive values are below a certain threshold and throws a warning if so. See the linked issue and this comment for an explanation of the rationale for this check. In summary, it is an optimisation issue.

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.

@jamesmbaazam jamesmbaazam changed the title Add function to check pmf tail Check tail of nonparametric PMFs Aug 21, 2024
@jamesmbaazam jamesmbaazam requested a review from seabbs August 22, 2024 12:30
seabbs
seabbs previously approved these changes Aug 22, 2024
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.

Nice. Looks good.

@seabbs seabbs enabled auto-merge August 22, 2024 13:17
Co-authored-by: Sam Abbott <s.e.abbott12@gmail.com>
@seabbs seabbs added this pull request to the merge queue Aug 22, 2024
Merged via the queue into main with commit 73d3a44 Aug 22, 2024
9 checks passed
@seabbs seabbs deleted the check-sparse-pmfs branch August 22, 2024 16:51
jamesmbaazam added a commit that referenced this pull request Aug 27, 2024
* Add function to check pmf tail

* Add test

* Apply tail check to pmf

* Add NEWS item

* Improve documentation

* Update NEWS.md

Co-authored-by: Sam Abbott <s.e.abbott12@gmail.com>

---------

Co-authored-by: Sam Abbott <s.e.abbott12@gmail.com>
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.

Add a warning when PMFs are very sparse in the tails
2 participants