MCPcopy Create free account
hub / github.com/PerpetualSoftware/pad / auc

Function auc

scripts/decision-eval/eval2.py:49–52  ·  view source on GitHub ↗
(pos, neg)

Source from the content-addressed store, hash-verified

47
48
49def auc(pos, neg):
50 # probability a random positive scores above a random negative
51 wins = sum((p > n) + 0.5 * (p == n) for p in pos for n in neg)
52 return wins / (len(pos) * len(neg))
53
54
55def report(name, rows, thresholds=(0.5, 0.7, 0.9)):

Callers 1

reportFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected