huggingface / huggingface/evaluate
Handle zero divs in consistent way
Open
- Dominant language
- Python
- Stars
- 2.5k
- Forks
- 341
- PR merge metrics
- No merged PRs in 30d
Description
Sklearn has a consistent way of dealing with division-by-zero (either ignore, error out or warn), which we pass on in wrappers (see [example](https://github.com/huggingface/evaluate/blob/main/metrics/precision/precision.py#L143)).
In our own canonical evaluation modules, we also have potential ZeroDivs that we currently do not handle, e.g.: https://github.com/huggingface/evaluate/blob/main/comparisons/mcnemar/mcnemar.py#L94. We should fix this.
Contributor guide
Assessment
This issue has not been assessed yet.