huggingface / huggingface/evaluate

Handle zero divs in consistent way

Open
#81 0 comments 0 reactions 0 assignees View on GitHub
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

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.