# Set accepted limit, lim lims = [1000] # , 5000, 10000] distances = [] for dist_measure in ['NRMSE']: distances.extend(['{}_{}'.format(t, dist_measure) for t in config['targets']]) distances.append(dist_measure) for lim in lims: for d in distances: print("Working on {}".format(d.upper())) figPath = os.path.join(output_dir, "Figures", str(lim), d) dir_util.mkpath(figPath) print("Plotting total histogram") hist1 = histogram_plot(results, distance=d, frac=100) hist1.savefig( os.path.join(figPath, 'full_histogram_{}.png'.format(DATASET)), bbox_inches='tight') print("Plotting fraction histogram") hist2 = histogram_plot(results, distance=d, limit=lim) hist2.savefig( os.path.join( figPath, 'tol_{}_histogram_{}.png'.format(str(lim).replace('.', '_'), DATASET)), bbox_inches='tight') print("Considering {} lowest values".format(lim)) # print("Generating scatter plot") # scatter_dist_plot(results, params, tolerance=tol, n_ticks=4) print("Generating KDE plot") g = kde_plot(results, params, limit=lim, n_ticks=4, d=d, median_file=os.path.join(figPath, "medians.txt"))
distances = [] for dist_measure in ['NRMSE']: # distances.extend(['{}_{}'.format(t, dist_measure) # for t in config['targets']]) distances.append(dist_measure) # for lim in lims: for tol in tols: for d in distances: print("Working on {}".format(d.upper())) figPath = "/home/buck06191/Dropbox/phd/Bayesian_fitting/{}/{}/{}/{}/{}/{}/"\ "Figures/{}".format(model_name, 'PLOS_paper', 'hypoxia', 'experimental', 'wide_range', 'tolerance', d) dir_util.mkpath(figPath) print("Plotting total histogram") hist1 = histogram_plot(results, distance=d, frac=1) hist1.savefig(os.path.join(figPath, 'full_histogram_experimental.png'), bbox_inches='tight') print("Plotting fraction histogram") hist2 = histogram_plot(results, distance=d, tolerance=tol) hist2.savefig(os.path.join( figPath, 'tol_{}_histogram_experimental.png'.format( str(tol).replace('.', '_'))), bbox_inches='tight') print("Considering {} lowest values".format(tol)) # print("Generating scatter plot") # scatter_dist_plot(results, params, tolerance=tol, n_ticks=4) sorted_results = results.sort_values(by=d).head(5000) print("Generating KDE plot") g = kde_plot(sorted_results, params,