Lightning-AI / torchmetrics

Torchmetrics - Machine learning metrics for distributed, scalable PyTorch applications.
https://lightning.ai/docs/torchmetrics/
Apache License 2.0
2.1k stars 402 forks source link

Implement clustering accuracy #2767

Open moetayuko opened 1 day ago

moetayuko commented 1 day ago

🚀 Feature

Motivation

Clustering accuracy is a popular metric. In addition to classification accuracy, it employs the Hungarian algorithm to align the predicted pseudo labels and the ground truth labels.

Current implementations of clustering accuracy use either scipy.optimize.linear_sum_assignment or the munkres package for Hungarian. I'm not sure if this is allowed for torchmetrics, and a custom implementation needs to be added if not.

Pitch

Implement clustering accuracy in torchmetrics.clustering

github-actions[bot] commented 1 day ago

Hi! thanks for your contribution!, great first issue!