Skip to content

Commit

Permalink
Merge branch 'hsic' of github.com:kzkadc/ignite into hsic
Browse files Browse the repository at this point in the history
  • Loading branch information
kzkadc committed Sep 12, 2024
2 parents 28d3b4b + 78d6c2a commit 3d3aec8
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
9 changes: 7 additions & 2 deletions ignite/metrics/regression/kendall_correlation.py
Original file line number Diff line number Diff line change
Expand Up @@ -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 <https://en.wikipedia.org/wiki/Kendall_rank_correlation_coefficient#Accounting_for_ties>`_.
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
Expand All @@ -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.
Expand All @@ -79,6 +82,8 @@ class KendallRankCorrelation(EpochMetric):
.. testoutput::
0.4666666666666666
.. versionadded:: 0.5.2
"""

def __init__(
Expand Down
5 changes: 5 additions & 0 deletions ignite/metrics/regression/spearman_correlation.py
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand All @@ -70,6 +73,8 @@ class SpearmanRankCorrelation(EpochMetric):
.. testoutput::
0.7142857142857143
.. versionadded:: 0.5.2
"""

def __init__(
Expand Down

0 comments on commit 3d3aec8

Please sign in to comment.