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

Function eval_group

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

Source from the content-addressed store, hash-verified

149
150
151def eval_group(pred, label):
152 pred_cols = [unit[1] for unit in pred['groupBy']]
153 label_cols = [unit[1] for unit in label['groupBy']]
154 pred_total = len(pred_cols)
155 label_total = len(label_cols)
156 cnt = 0
157 pred_cols = [pred.split(".")[1] if "." in pred else pred for pred in pred_cols]
158 label_cols = [label.split(".")[1] if "." in label else label for label in label_cols]
159 for col in pred_cols:
160 if col in label_cols:
161 cnt += 1
162 label_cols.remove(col)
163 return label_total, pred_total, cnt
164
165
166def eval_having(pred, label):

Callers 1

eval_partial_matchMethod · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected