Lightning-AI / Lightning-AI/torchmetrics
AdjustedMutualInfoScore mishandles perfect-match limit cases
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 2.5k
- Forks
- 526
- Avg merge
- 6d 11h
- Merged PRs (30d)
- 5
Description
I was comparing `adjusted_mutual_info_score` with scikit-learn and noticed three equivalent-partition limit cases disagree:
- empty inputs raise during expected-MI reduction
- two one-cluster labelings return `0`
- two relabeled singleton partitions return `0`
scikit-learn returns `1.0` because the partitions are identical. This happens with every averaging method.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start at the adjusted_mutual_info_score entry point and compare its handling of empty inputs, one-cluster labelings, and relabeled singleton partitions with scikit-learn across every averaging method. Done means empty inputs no longer raise and all three equivalent-partition cases return 1.0.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python, pytorch, scikit-learn
- Domain
- machine-learning
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 68/100