Skip to content

Commit

Permalink
📖 Update documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
alafage committed Mar 28, 2024
1 parent a59ff23 commit b13fb0f
Show file tree
Hide file tree
Showing 10 changed files with 27 additions and 10 deletions.
4 changes: 4 additions & 0 deletions docs/source/_static/css/custom.css
Original file line number Diff line number Diff line change
Expand Up @@ -87,3 +87,7 @@
.tutorials-header .header-logo {
background-image: url("../images/torch_uncertainty.png");
}

.figure-caption {
text-align: center;
}
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 0 additions & 1 deletion docs/source/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,6 @@ the following paper:

installation
quickstart
introduction_uncertainty
auto_tutorials/index
cli_guide
api
Expand Down
2 changes: 2 additions & 0 deletions docs/source/introduction_uncertainty.rst
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
:orphan:

Introduction to Classification Uncertainty
==========================================

Expand Down
6 changes: 6 additions & 0 deletions docs/source/quickstart.rst
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,12 @@ Yet, we take account that their will be as many different uses of TorchUncertain
This page provides ideas on how to benefit from TorchUncertainty at all levels: from ready-to-train lightning-based models to using only specific
PyTorch layers.

.. figure:: _static/images/structure_torch_uncertainty.jpg
:alt: TorchUncertainty structure
:figclass: figure-caption

**TorchUncertainty structure**

Training with TorchUncertainty's Uncertainty-aware Routines
-----------------------------------------------------------

Expand Down
3 changes: 2 additions & 1 deletion torch_uncertainty/metrics/regression/log10.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@ def __init__(self, **kwargs) -> None:
- :attr:`target`: :math:`(N)`
Args:
kwargs: Additional keyword arguments, see :ref:`Metric kwargs` for more info.
kwargs: Additional keyword arguments, see `Advanced metric settings
<https://torchmetrics.readthedocs.io/en/stable/pages/overview.html#metric-kwargs>`_.
"""
super().__init__(**kwargs)
self.add_state(
Expand Down
5 changes: 3 additions & 2 deletions torch_uncertainty/metrics/regression/mse_log.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

class MeanSquaredLogError(MeanSquaredError):
def __init__(self, squared: bool = True, **kwargs) -> None:
r"""`Compute MeanSquaredLogError`_ (MSELog).
r"""Compute MeanSquaredLogError (MSELog).
.. math:: \text{MSELog} = \frac{1}{N}\sum_i^N (\log \hat{y_i} - \log y_i)^2
Expand All @@ -22,7 +22,8 @@ def __init__(self, squared: bool = True, **kwargs) -> None:
Args:
squared: If True returns MSELog value, if False returns EMSELog value.
kwargs: Additional keyword arguments, see :ref:`Metric kwargs` for more info.
kwargs: Additional keyword arguments, see `Advanced metric settings
<https://torchmetrics.readthedocs.io/en/stable/pages/overview.html#metric-kwargs>`_.
Reference:
As in e.g. From big to small: Multi-scale local planar guidance for monocular depth estimation
Expand Down
10 changes: 6 additions & 4 deletions torch_uncertainty/metrics/regression/relative_error.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

class MeanGTRelativeAbsoluteError(MeanAbsoluteError):
def __init__(self, **kwargs) -> None:
r"""`Compute Mean Absolute Error relative to the Ground Truth`_ (MAErel or ARE).
r"""Compute Mean Absolute Error relative to the Ground Truth (MAErel or ARE).
.. math:: \text{MAErel} = \frac{1}{N}\sum_i^N \frac{| y_i - \hat{y_i} |}{y_i}
Expand All @@ -22,7 +22,8 @@ def __init__(self, **kwargs) -> None:
relative mean absolute error over the state
Args:
kwargs: Additional keyword arguments, see :ref:`Metric kwargs` for more info.
kwargs: Additional keyword arguments, see `Advanced metric settings
<https://torchmetrics.readthedocs.io/en/stable/pages/overview.html#metric-kwargs>`_.
Reference:
As in e.g. From big to small: Multi-scale local planar guidance for monocular depth estimation
Expand All @@ -38,7 +39,7 @@ class MeanGTRelativeSquaredError(MeanSquaredError):
def __init__(
self, squared: bool = True, num_outputs: int = 1, **kwargs
) -> None:
r"""Compute `mean squared error relative to the Ground Truth`_ (MSErel or SRE).
r"""Compute mean squared error relative to the Ground Truth (MSErel or SRE).
.. math:: \text{MSErel} = \frac{1}{N}\sum_i^N \frac{(y_i - \hat{y_i})^2}{y_i}
Expand All @@ -56,7 +57,8 @@ def __init__(
Args:
squared: If True returns MSErel value, if False returns RMSErel value.
num_outputs: Number of outputs in multioutput setting
kwargs: Additional keyword arguments, see :ref:`Metric kwargs` for more info.
kwargs: Additional keyword arguments, see `Advanced metric settings
<https://torchmetrics.readthedocs.io/en/stable/pages/overview.html#metric-kwargs>`_.
Reference:
As in e.g. From big to small: Multi-scale local planar guidance for monocular depth estimation
Expand Down
3 changes: 2 additions & 1 deletion torch_uncertainty/metrics/regression/silog.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,8 @@ def __init__(self, lmbda: float = 1, **kwargs: Any) -> None:
Args:
lmbda: The regularization parameter on the variance of error (default 1).
kwargs: Additional keyword arguments, see :ref:`Metric kwargs` for more info.
kwargs: Additional keyword arguments, see `Advanced metric settings
<https://torchmetrics.readthedocs.io/en/stable/pages/overview.html#metric-kwargs>`_.
Reference:
Depth Map Prediction from a Single Image using a Multi-Scale Deep Network.
Expand Down
3 changes: 2 additions & 1 deletion torch_uncertainty/metrics/regression/threshold_accuracy.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@ def __init__(self, power: int, lmbda: float = 1.25, **kwargs) -> None:
power: The power to raise the threshold to. Often in [1, 2, 3].
lmbda: The threshold to compare the max of ratio of predictions
to targets and its inverse to. Defaults to 1.25.
kwargs: Additional arguments to pass to the metric class.
kwargs: Additional keyword arguments, see `Advanced metric settings
<https://torchmetrics.readthedocs.io/en/stable/pages/overview.html#metric-kwargs>`_.
"""
super().__init__(**kwargs)
if power < 0:
Expand Down

0 comments on commit b13fb0f

Please sign in to comment.