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

Function eval_sel

single_eval.py:111–128  ·  view source on GitHub ↗
(pred, label)

Source from the content-addressed store, hash-verified

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

Callers 1

eval_partial_matchMethod · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected