Skip to content
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

Extend fraction to weighted samples #367

Open
HDembinski opened this issue Sep 28, 2022 · 1 comment
Open

Extend fraction to weighted samples #367

HDembinski opened this issue Sep 28, 2022 · 1 comment

Comments

@HDembinski
Copy link
Collaborator

HDembinski commented Sep 28, 2022

We have a fraction accumulator now, but it does not work correctly for weighted samples. However, we definitely need this in high-energy physics because we often estimate the efficiency of some detector from weighted simulation samples.

There are several ways how this could be implemented

  1. New class weighted_fraction<T>
  2. Specialization fraction<weighted_sum<T>>
  3. Template specialization fraction<T, bool weight_support = False>

Number 3) is my least favored. I like 2), if that's feasible.

Ping @henryiii @gohil-jay @jpivarski

@HDembinski
Copy link
Collaborator Author

For those interest, the math for weighted fractions is discussed here https://arxiv.org/abs/2110.00294

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant