Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New metric: LogAUC #2377

Open
wants to merge 44 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
44 commits
Select commit Hold shift + click to select a range
14b5a29
warnings
SkafteNicki Feb 12, 2024
9a19098
deprecation warning
SkafteNicki Feb 12, 2024
5008a85
Merge branch 'master' of https://github.com/Lightning-AI/torchmetrics
SkafteNicki Feb 13, 2024
d08db69
docs
SkafteNicki Feb 13, 2024
a5f6839
testing requirements
SkafteNicki Feb 13, 2024
6e78acf
base implementations
SkafteNicki Feb 13, 2024
95412aa
init files
SkafteNicki Feb 13, 2024
199a1cd
start of testing
SkafteNicki Feb 13, 2024
82719f3
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Feb 13, 2024
2b9217f
Merge branch 'master' into newmetric/logauc
SkafteNicki Feb 13, 2024
0efa0dd
something is working
SkafteNicki Feb 14, 2024
bcf58b2
working class impl
SkafteNicki Feb 14, 2024
a485a7d
more working
SkafteNicki Feb 14, 2024
cfe5abe
merge
SkafteNicki Feb 14, 2024
f60f292
Merge branch 'master' into newmetric/logauc
SkafteNicki Feb 14, 2024
be94785
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Feb 14, 2024
4091322
changelog
SkafteNicki Feb 14, 2024
804f4c7
Merge branch 'master' into newmetric/logauc
Borda Jul 22, 2024
10c6609
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Jul 22, 2024
9ae3ee3
lint
Borda Jul 22, 2024
5602871
Merge branch 'master' into newmetric/logauc
SkafteNicki Oct 25, 2024
2b3b91b
fix docs
SkafteNicki Oct 25, 2024
79eff34
docs
SkafteNicki Oct 27, 2024
658fcef
a bit of refactoring
SkafteNicki Oct 27, 2024
05aa88f
refactoring + some docs
SkafteNicki Oct 27, 2024
12d6444
some working tests
SkafteNicki Oct 27, 2024
d82f6b5
fully working binary implementation
SkafteNicki Oct 28, 2024
665b191
plot testing
SkafteNicki Oct 28, 2024
ca333c5
working functional implementations
SkafteNicki Oct 28, 2024
3123b27
working modular implementations
SkafteNicki Oct 28, 2024
ad054d1
plotting methods
SkafteNicki Oct 28, 2024
5326729
doctests
SkafteNicki Oct 28, 2024
d36b453
typing and doctests
SkafteNicki Oct 28, 2024
789e982
lower test requirements
SkafteNicki Oct 28, 2024
6364bc4
doctests
SkafteNicki Oct 28, 2024
df0ac2a
fix src
SkafteNicki Oct 28, 2024
2df6a34
fix tests
SkafteNicki Oct 29, 2024
65e670b
Merge branch 'master' into newmetric/logauc
SkafteNicki Oct 29, 2024
bddefd2
Merge branch 'master' into newmetric/logauc
Borda Oct 29, 2024
e46ca61
Merge branch 'master' into newmetric/logauc
Borda Oct 30, 2024
6af149b
set requirements
SkafteNicki Oct 31, 2024
2bf58e4
lower atol
SkafteNicki Oct 31, 2024
a68bab5
fix
SkafteNicki Oct 31, 2024
d0a3483
Merge branch 'master' into newmetric/logauc
SkafteNicki Oct 31, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Added `NormalizedRootMeanSquaredError` metric to regression subpackage ([#2442](https://github.com/Lightning-AI/torchmetrics/pull/2442))


- Added `LogAUC` metric to classification package ([#2377](https://github.com/Lightning-AI/torchmetrics/pull/2377))


- Added `NegativePredictiveValue` to classification metrics ([#2433](https://github.com/Lightning-AI/torchmetrics/pull/2433))


Expand Down
55 changes: 55 additions & 0 deletions docs/source/classification/logauc.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
.. customcarditem::
:header: Log Area Receiver Operating Characteristic (LogAUC)
:image: https://pl-flash-data.s3.amazonaws.com/assets/thumbnails/tabular_classification.svg
:tags: Classification

.. include:: ../links.rst

#######
Log AUC
#######

Module Interface
________________

.. autoclass:: torchmetrics.LogAUC
:exclude-members: update, compute
:special-members: __new__

BinaryLogAUC
^^^^^^^^^^^^

.. autoclass:: torchmetrics.classification.BinaryLogAUC
:exclude-members: update, compute

MulticlassLogAUC
^^^^^^^^^^^^^^^^

.. autoclass:: torchmetrics.classification.MulticlassLogAUC
:exclude-members: update, compute

MultilabelLogAUC
^^^^^^^^^^^^^^^^

.. autoclass:: torchmetrics.classification.MultilabelLogAUC
:exclude-members: update, compute

Functional Interface
____________________

.. autofunction:: torchmetrics.functional.logauc

binary_logauc
^^^^^^^^^^^^^

.. autofunction:: torchmetrics.functional.classification.binary_logauc

multiclass_logauc
^^^^^^^^^^^^^^^^^

.. autofunction:: torchmetrics.functional.classification.multiclass_logauc

multilabel_logauc
^^^^^^^^^^^^^^^^^

.. autofunction:: torchmetrics.functional.classification.multilabel_logauc
1 change: 1 addition & 0 deletions docs/source/links.rst
Original file line number Diff line number Diff line change
Expand Up @@ -177,4 +177,5 @@
.. _Hausdorff Distance: https://en.wikipedia.org/wiki/Hausdorff_distance
.. _averaging curve objects: https://scikit-learn.org/stable/auto_examples/model_selection/plot_roc.html
.. _Procrustes Disparity: https://en.wikipedia.org/wiki/Procrustes_analysis
.. _Log AUC: https://pubmed.ncbi.nlm.nih.gov/20735049/
.. _Negative Predictive Value: https://en.wikipedia.org/wiki/Positive_and_negative_predictive_values
1 change: 1 addition & 0 deletions requirements/classification_test.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,4 @@ pandas >1.4.0, <=2.2.3
netcal >1.0.0, <1.4.0 # calibration_error
numpy <2.2.0
fairlearn # group_fairness
PyTDC ==0.4.1 # locauc
2 changes: 2 additions & 0 deletions src/torchmetrics/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@
HammingDistance,
HingeLoss,
JaccardIndex,
LogAUC,
MatthewsCorrCoef,
NegativePredictiveValue,
Precision,
Expand Down Expand Up @@ -189,6 +190,7 @@
"JaccardIndex",
"KLDivergence",
"KendallRankCorrCoef",
"LogAUC",
"LogCoshError",
"MatchErrorRate",
"MatthewsCorrCoef",
Expand Down
5 changes: 5 additions & 0 deletions src/torchmetrics/classification/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@
MulticlassJaccardIndex,
MultilabelJaccardIndex,
)
from torchmetrics.classification.logauc import BinaryLogAUC, LogAUC, MulticlassLogAUC, MultilabelLogAUC
from torchmetrics.classification.matthews_corrcoef import (
BinaryMatthewsCorrCoef,
MatthewsCorrCoef,
Expand Down Expand Up @@ -223,6 +224,10 @@
"MulticlassSensitivityAtSpecificity",
"MultilabelSensitivityAtSpecificity",
"SensitivityAtSpecificity",
"BinaryLogAUC",
"LogAUC",
"MulticlassLogAUC",
"MultilabelLogAUC",
"BinaryNegativePredictiveValue",
"MulticlassNegativePredictiveValue",
"MultilabelNegativePredictiveValue",
Expand Down
Loading
Loading