Comments (4)
Hi @weihua916, thanks for raising this issue.
I created PR #2507 that is intended to close this issue. The intention behind our implementations are to match sklearn pretty close. By this I mean:
- Averageprecision when all labels are 1 in sklearn returns a score of 1, which we are also doing
- Averageprecision when all labels are 0 in sklearn returns a score of -0.0, where our implementation returns nan. That is not the intention and this will be fixed in PR #2507 to raise a user warning and return -0.0 similar to sklearn.
- AUROC in sklearn completely fails in both the case when all labels are 1 and all labels are 0. We instead have chosen to raise user warnings that scores in both cases are essentially undefined and return the arbitrary score of 0. The reason for this is that other users have requested that metrics do not crash there code during training, which will also happens if the scores return
nan
. We therefore have chosen to go with a real, but arbitrary score.
from torchmetrics.
Thank you for addressing the issue! For AUROC, I personally still believe nan
is better, since it's easy to convert nan
to 0 outside of torch-metrics. Currently, the arbitrary AUROC score of 0 may be confused with the actual score of 0.
from torchmetrics.
@weihua916 I do not necessarily disagree with you on that auroc should return nan
and not 0, however we had overwhelmingly feedback when the metric was introduced in the beginning that this was to be preferred.
from torchmetrics.
Understood. Thanks for your consideration!
from torchmetrics.
Related Issues (20)
- MetricTracker use higher_is_better as default for maximize HOT 2
- Unpredictable class order when `panoptic_quality(..., return_per_class=True)`
- torchmetrics Accuracy HOT 8
- BootStrapper.reset() does not reset properly
- segmentation.MeanIoU is wrong HOT 3
- DataLoader worker is killed in Docker HOT 4
- MeanAveragePrecision - bug in `max_detection_thresholds` HOT 3
- Documentation of ERGAS HOT 1
- Support for DLM (AIM) metric HOT 1
- Error for index tensor verification in GeneralizedDice if target is zeros HOT 1
- Incorrect caching (`m._compute`) of metrics inside a `MetricCollection` if `compute_groups` are used and `.compute` is called twice HOT 1
- Classification Report, maybe with the option to select even more metrics HOT 1
- `MeanAveragePrecision.tm_to_coco` example fails with `IndexError: list index out of range` HOT 1
- The compute_groups may lead to unexpected behavior HOT 1
- GPU ram memory increase until overflow when using PSNR and SSIM HOT 1
- Need higher level RAG metrics HOT 2
- Multi output functionality for MeanAbsoluteError HOT 1
- _cumsum moves the data to default GPU when deterministic flag is on HOT 1
- Retrieval metrics are misleading - here's how it should be done instead HOT 5
- Multiple threshold for Multilabel metrics
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from torchmetrics.