Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What does this PR do?
(Align with nn) Now models will remember the task type (multiclass=True or False) after training. The task type will then be used during testing process.
Raise an error when users try to train binary/multiclass models with "tree".
Raise an error when the ratio of unlabeled instances is larger than 10% in the training dataset.
1. Reproduction Results (Using Codes from this PR):
Metric format: Micro-F1/Macro-F1
Results in Yuchen's Paper
2. Causes of the Differences in Unfair-ToS
(Will not fix) There is a huge gap in the results of unfair-tos because currently LibMultiLabel doesn't support unlabeled samples during the test process.
(TODO) Will check if Yuchen's method is reasonable. Will figure out a workaround in the latest LibMultiLabel.Currently, multiclass datasets using train_{1vsrest, cost_sensitive, etc.} will not be correctly recognized as multiclass datasets. As a result, the result of Micro-F1 is not equal to P@1.Now the task type will be determined using the function from commom_utils.
* (A bit more) The task type can either be detected automatically (set "is_multilabel" to "auto" in config file) or be provided by users (Li-Chung will explain the motivation)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.