Replies: 2 comments 14 replies
-
If the question is about how to throw toys using If you're asking about how to do it yourself, look here: pyhf/src/pyhf/infer/calculators.py Lines 756 to 779 in c096b33 suggested_init ). At that point, we just sample as you typically expect from the "scipy API" in the same way.
|
Beta Was this translation helpful? Give feedback.
-
Hi Giordon and Alex, Thank you for your help, and I have a question for the code below:
I would expect the standard deviation |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Dear experts,
Could you please assist me in understanding how to use pyhf for drawing toy Monte Carlo (MC) samples? I came across the following code snippet, which seems to draw toys from the template model:
My understanding is that we first sum all the components and then draw samples from the Poisson distribution defined for each bin, with the mean set to the count in the corresponding template bin. Is this understanding correct? And is this the correct approach for drawing toys?
Furthermore, if I wish to draw toys with scaling factors applied to the signal and background components (for generating validation plots like linearity plots), should I replace model.config.suggested_init() with a list of the scaling factors?
If my understanding is correct, would the following code also achieve the desired outcome? (I included it to confirm my understanding.)
Thank you for your support!
Boyang
Beta Was this translation helpful? Give feedback.
All reactions