scikit-hep / hepstats

Statistics tools and utilities.
https://scikit-hep.org/hepstats/
69 stars 13 forks source link

Upgrade to multiple dimensions and binned PDFs #66

Closed jonas-eschle closed 2 years ago

jonas-eschle commented 2 years ago

This moves for asymptotic asimov dataset creation on the zfit binned PDFs and datasets.

Abstracting this away makes it easy to go for multidimensional asimov datasets (as zfit supports it natively) and fixes #55.

Also contains some other fixes.

I've though about the way to do it, whether we wanna replace the unbinned NLL (the self.loss) of the Asymptotic calculator with the Binned one, but I thought it's maybe better to keep it an implementation detail.

What do you think @marinang (let me know if you're not available)

codecov-commenter commented 2 years ago

Codecov Report

Base: 93.51% // Head: 93.05% // Decreases project coverage by -0.45% :warning:

Coverage data is based on head (d50fb77) compared to base (528c2d4). Patch coverage: 91.83% of modified lines in pull request are covered.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #66 +/- ## ========================================== - Coverage 93.51% 93.05% -0.46% ========================================== Files 26 26 Lines 1156 1281 +125 ========================================== + Hits 1081 1192 +111 - Misses 75 89 +14 ``` | Flag | Coverage Δ | | |---|---|---| | unittests | `93.05% <91.83%> (-0.46%)` | :arrow_down: | Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=scikit-hep#carryforward-flags-in-the-pull-request-comment) to find out more. | [Impacted Files](https://codecov.io/gh/scikit-hep/hepstats/pull/66?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=scikit-hep) | Coverage Δ | | |---|---|---| | [src/hepstats/\_\_init\_\_.py](https://codecov.io/gh/scikit-hep/hepstats/pull/66/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=scikit-hep#diff-c3JjL2hlcHN0YXRzL19faW5pdF9fLnB5) | `100.00% <ø> (ø)` | | | [src/hepstats/hypotests/\_\_init\_\_.py](https://codecov.io/gh/scikit-hep/hepstats/pull/66/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=scikit-hep#diff-c3JjL2hlcHN0YXRzL2h5cG90ZXN0cy9fX2luaXRfXy5weQ==) | `100.00% <ø> (ø)` | | | [src/hepstats/hypotests/calculators/\_\_init\_\_.py](https://codecov.io/gh/scikit-hep/hepstats/pull/66/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=scikit-hep#diff-c3JjL2hlcHN0YXRzL2h5cG90ZXN0cy9jYWxjdWxhdG9ycy9fX2luaXRfXy5weQ==) | `100.00% <ø> (ø)` | | | [src/hepstats/hypotests/core/\_\_init\_\_.py](https://codecov.io/gh/scikit-hep/hepstats/pull/66/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=scikit-hep#diff-c3JjL2hlcHN0YXRzL2h5cG90ZXN0cy9jb3JlL19faW5pdF9fLnB5) | `100.00% <ø> (ø)` | | | [src/hepstats/hypotests/exceptions.py](https://codecov.io/gh/scikit-hep/hepstats/pull/66/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=scikit-hep#diff-c3JjL2hlcHN0YXRzL2h5cG90ZXN0cy9leGNlcHRpb25zLnB5) | `88.88% <ø> (-1.12%)` | :arrow_down: | | [src/hepstats/modeling/\_\_init\_\_.py](https://codecov.io/gh/scikit-hep/hepstats/pull/66/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=scikit-hep#diff-c3JjL2hlcHN0YXRzL21vZGVsaW5nL19faW5pdF9fLnB5) | `100.00% <ø> (ø)` | | | [src/hepstats/splot/\_\_init\_\_.py](https://codecov.io/gh/scikit-hep/hepstats/pull/66/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=scikit-hep#diff-c3JjL2hlcHN0YXRzL3NwbG90L19faW5pdF9fLnB5) | `100.00% <ø> (ø)` | | | [src/hepstats/splot/exceptions.py](https://codecov.io/gh/scikit-hep/hepstats/pull/66/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=scikit-hep#diff-c3JjL2hlcHN0YXRzL3NwbG90L2V4Y2VwdGlvbnMucHk=) | `100.00% <ø> (ø)` | | | [src/hepstats/splot/warnings.py](https://codecov.io/gh/scikit-hep/hepstats/pull/66/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=scikit-hep#diff-c3JjL2hlcHN0YXRzL3NwbG90L3dhcm5pbmdzLnB5) | `100.00% <ø> (ø)` | | | [src/hepstats/utils/fit/sampling.py](https://codecov.io/gh/scikit-hep/hepstats/pull/66/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=scikit-hep#diff-c3JjL2hlcHN0YXRzL3V0aWxzL2ZpdC9zYW1wbGluZy5weQ==) | `78.94% <ø> (-0.54%)` | :arrow_down: | | ... and [22 more](https://codecov.io/gh/scikit-hep/hepstats/pull/66/diff?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=scikit-hep) | | Help us with your feedback. Take ten seconds to tell us [how you rate us](https://about.codecov.io/nps?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=scikit-hep). Have a feature suggestion? [Share it here.](https://app.codecov.io/gh/feedback/?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=scikit-hep)

:umbrella: View full report at Codecov.
:loudspeaker: Do you have feedback about the report comment? Let us know in this issue.