-
Couldn't load subscription status.
- Fork 1.4k
[RF] ToyMCSampler improvements for binned toys #20171
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
base: master
Are you sure you want to change the base?
Conversation
|
This PR is still WIP. This is because the use case relies on #20097 being merged first (even though the functionalities are not closely related). |
|
I have merged #20097. Could you please rebase this PR? Also, could you please add a commit where you add both of you to the list of contributors for ROOT 6.38 (insert in alphabetical order)? Thanks a lot! |
Test Results 22 files 22 suites 3d 18h 55m 45s ⏱️ For more details on these failures, see this check. Results for commit b2f731f. ♻️ This comment has been updated with latest results. |
fbb3468 to
c5dddab
Compare
c5dddab to
6dbedd7
Compare
Thanks a lot! Done and done. I've removed the WIP marker now. |
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.
Thank you very much! This change makes sense to me.
| // --- Ensure the ToyMCSampler generates toys with the same structure as the observed data | ||
| toymcs->SetProtoData(&data); |
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.
This is a change in behavior that likely causes the RooStats tests to fail. I'll take a look.
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.
This is a bit of a hard question. I'll try to explain my reasoning here. The core issue that triggered this PR is this: When running the ToyMCSampler on a binned dataset, before this fix, this would happen: That is because the ToyMCSampler would always default to an unbinned dataset, and the way the HypoTestCalculator is setup it would not communicate the shape of the dataset to the underlying sampler, triggering this error. In that sense, the change in behavior is intentional and is the main reason for this fix. I would, however, have hoped that it would not affect the behavior on datasets that are already unbinned, where the ToyMCSampler (supposedly?) worked correctly already before. The change of the behavior for binned datasets is intended and the point of this fix. So perhaps to fling this question back to you: Is there a unit test that produces notably different results than it did before, or is this just a case where the numerics changed a bit due to the toys now being more reflective of the example dataset than they were before? |
This Pull request:
Adds the ability to control the ToyMCSampler to emit binned toys.
Makes use of this new capability in the HypoTestCalculator in cases where the observed data is binned.
Checklist:
This PR fixes #