Skip to content

Commit

Permalink
Update ignite/contrib/metrics/roc_auc.py
Browse files Browse the repository at this point in the history
  • Loading branch information
sweep-ai[bot] committed Jul 7, 2023
1 parent 9519e9d commit d9f328f
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion ignite/contrib/metrics/roc_auc.py
Original file line number Diff line number Diff line change
Expand Up @@ -134,11 +134,12 @@ def sigmoid_output_transform(output):
print("FPR", [round(i, 3) for i in state.metrics['roc_auc'][0].tolist()])
print("TPR", [round(i, 3) for i in state.metrics['roc_auc'][1].tolist()])
print("Thresholds", [round(i, 3) for i in state.metrics['roc_auc'][2].tolist()])
.. testoutput::
FPR [0.0, 0.333, 0.333, 1.0]
TPR [0.0, 0.0, 1.0, 1.0]
Thresholds [inf, 1.0, 0.711, 0.047]
TPR [0.0, 0.0, 1.0, 1.0]
Thresholds [2.0, 1.0, 0.711, 0.047]
.. versionchanged:: 0.4.11
Expand Down Expand Up @@ -192,3 +193,4 @@ def compute(self) -> Tuple[torch.Tensor, torch.Tensor, torch.Tensor]: # type: i
thresholds = idist.broadcast(thresholds, src=0, safe_mode=True)

return fpr, tpr, thresholds

0 comments on commit d9f328f

Please sign in to comment.