MCPcopy Create free account
hub / github.com/OpenBMB/ToolBench / get_correlation

Function get_correlation

toolbench/tooleval/evaluators_comparison.py:37–44  ·  view source on GitHub ↗
(x,y)

Source from the content-addressed store, hash-verified

35 score += score_unit
36 return score
37def get_correlation(x,y):
38 x= np.asarray(x)
39 y = np.asarray(y)
40 x = x+1
41 y = y+1
42 if np.var(x)==0 or np.var(y)==0:
43 return float(random.choice(get_most_preferred(x))==random.choice(get_most_preferred(y)))
44 return pearsonr(x,y)[0]
45
46def test_on_annotated_data(evaluator_cfg)->List[List[int]]:
47 evaluators = [load_registered_automatic_evaluator(evaluator_cfg) for _ in range(NUM_WORKERS)]

Callers 1

Calls 1

get_most_preferredFunction · 0.70

Tested by

no test coverage detected