Skip to content

Multilabel#397

Open
luizfacury wants to merge 2 commits into
galilai-group:mainfrom
luizfacury:multilabel
Open

Multilabel#397
luizfacury wants to merge 2 commits into
galilai-group:mainfrom
luizfacury:multilabel

Conversation

@luizfacury
Copy link
Copy Markdown
Contributor

Description

This pull request adds support for multi-label classification to the OnlineKNN callback, along with related validation, warnings, and tests. The main changes include new arguments for multi-label mode, logic to handle multi-label voting in KNN prediction, and additional warnings for AUROC metric usage. Unit tests have also been added to ensure correct initialization and computation for multi-label scenarios.

Multi-label KNN support:

  • Added multi_label and num_classes arguments to the OnlineKNN class, with validation to require num_classes when multi_label=True. [1] [2] [3]
  • Implemented multi-label voting logic in _compute_knn_predictions, allowing correct prediction computation for multi-label datasets.

Metric handling and warnings:

  • Added a warning in both OnlineKNN and probe callbacks when AUROC metrics are detected, informing users about required target label types for torchmetrics. [1] [2]

Testing:

  • Added unit tests to verify multi-label initialization validation, AUROC warnings, and correct multi-label KNN voting math.

Checklist

  • I have read the Contributing document.
  • The documentation is up-to-date with the changes I made (check build artifacts).
  • All tests passed, and additional code has been covered with new tests.
  • [] I have added the PR to the RELEASES.rst

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant