-
Notifications
You must be signed in to change notification settings - Fork 22
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
Limit allowed values #5
Comments
I think the nodes encode this information already: if a value is out of range or a key is not in the map then an error is thrown. Each node should probably get a flag to declare alternative handling of out-of-range, like clamp or default. |
* Add overflow behavior handling in binning nodes Closes #5 * Add binning tests And fix a bug! std::lower_bound gives edges[i] < x <= edges[i+1] std::upper_bound gives edges[i] <= x < edges[i+1] which is what we specified * Update rendered schemas Need to add this to pre-commit or something
Hi @nsmith-, could we reopen this issue? There's a use case in the TauPOG for limiting the values of string keys for systematic variations of the tau ID SF: We would like to decorrelate the statistical uncertainties between pt bins. To keep the file size down, we are using the Implementing an optional field of allowed values in the |
In some cases, one might want to limit the allowed values of an input variable to some discrete list or range. If the input is not within the predefined range, an error is thrown. This would be an optional key in the input variables, e.g.
Of course in some cases you might capture these cases with overflow, underflow, or default values elsewhere down the line.
The text was updated successfully, but these errors were encountered: