MCPcopy Create free account
hub / github.com/FlyingFeather/DEA-SQL / acc

Function acc

evaluation/test-suite-sql-eval/evaluate_classical.py:32–39  ·  view source on GitHub ↗
(l, idxes=None)

Source from the content-addressed store, hash-verified

30
31
32def acc(l, idxes=None):
33 if idxes is None:
34 idxes = [_ for _ in range(len(l))]
35 c = 0
36 for idx in idxes:
37 if l[idx]:
38 c += 1
39 return float(c) / len(idxes)
40
41
42# the input is a tuple of gold_dict, model prediction and whether to use cache

Callers 1

mainFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected