Skip to content

Commit

Permalink
Modify docstring for rank correlation metrics (#3291)
Browse files Browse the repository at this point in the history
* add SpearmanRankCorrelation metric

* add KendallRankCorrelation metric

* add import check of scipy

* fix type hints

* fix formatting error

* minor modification to docstring

* add versionadded directive to docstring

* add description for skip_unrolling argument

* remove check_compute_fn argument

* minor update on docstring

* Revert "remove check_compute_fn argument"

This reverts commit 642b3f6.

* add description for check_compute_fn argument

---------

Co-authored-by: vfdev <[email protected]>
  • Loading branch information
kzkadc and vfdev-5 authored Oct 12, 2024
1 parent 302c707 commit ad02551
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
3 changes: 3 additions & 0 deletions ignite/metrics/regression/kendall_correlation.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,9 @@ class KendallRankCorrelation(EpochMetric):
form expected by the metric. This can be useful if, for example, you have a multi-output model and
you want to compute the metric with respect to one of the outputs.
By default, metrics require the output as ``(y_pred, y)`` or ``{'y_pred': y_pred, 'y': y}``.
check_compute_fn: if True, ``compute_fn`` is run on the first batch of data to ensure there are no
issues. If issues exist, user is warned that there might be an issue with the ``compute_fn``.
Default, True.
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.
Expand Down
3 changes: 3 additions & 0 deletions ignite/metrics/regression/spearman_correlation.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,9 @@ class SpearmanRankCorrelation(EpochMetric):
form expected by the metric. This can be useful if, for example, you have a multi-output model and
you want to compute the metric with respect to one of the outputs.
By default, metrics require the output as ``(y_pred, y)`` or ``{'y_pred': y_pred, 'y': y}``.
check_compute_fn: if True, ``compute_fn`` is run on the first batch of data to ensure there are no
issues. If issues exist, user is warned that there might be an issue with the ``compute_fn``.
Default, True.
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.
Expand Down

0 comments on commit ad02551

Please sign in to comment.