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

Function eval_sel

hardness_eval.py:650–667  ·  view source on GitHub ↗
(pred, label)

Source from the content-addressed store, hash-verified

648
649
650def eval_sel(pred, label):
651 pred_sel = pred['select'][1]
652 label_sel = label['select'][1]
653 label_wo_agg = [unit[1] for unit in label_sel]
654 pred_total = len(pred_sel)
655 label_total = len(label_sel)
656 cnt = 0
657 cnt_wo_agg = 0
658
659 for unit in pred_sel:
660 if unit in label_sel:
661 cnt += 1
662 label_sel.remove(unit)
663 if unit[1] in label_wo_agg:
664 cnt_wo_agg += 1
665 label_wo_agg.remove(unit[1])
666
667 return label_total, pred_total, cnt, cnt_wo_agg
668
669
670def eval_where(pred, label):

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected