-
Notifications
You must be signed in to change notification settings - Fork 92
feat: Add hypotest kwargs to pyhf.infer.intervals.upperlimit #1613
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
feat: Add hypotest kwargs to pyhf.infer.intervals.upperlimit #1613
Conversation
src/pyhf/infer/intervals.py
Outdated
| :class:`~pyhf.infer.hypotest` results at each test POI. | ||
| Only returned when ``return_results`` is ``True``. | ||
| """ | ||
| test_stats = kwargs.pop('test_stat', "qtilde") |
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.
should we maybe rename kwargs into hypotest_kwargs and pass
hypotest(mu, data, model, return_expected_set=True, **hypotest_kwargs)
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.
The idea being here that this allows for further manipulation of hypotest from upperlimit as desired? Seems to make sense.
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.
Yeah
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.
@lukasheinrich @matthewfeickert Alright I'll pass the hypotest_kwargs to infer/hypotest directly.
matthewfeickert
left a comment
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.
Thanks @aryan26roy (and sorry for the slow reply — as you can see all of the core devs have been swamped lately). This basically LGTM as the test covers the minimal case and I'm pushing a patch now, but can you also add yourself to the contributors list?
Lines 42 to 44 in 7ecaa63
| 7. Make sure that you've added your name to `docs/contributors.rst`. | |
| If you haven't **please** do so by simply appending your name to the bottom of the list. | |
| We are thankful for and value your contributions to `pyhf`, not matter the size. |
…yhf into add-test_stat-to-upperlimit
matthewfeickert
left a comment
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'm going to approve this now, but we should probably get #1622 in first so that we can test that Codecov is properly getting coverage reports even from contributor PRs.
Codecov Report
@@ Coverage Diff @@
## master #1613 +/- ##
=======================================
Coverage 97.70% 97.70%
=======================================
Files 63 63
Lines 4048 4048
Branches 576 576
=======================================
Hits 3955 3955
Misses 54 54
Partials 39 39
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
|
Okay PR #1622 is working as intended, so we now have Codecov reporting on contributors PRs. @lukasheinrich @kratsg this should be ready for review now. |
|
Thanks for the PR @aryan26roy! |
|
@matthewfeickert , glad to be of help! |
Description
pyhf.infer.upperlimit(toys) #1336This PR makes the test statistic configurable in intervals/upperlimit by adding a kwarg in the function definition.
Checklist Before Requesting Reviewer
Before Merging
For the PR Assignees: