Skip to content

Commit

Permalink
🐛 Fix FPRx
Browse files Browse the repository at this point in the history
  • Loading branch information
o-laurent committed Aug 23, 2024
1 parent 681350b commit 6a6c2e4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions torch_uncertainty/metrics/classification/fpr95.py
Original file line number Diff line number Diff line change
Expand Up @@ -104,10 +104,10 @@ def compute(self) -> Tensor:
false_pos = torch.cat(
[
false_pos[: last_ind + 1].flip(0),
torch.tensor([0.0], dtype=self.dtype, device=self.device),
torch.tensor([0.0], device=self.device),
]
)
cutoff = torch.argmin(torch.abs(recall - 0.6))
cutoff = torch.argmin(torch.abs(recall - self.recall_level))
return false_pos[cutoff] / (~labels).sum()


Expand Down

0 comments on commit 6a6c2e4

Please sign in to comment.