Lightning-AI / Lightning-AI/torchmetrics

AdjustedMutualInfoScore mishandles perfect-match limit cases

Open
#3,495 0 comments 0 reactions 0 assignees View on GitHub

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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.