diff --git a/monai/metrics/confusion_matrix.py b/monai/metrics/confusion_matrix.py index bb195b0cb8..cdde195d3a 100644 --- a/monai/metrics/confusion_matrix.py +++ b/monai/metrics/confusion_matrix.py @@ -32,6 +32,8 @@ class ConfusionMatrixMetric(CumulativeIterationMetric): segmentations are small compared to the total image size they can get overwhelmed by the signal from the background. + Example of the typical execution steps of this metric class follows :py:class:`monai.metrics.metric.Cumulative`. + Args: include_background: whether to skip metric computation on the first channel of the predicted output. Defaults to True. diff --git a/monai/metrics/generalized_dice.py b/monai/metrics/generalized_dice.py index 0e1f61ac68..f223664bea 100644 --- a/monai/metrics/generalized_dice.py +++ b/monai/metrics/generalized_dice.py @@ -29,6 +29,8 @@ class GeneralizedDiceScore(CumulativeIterationMetric): The inputs `y_pred` and `y` are expected to be one-hot, binarized channel-first or batch-first tensors, i.e., CHW[D] or BCHW[D]. + Example of the typical execution steps of this metric class follows :py:class:`monai.metrics.metric.Cumulative`. + Args: include_background (bool, optional): whether to include the background class (assumed to be in channel 0), in the score computation. Defaults to True. diff --git a/monai/metrics/hausdorff_distance.py b/monai/metrics/hausdorff_distance.py index 1caec2d919..61bea4c87d 100644 --- a/monai/metrics/hausdorff_distance.py +++ b/monai/metrics/hausdorff_distance.py @@ -39,6 +39,8 @@ class HausdorffDistanceMetric(CumulativeIterationMetric): `y_preds` and `y` can be a list of channel-first Tensor (CHW[D]) or a batch-first Tensor (BCHW[D]). The implementation refers to `DeepMind's implementation `_. + Example of the typical execution steps of this metric class follows :py:class:`monai.metrics.metric.Cumulative`. + Args: include_background: whether to include distance computation on the first channel of the predicted output. Defaults to ``False``. diff --git a/monai/metrics/meandice.py b/monai/metrics/meandice.py index c86efa3c52..30ef0845c7 100644 --- a/monai/metrics/meandice.py +++ b/monai/metrics/meandice.py @@ -31,6 +31,8 @@ class DiceMetric(CumulativeIterationMetric): background. `y_preds` and `y` can be a list of channel-first Tensor (CHW[D]) or a batch-first Tensor (BCHW[D]). + Example of the typical execution steps of this metric class follows :py:class:`monai.metrics.metric.Cumulative`. + Args: include_background: whether to skip Dice computation on the first channel of the predicted output. Defaults to ``True``. diff --git a/monai/metrics/meaniou.py b/monai/metrics/meaniou.py index 2206a3dfd6..8b07552a8c 100644 --- a/monai/metrics/meaniou.py +++ b/monai/metrics/meaniou.py @@ -31,6 +31,8 @@ class MeanIoU(CumulativeIterationMetric): background. `y_pred` and `y` can be a list of channel-first Tensor (CHW[D]) or a batch-first Tensor (BCHW[D]). + Example of the typical execution steps of this metric class follows :py:class:`monai.metrics.metric.Cumulative`. + Args: include_background: whether to skip IoU computation on the first channel of the predicted output. Defaults to ``True``. diff --git a/monai/metrics/regression.py b/monai/metrics/regression.py index cc96aea03b..d1cd44e4bb 100644 --- a/monai/metrics/regression.py +++ b/monai/metrics/regression.py @@ -30,6 +30,8 @@ class RegressionMetric(CumulativeIterationMetric): Both `y_pred` and `y` are expected to be real-valued, where `y_pred` is output from a regression model. `y_preds` and `y` can be a list of channel-first Tensor (CHW[D]) or a batch-first Tensor (BCHW[D]). + Example of the typical execution steps of this metric class follows :py:class:`monai.metrics.metric.Cumulative`. + Args: reduction: define mode of reduction to the metrics, will only apply reduction on `not-nan` values, available reduction modes: {``"none"``, ``"mean"``, ``"sum"``, ``"mean_batch"``, ``"sum_batch"``, @@ -90,6 +92,8 @@ class MSEMetric(RegressionMetric): Input `y_pred` is compared with ground truth `y`. Both `y_pred` and `y` are expected to be real-valued, where `y_pred` is output from a regression model. + Example of the typical execution steps of this metric class follows :py:class:`monai.metrics.metric.Cumulative`. + Args: reduction: define the mode to reduce metrics, will only execute reduction on `not-nan` values, available reduction modes: {``"none"``, ``"mean"``, ``"sum"``, ``"mean_batch"``, ``"sum_batch"``, @@ -122,6 +126,8 @@ class MAEMetric(RegressionMetric): Input `y_pred` is compared with ground truth `y`. Both `y_pred` and `y` are expected to be real-valued, where `y_pred` is output from a regression model. + Example of the typical execution steps of this metric class follows :py:class:`monai.metrics.metric.Cumulative`. + Args: reduction: define the mode to reduce metrics, will only execute reduction on `not-nan` values, available reduction modes: {``"none"``, ``"mean"``, ``"sum"``, ``"mean_batch"``, ``"sum_batch"``, @@ -155,6 +161,8 @@ class RMSEMetric(RegressionMetric): Input `y_pred` is compared with ground truth `y`. Both `y_pred` and `y` are expected to be real-valued, where `y_pred` is output from a regression model. + Example of the typical execution steps of this metric class follows :py:class:`monai.metrics.metric.Cumulative`. + Args: reduction: define the mode to reduce metrics, will only execute reduction on `not-nan` values, available reduction modes: {``"none"``, ``"mean"``, ``"sum"``, ``"mean_batch"``, ``"sum_batch"``, @@ -192,6 +200,8 @@ class PSNRMetric(RegressionMetric): Input `y_pred` is compared with ground truth `y`. Both `y_pred` and `y` are expected to be real-valued, where `y_pred` is output from a regression model. + Example of the typical execution steps of this metric class follows :py:class:`monai.metrics.metric.Cumulative`. + Args: max_val: The dynamic range of the images/volumes (i.e., the difference between the maximum and the minimum allowed values e.g. 255 for a uint8 image). diff --git a/monai/metrics/rocauc.py b/monai/metrics/rocauc.py index bd3cdb1203..0b3e488922 100644 --- a/monai/metrics/rocauc.py +++ b/monai/metrics/rocauc.py @@ -27,6 +27,8 @@ class ROCAUCMetric(CumulativeIterationMetric): sklearn.metrics.roc_auc_score.html#sklearn.metrics.roc_auc_score>`_. The input `y_pred` and `y` can be a list of `channel-first` Tensor or a `batch-first` Tensor. + Example of the typical execution steps of this metric class follows :py:class:`monai.metrics.metric.Cumulative`. + Args: average: {``"macro"``, ``"weighted"``, ``"micro"``, ``"none"``} Type of averaging performed if not binary classification. diff --git a/monai/metrics/surface_dice.py b/monai/metrics/surface_dice.py index f964b0472a..8bc34d4afc 100644 --- a/monai/metrics/surface_dice.py +++ b/monai/metrics/surface_dice.py @@ -30,6 +30,8 @@ class SurfaceDiceMetric(CumulativeIterationMetric): The class- and batch sample-wise NSD values can be aggregated with the function `aggregate`. + Example of the typical execution steps of this metric class follows :py:class:`monai.metrics.metric.Cumulative`. + Args: class_thresholds: List of class-specific thresholds. The thresholds relate to the acceptable amount of deviation in the segmentation boundary in pixels. diff --git a/monai/metrics/surface_distance.py b/monai/metrics/surface_distance.py index 4b5cdbc2f7..e463702458 100644 --- a/monai/metrics/surface_distance.py +++ b/monai/metrics/surface_distance.py @@ -36,6 +36,8 @@ class SurfaceDistanceMetric(CumulativeIterationMetric): You can use suitable transforms in ``monai.transforms.post`` first to achieve binarized values. `y_preds` and `y` can be a list of channel-first Tensor (CHW[D]) or a batch-first Tensor (BCHW[D]). + Example of the typical execution steps of this metric class follows :py:class:`monai.metrics.metric.Cumulative`. + Args: include_background: whether to skip distance computation on the first channel of the predicted output. Defaults to ``False``.