def plot_results(summary_filenames, keys, **kwargs): """ Read the summary bootstrap files and create a plot using plot_performance. Params: summary_filenames: list of str The names of the summary bootstrap files, with the data from all experiments. keys: list of str The keys to extract from the summary bootstrap **kwargs is passed to plot_performance """ means = [] low_cis = [] high_cis = [] for fn in summary_filenames: bs = Bootstrapper(write_raw_data=True) bs.read_bootstrap_file(fn) mean = [] low_ci = [] high_ci = [] for key in keys: stats = bs.get_stats(key) mean.append(stats[1] * 100) low_ci.append(stats[2][0] * 100) high_ci.append(stats[2][1] * 100) means.append(mean) low_cis.append(low_ci) high_cis.append(high_ci) print means, low_cis, high_cis plot.plot_performance(means, low_cis, high_cis, **kwargs)
def consolidate_bootstraps(input_filenames, summary_filename): bs = Bootstrapper(write_raw_data=True) for fn in input_filenames: bs.read_bootstrap_file(fn) bs.print_summary(summary_filename)