Commit c9295ee2 authored by connor.hainje@pnnl.gov's avatar connor.hainje@pnnl.gov
Browse files

Bugfix: use proper likelihood ratio column name

parent 122c43d1
......@@ -39,14 +39,14 @@ def compute_auc(d):
from sklearn.metrics import roc_auc_score
out = np.zeros(len(const.PARTICLES))
for h in range(len(const.PARTICLES)):
true = d["labels"].values == h
for i, h in enumerate(const.PARTICLES):
true = d["labels"].values == i
score = d[f"lr_{h}"].values
if np.count_nonzero(true) == 0:
continue
if np.count_nonzero(~true) == 0:
continue
out[h] = roc_auc_score(true.astype(int), score)
out[i] = roc_auc_score(true.astype(int), score)
return out
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment