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

Add functional metric docs [skip ci] #3946

Merged
merged 3 commits into from
Oct 7, 2020
Merged
Changes from all commits
Commits
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
200 changes: 200 additions & 0 deletions docs/source/metrics.rst
Original file line number Diff line number Diff line change
Expand Up @@ -150,3 +150,203 @@ MeanSquaredLogError

.. autoclass:: pytorch_lightning.metrics.regression.MeanSquaredLogError
:noindex:


Functional Metrics
==================

The functional metrics follow the simple paradigm input in, output out. This means, they don't provide any advanced mechanisms for syncing across DDP nodes or aggregation over batches. They simply compute the metric value based on the given inputs.

Also the integration within other parts of PyTorch Lightning will never be as tight as with the class-based interface.
If you look for just computing the values, the functional metrics are the way to go. However, if you are looking for the best integration and user experience, please consider also to use the class interface.

Classification
--------------

accuracy [func]
^^^^^^^^^^^^^^^

.. autofunction:: pytorch_lightning.metrics.functional.classification.accuracy
:noindex:


auc [func]
^^^^^^^^^^

.. autofunction:: pytorch_lightning.metrics.functional.classification.auc
:noindex:


auroc [func]
^^^^^^^^^^^^

.. autofunction:: pytorch_lightning.metrics.functional.classification.auroc
:noindex:


average_precision [func]
^^^^^^^^^^^^^^^^^^^^^^^^

.. autofunction:: pytorch_lightning.metrics.functional.classification.average_precision
:noindex:


confusion_matrix [func]
^^^^^^^^^^^^^^^^^^^^^^^

.. autofunction:: pytorch_lightning.metrics.functional.classification.confusion_matrix
:noindex:


dice_score [func]
^^^^^^^^^^^^^^^^^

.. autofunction:: pytorch_lightning.metrics.functional.classification.dice_score
:noindex:


f1_score [func]
^^^^^^^^^^^^^^^

.. autofunction:: pytorch_lightning.metrics.functional.classification.f1_score
:noindex:


fbeta_score [func]
^^^^^^^^^^^^^^^^^^

.. autofunction:: pytorch_lightning.metrics.functional.classification.fbeta_score
:noindex:


iou [func]
^^^^^^^^^^

.. autofunction:: pytorch_lightning.metrics.functional.classification.iou
:noindex:


multiclass_roc [func]
^^^^^^^^^^^^^^^^^^^^^

.. autofunction:: pytorch_lightning.metrics.functional.classification.multiclass_roc
:noindex:


precision [func]
^^^^^^^^^^^^^^^^

.. autofunction:: pytorch_lightning.metrics.functional.classification.precision
:noindex:


precision_recall [func]
^^^^^^^^^^^^^^^^^^^^^^^

.. autofunction:: pytorch_lightning.metrics.functional.classification.precision_recall
:noindex:


precision_recall_curve [func]
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

.. autofunction:: pytorch_lightning.metrics.functional.classification.precision_recall_curve
:noindex:


recall [func]
^^^^^^^^^^^^^

.. autofunction:: pytorch_lightning.metrics.functional.classification.recall
:noindex:


roc [func]
^^^^^^^^^^

.. autofunction:: pytorch_lightning.metrics.functional.classification.roc
:noindex:


stat_scores [func]
^^^^^^^^^^^^^^^^^^

.. autofunction:: pytorch_lightning.metrics.functional.classification.stat_scores
:noindex:


stat_scores_multiple_classes [func]
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

.. autofunction:: pytorch_lightning.metrics.functional.classification.stat_scores_multiple_classes
:noindex:


to_categorical [func]
^^^^^^^^^^^^^^^^^^^^^

.. autofunction:: pytorch_lightning.metrics.functional.classification.to_categorical
:noindex:


to_onehot [func]
^^^^^^^^^^^^^^^^

.. autofunction:: pytorch_lightning.metrics.functional.classification.to_onehot
:noindex:


Regression
----------

mae [func]
^^^^^^^^^^

.. autofunction:: pytorch_lightning.metrics.functional.regression.mae
:noindex:


mse [func]
^^^^^^^^^^

.. autofunction:: pytorch_lightning.metrics.functional.regression.mse
:noindex:


psnr [func]
^^^^^^^^^^^

.. autofunction:: pytorch_lightning.metrics.functional.regression.psnr
:noindex:


rmse [func]
^^^^^^^^^^^

.. autofunction:: pytorch_lightning.metrics.functional.regression.rmse
:noindex:


rmsle [func]
^^^^^^^^^^^^

.. autofunction:: pytorch_lightning.metrics.functional.regression.rmsle
:noindex:


ssim [func]
^^^^^^^^^^^

.. autofunction:: pytorch_lightning.metrics.functional.regression.mae
:noindex:


NLP
---

bleu_score [func]
^^^^^^^^^^^^^^^^^

.. autofunction:: pytorch_lightning.metrics.functional.nlp.bleu_score
:noindex: