sems = [ np.sqrt( np.var([ave_prec[seed][id] for seed in seed_list]) / (len(seed_list) - 1)) for id in ids ] cis = [ 1.96 * np.sqrt( np.var([ave_prec[seed][id] for seed in seed_list]) / (len(seed_list) - 1)) for id in ids ] figure = visual_plt.plot_bar(means, names=names, colors=colors, ylabel="average precision (after all tasks)", title=title, yerr=cis if len(seed_list) > 1 else None, ylim=(0, 1)) figure_list.append(figure) # print results to screen print("\n\n" + "#" * 60 + "\nSUMMARY RESULTS: {}\n".format(title) + "-" * 60) for i, name in enumerate(names): if len(seed_list) > 1: print("{:12s} {:.2f} (+/- {:.2f}), n={}".format( name, 100 * means[i], 100 * sems[i], len(seed_list))) else: print("{:12s} {:.2f}".format(name, 100 * means[i])) print("#" * 60)
sems = [ np.sqrt( np.var([ave_prec[seed][id] for seed in seed_list]) / (len(seed_list) - 1)) for id in ids ] cis = [ 1.96 * np.sqrt( np.var([ave_prec[seed][id] for seed in seed_list]) / (len(seed_list) - 1)) for id in ids ] figure = visual_plt.plot_bar(means, names=names, colors=colors, ylabel="average precision (after all tasks)", title=title, yerr=cis if len(seed_list) > 1 else None, ylim=(0, 1)) figure_list.append(figure) # print results to screen print("\n\n" + "#" * 60 + "\nSUMMARY RESULTS: {}\n".format(title) + "-" * 60) for i, name in enumerate(names): if len(seed_list) > 1: print("{:19s} {:.2f} (+/- {:.2f}), n={}".format( name, 100 * means[i], 100 * sems[i], len(seed_list))) else: print("{:19s} {:.2f}".format(name, 100 * means[i])) if i == 1: