mirror of
https://github.com/mcahny/object_localization_network.git
synced 2025-06-03 14:51:03 +08:00
add compute_auc
This commit is contained in:
parent
3fddaacfce
commit
df25d96ff2
11
tools/compute_auc.py
Normal file
11
tools/compute_auc.py
Normal file
@ -0,0 +1,11 @@
|
||||
import numpy as np
|
||||
from sklearn import metrics
|
||||
|
||||
# K (number of shots)
|
||||
x = np.array([1., 10., 30., 50., 100., 300., 500., 1000.])
|
||||
x_log = np.log(x) / np.log(1000)
|
||||
# Average Recall scores
|
||||
y = np.array([0.0, 18.0, 26.5, 29.6, 33.4, 39.0, 41.5, 45.0])
|
||||
y *= 0.01
|
||||
auc = metrics.auc(x_log, y)
|
||||
print('AUC score:', auc)
|
Loading…
x
Reference in New Issue
Block a user