()
| 134 | |
| 135 | |
| 136 | def evalute_dict(): |
| 137 | groundtruth_path = '../groundtruth/santosUnionBenchmark.pickle' |
| 138 | result_path = '../stats/santos_benchmark_result_by_santos_full.pickle' |
| 139 | with open(result_path, 'rb') as f: |
| 140 | result_dict = pickle.load(f) |
| 141 | |
| 142 | with open(groundtruth_path, 'rb') as f: |
| 143 | gt_dict = pickle.load(f) |
| 144 | |
| 145 | precisions = [] |
| 146 | recalls = [] |
| 147 | for table in result_dict.keys(): |
| 148 | precision, recall = calculate_metrics_dict(table, result_dict[table], gt_dict[table])#计算这一个表的精度召回 |
| 149 | precisions.append(precision) |
| 150 | recalls.append(recall) |
| 151 | |
| 152 | precision = np.mean(precisions) |
| 153 | recall = np.mean(recalls) |
| 154 | |
| 155 | print("Precision:", precision) |
| 156 | print("Recall:", recall) |
| 157 | |
| 158 | |
| 159 | if __name__ == '__main__': |
nothing calls this directly
no test coverage detected