Skip to content

fix: interpolation for a@xb metrics#112

Open
y-prudent wants to merge 2 commits intofeat/torchvision_lazy_importfrom
fix/metrics
Open

fix: interpolation for a@xb metrics#112
y-prudent wants to merge 2 commits intofeat/torchvision_lazy_importfrom
fix/metrics

Conversation

@y-prudent
Copy link
Copy Markdown
Member

@y-prudent y-prudent commented Jul 28, 2025

Problem

The <aaa><XX><bbb> metrics (e.g., fpr95tpr) used discrete lookup, returning the value at the nearest sampled threshold rather than the exact requested threshold.

Solution

Replace discrete index-based lookup with scipy.interpolate.interp1d for accurate continuous estimation at the exact threshold value.

Changes

  • metrics.py: Use interpolation instead of loop-based lookup
  • Updated test expected values to match interpolated results

Note: I rebased on #121 to address the Black formatting issue.

Comment thread oodeel/eval/metrics.py
@y-prudent y-prudent changed the base branch from master to feat/torchvision_lazy_import February 17, 2026 15:04
@github-actions
Copy link
Copy Markdown

github-actions bot commented Feb 17, 2026

☂️ Python Coverage

current status: ✅

Overall Coverage

Lines Covered Coverage Threshold Status
3197 2909 91% 70% 🟢

New Files

No new covered files...

Modified Files

File Coverage Status
oodeel/datasets/tf_data_handler.py 87% 🟢
oodeel/datasets/torch_data_handler.py 89% 🟢
oodeel/eval/metrics.py 99% 🟢
oodeel/types/init.py 74% 🟢
TOTAL 87% 🟢

updated for commit: 950b666 by action🐍

@y-prudent y-prudent requested a review from cofri February 17, 2026 15:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants