ASUS-AICS / LibMultiLabel

A library for multi-class and multi-label classification
MIT License
152 stars 30 forks source link

Fixed recall for no label instances #351

Closed Sinacam closed 10 months ago

Sinacam commented 10 months ago

What does this PR do?

339 introduced a bug for recall.

In the case where there are no labels for an instance, its recall should be 0, not 1. nan_to_num by default sets NaN to 0, the changes in F1 is to make this explicit.

Test CLI & API (bash tests/autotest.sh)

Test APIs used by main.py.

Check API Document

If any new APIs are added, please check if the description of the APIs is added to API document.

Test quickstart & API (bash tests/docs/test_changed_document.sh)

If any APIs in quickstarts or tutorials are modified, please run this test to check if the current examples can run correctly after the modified APIs are released.