MCPcopy Create free account
hub / github.com/OpenBitSys/BitDistiller / f1_score

Function f1_score

test/general/lm_eval/metrics.py:39–45  ·  view source on GitHub ↗
(items)

Source from the content-addressed store, hash-verified

37
38
39def f1_score(items):
40 unzipped_list = list(zip(*items))
41 golds = unzipped_list[0]
42 preds = unzipped_list[1]
43 fscore = sklearn.metrics.f1_score(golds, preds)
44
45 return np.max(fscore)
46
47
48def acc_all(items):

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected