diff --git a/ignite/metrics/regression/kendall_correlation.py b/ignite/metrics/regression/kendall_correlation.py index 826ca350ac2..04090d0d7d9 100644 --- a/ignite/metrics/regression/kendall_correlation.py +++ b/ignite/metrics/regression/kendall_correlation.py @@ -46,10 +46,10 @@ class KendallRankCorrelation(EpochMetric): Parameters are inherited from ``Metric.__init__``. Args: - variant: variant of kendall rank correlation. ``b`` or ``c`` is accepted. + variant: variant of kendall rank correlation. ``'b'`` or ``'c'`` is accepted. Details can be found `here `_. - Default: ``b`` + Default: ``'b'`` output_transform: a callable that is used to transform the :class:`~ignite.engine.engine.Engine`'s ``process_function``'s output into the form expected by the metric. This can be useful if, for example, you have a multi-output model and @@ -58,6 +58,9 @@ class KendallRankCorrelation(EpochMetric): device: specifies which device updates are accumulated on. Setting the metric's device to be the same as your ``update`` arguments ensures the ``update`` method is non-blocking. By default, CPU. + skip_unrolling: specifies whether output should be unrolled before being fed to update method. Should be + true for multi-output model, for example, if ``y_pred`` contains multi-ouput as ``(y_pred_a, y_pred_b)`` + Alternatively, ``output_transform`` can be used to handle this. Examples: To use with ``Engine`` and ``process_function``, simply attach the metric instance to the engine. @@ -79,6 +82,8 @@ class KendallRankCorrelation(EpochMetric): .. testoutput:: 0.4666666666666666 + + .. versionadded:: 0.5.2 """ def __init__( diff --git a/ignite/metrics/regression/spearman_correlation.py b/ignite/metrics/regression/spearman_correlation.py index 7c5d586b152..f5cc3cfff7b 100644 --- a/ignite/metrics/regression/spearman_correlation.py +++ b/ignite/metrics/regression/spearman_correlation.py @@ -49,6 +49,9 @@ class SpearmanRankCorrelation(EpochMetric): device: specifies which device updates are accumulated on. Setting the metric's device to be the same as your ``update`` arguments ensures the ``update`` method is non-blocking. By default, CPU. + skip_unrolling: specifies whether output should be unrolled before being fed to update method. Should be + true for multi-output model, for example, if ``y_pred`` contains multi-ouput as ``(y_pred_a, y_pred_b)`` + Alternatively, ``output_transform`` can be used to handle this. Examples: To use with ``Engine`` and ``process_function``, simply attach the metric instance to the engine. @@ -70,6 +73,8 @@ class SpearmanRankCorrelation(EpochMetric): .. testoutput:: 0.7142857142857143 + + .. versionadded:: 0.5.2 """ def __init__(