ASUS-AICS / LibMultiLabel

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

Linear Metrics & More #336

Closed donglihe-hub closed 1 year ago

donglihe-hub commented 1 year ago

What does this PR do?

  1. automatically detect classification task type.
  2. warn users when they attempt to measure p@k where I. k > 1 and task type is not multilabel. In such case, a fallback metric will be used, i.e., k@1; and II. k > number of classes. In such case a fallback metric will be used, i.e., k@num_classes. (nn does this while linear not)
  3. support parallel training for linear techniques (currently only "1vsrest").
  4. support "micro" and "macro" for linear Precision.

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.