umami-hep / puma

puma - Plotting UMami Api
Apache License 2.0
4 stars 27 forks source link

Add weight support for eff calculation #206

Closed dkobylianskii closed 1 year ago

dkobylianskii commented 1 year ago

Summary

This pull request introduces the following changes

Relates to the following issues

Conformity

codecov-commenter commented 1 year ago

Codecov Report

Merging #206 (6b1e192) into main (27971ea) will increase coverage by 0.00%. The diff coverage is 100.00%.

@@           Coverage Diff           @@
##             main     #206   +/-   ##
=======================================
  Coverage   97.15%   97.16%           
=======================================
  Files          35       35           
  Lines        3165     3171    +6     
=======================================
+ Hits         3075     3081    +6     
  Misses         90       90           
Files Changed Coverage Δ
puma/integrated_eff.py 94.73% <100.00%> (ø)
puma/metrics.py 98.41% <100.00%> (+0.16%) :arrow_up:
puma/tests/test_metrics.py 100.00% <100.00%> (ø)

:mega: We’re building smart automated test selection to slash your CI/CD build times. Learn more

dguest commented 1 year ago

Minor commnets:

Anyway unless people are regularly running out of memory this seems like a big improvement: hopefully at least making a ROC with 1000 cut values is much faster with this.

samvanstroud commented 1 year ago

As far as I know no one has had memory issues with jet-wise stuff yet :D

dkobylianskii commented 1 year ago

Hi @dguest, @samvanstroud ,

I checked the speed, we have 100 times improvement for 1e6 jets and 1e3 cuts :) In the ROC class, we use recalculated rejection values, so there is no need to add weights there.

samvanstroud commented 1 year ago

@dkobylianskii thanks!