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

[Refactor] Classification 5/n #1159

Merged
merged 28 commits into from
Aug 5, 2022
Merged
Show file tree
Hide file tree
Changes from 23 commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
d07f5b2
base structure
SkafteNicki Jul 19, 2022
610d584
partly working accuracy
SkafteNicki Jul 20, 2022
d7316ab
init files
SkafteNicki Jul 20, 2022
b006d26
working accuracy
SkafteNicki Jul 20, 2022
5ffe364
exact match
SkafteNicki Jul 20, 2022
c57d888
mix mistake
SkafteNicki Jul 22, 2022
8fb6cec
exact matching
SkafteNicki Jul 22, 2022
cecec1e
Merge branch 'devel/classification' into refactor/classification_5
SkafteNicki Jul 22, 2022
72c00e3
init files
SkafteNicki Jul 22, 2022
0a88ea2
Merge branch 'devel/classification' into refactor/classification_5
Borda Jul 23, 2022
edd31b1
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Jul 23, 2022
0a820b5
fix doctest
SkafteNicki Jul 24, 2022
3060d38
mypy
SkafteNicki Jul 24, 2022
2a08414
fix docs
SkafteNicki Jul 24, 2022
d691b28
fix integer division
SkafteNicki Jul 24, 2022
c52f091
try fixing test dependency
SkafteNicki Jul 24, 2022
18302c3
fix f-string
SkafteNicki Jul 25, 2022
52dc6cc
fix integer division
SkafteNicki Jul 25, 2022
fdfa34c
fix integer division
SkafteNicki Jul 25, 2022
94d2149
fix?
SkafteNicki Jul 27, 2022
3bd6a48
try again
SkafteNicki Jul 27, 2022
1dd7b4c
Merge branch 'devel/classification' into refactor/classification_5
SkafteNicki Aug 1, 2022
806ad07
fix pep8
SkafteNicki Aug 1, 2022
8d13b71
docs
Borda Aug 2, 2022
7a1698c
working calibration
SkafteNicki Aug 3, 2022
4f10291
try something
SkafteNicki Aug 5, 2022
e3ffd10
Merge branch 'devel/classification' into refactor/classification_5
SkafteNicki Aug 5, 2022
7a3943a
Merge branch 'devel/classification' into refactor/classification_5
SkafteNicki Aug 5, 2022
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
36 changes: 36 additions & 0 deletions docs/source/classification/accuracy.rst
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,44 @@ ________________
.. autoclass:: torchmetrics.Accuracy
:noindex:

BinaryAccuracy
^^^^^^^^^^^^^^

.. autoclass:: torchmetrics.BinaryAccuracy
:noindex:

MulticlassAccuracy
^^^^^^^^^^^^^^^^^^

.. autoclass:: torchmetrics.MulticlassAccuracy
:noindex:

MultilabelAccuracy
^^^^^^^^^^^^^^^^^^

.. autoclass:: torchmetrics.MultilabelAccuracy
:noindex:

Functional Interface
____________________

.. autofunction:: torchmetrics.functional.accuracy
:noindex:

binary_accuracy
^^^^^^^^^^^^^^^

.. autofunction:: torchmetrics.functional.binary_accuracy
:noindex:

multiclass_accuracy
^^^^^^^^^^^^^^^^^^^

.. autofunction:: torchmetrics.functional.multiclass_accuracy
:noindex:

multilabel_accuracy
^^^^^^^^^^^^^^^^^^^

.. autofunction:: torchmetrics.functional.multilabel_accuracy
:noindex:
26 changes: 26 additions & 0 deletions docs/source/classification/exact_match.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
.. customcarditem::
:header: Exact Match
:image: https://pl-flash-data.s3.amazonaws.com/assets/thumbnails/tabular_classification.svg
:tags: Classification

###########
Exact Match
###########

Module Interface
________________

MultilabelExactMatch
^^^^^^^^^^^^^^^^^^^^

.. autoclass:: torchmetrics.MultilabelExactMatch
:noindex:

Functional Interface
____________________

multilabel_exact_match
^^^^^^^^^^^^^^^^^^^^^^

.. autofunction:: torchmetrics.functional.multilabel_exact_match
:noindex:
8 changes: 8 additions & 0 deletions src/torchmetrics/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
ROC,
Accuracy,
AveragePrecision,
BinaryAccuracy,
BinaryCohenKappa,
BinaryConfusionMatrix,
BinaryF1Score,
Expand Down Expand Up @@ -54,6 +55,7 @@
LabelRankingAveragePrecision,
LabelRankingLoss,
MatthewsCorrCoef,
MulticlassAccuracy,
MulticlassCohenKappa,
MulticlassConfusionMatrix,
MulticlassF1Score,
Expand All @@ -65,7 +67,9 @@
MulticlassRecall,
MulticlassSpecificity,
MulticlassStatScores,
MultilabelAccuracy,
MultilabelConfusionMatrix,
MultilabelExactMatch,
MultilabelF1Score,
MultilabelFBetaScore,
MultilabelHammingDistance,
Expand Down Expand Up @@ -143,6 +147,9 @@
__all__ = [
"functional",
"Accuracy",
"BinaryAccuracy",
"MulticlassAccuracy",
"MultilabelAccuracy",
"AUC",
"AUROC",
"AveragePrecision",
Expand Down Expand Up @@ -187,6 +194,7 @@
"BinaryJaccardIndex",
"MulticlassJaccardIndex",
"MultilabelJaccardIndex",
"MultilabelExactMatch",
"KLDivergence",
"LabelRankingAveragePrecision",
"LabelRankingLoss",
Expand Down
8 changes: 7 additions & 1 deletion src/torchmetrics/classification/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,12 @@
StatScores,
)

from torchmetrics.classification.accuracy import Accuracy # noqa: F401
from torchmetrics.classification.accuracy import ( # noqa: F401
Accuracy,
BinaryAccuracy,
MulticlassAccuracy,
MultilabelAccuracy,
)
from torchmetrics.classification.auc import AUC # noqa: F401
from torchmetrics.classification.auroc import AUROC # noqa: F401
from torchmetrics.classification.avg_precision import AveragePrecision # noqa: F401
Expand All @@ -34,6 +39,7 @@
from torchmetrics.classification.calibration_error import CalibrationError # noqa: F401
from torchmetrics.classification.cohen_kappa import BinaryCohenKappa, CohenKappa, MulticlassCohenKappa # noqa: F401
from torchmetrics.classification.dice import Dice # noqa: F401
from torchmetrics.classification.exact_match import MultilabelExactMatch # noqa: F401
from torchmetrics.classification.f_beta import ( # noqa: F401
BinaryF1Score,
BinaryFBetaScore,
Expand Down
Loading