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

Function eval_sel

evaluation/test-suite-sql-eval/evaluation.py:110–127  ·  view source on GitHub ↗
(pred, label)

Source from the content-addressed store, hash-verified

108
109
110def eval_sel(pred, label):
111 pred_sel = pred['select'][1]
112 label_sel = label['select'][1]
113 label_wo_agg = [unit[1] for unit in label_sel]
114 pred_total = len(pred_sel)
115 label_total = len(label_sel)
116 cnt = 0
117 cnt_wo_agg = 0
118
119 for unit in pred_sel:
120 if unit in label_sel:
121 cnt += 1
122 label_sel.remove(unit)
123 if unit[1] in label_wo_agg:
124 cnt_wo_agg += 1
125 label_wo_agg.remove(unit[1])
126
127 return label_total, pred_total, cnt, cnt_wo_agg
128
129
130def eval_where(pred, label):

Callers 1

eval_partial_matchMethod · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected