def main(): tm_results = parse_file('with_topic_model.log') ntm_results = parse_file('without_topic_model.log') p = Plot(title="Precision/Recall for Labeled Mentions") p.xmin = 0 p.xmax = 1 p.ymin = 0 p.ymax = 1 p.append(Points(tm_results[0].prec_rec, style='lines', title='With topic model')) p.append(Points(ntm_results[4].prec_rec, style='lines', title='Without topic model')) p.append(Points(tm_results[14].prec_rec, style='lines', title='With topic model after sampling')) p.append(Points(ntm_results[14].prec_rec, style='lines', title='Without topic model after sampling')) p.append(Points([(tm_results[0].baseline_rec, tm_results[0].baseline_prec)], title='Baseline performance')) p.write('prec_rec.gpi') p.show()