Skip to content

Commit d9be199

Browse files
committed
updated docstring with new methods names
1 parent f86e028 commit d9be199

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

CollaborativeCoding/load_metric.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,9 @@ class MetricWrapper(nn.Module):
2525
-------
2626
__call__(y_true, y_pred)
2727
Computes the specified metrics on the provided true and predicted labels.
28-
__getmetrics__(str_prefix: str = None)
28+
getmetrics(str_prefix: str = None)
2929
Retrieves the computed metrics, optionally prefixed with a string.
30-
reset()
30+
resetmetric()
3131
Resets the state of all metric computations.
3232
Examples
3333
--------
@@ -36,10 +36,10 @@ class MetricWrapper(nn.Module):
3636
>>> y_true = [0, 1, 0, 1]
3737
>>> y_pred = [0, 1, 1, 0]
3838
>>> metrics(y_true, y_pred)
39-
>>> metrics.__getmetrics__()
39+
>>> metrics.getmetrics()
4040
{'entropy': 0.6931471805599453, 'f1': 0.5, 'precision': 0.5}
41-
>>> metrics.reset()
42-
>>> metrics.__getmetrics__()
41+
>>> metrics.resetmetric()
42+
>>> metrics.getmetrics()
4343
{'entropy': [], 'f1': [], 'precision': []}
4444
"""
4545

0 commit comments

Comments
 (0)