Skip to content

Commit

Permalink
updated
Browse files Browse the repository at this point in the history
  • Loading branch information
kylajones committed Jan 13, 2024
1 parent efa37d7 commit f3ab4dd
Show file tree
Hide file tree
Showing 2 changed files with 40 additions and 34 deletions.
4 changes: 2 additions & 2 deletions linfa/plot_disc.py
Original file line number Diff line number Diff line change
Expand Up @@ -114,10 +114,10 @@ def plot_disr_histograms(lf_file, lf_dicr_file, lf_discr_noise_file, data_file,
ax.xaxis.set_major_formatter(FormatStrFormatter("%.1f"))
ax.tick_params(axis = 'both', which = 'both', direction = 'in', top = True, right = True, labelsize = 15)
plt.tight_layout()
plt.savefig(out_dir+'hist' + str(step_num) +'.%s' % img_format, format = img_format, bbox_inches = 'tight', dpi = 300)
plt.savefig(out_dir + 'hist_' + str(step_num) +'.%s' % img_format, format = img_format, bbox_inches = 'tight', dpi = 300)
plt.close()

def plot_discr_surface_2d(file_path, lf_file, data_file, num_1d_grid_points, data_limit_factor, step_num, out_dir, nom_coverage = 95.0, img_format = 'png'):
def plot_discr_surface_2d(file_path, lf_file, data_file, num_1d_grid_points, data_limit_factor, step_num, out_dir, img_format = 'png', nom_coverage = 95.0):

# Load training data
exp_name = os.path.basename(file_path) # Name of experiment
Expand Down
70 changes: 38 additions & 32 deletions linfa/tests/test_plot_discr.sh
Original file line number Diff line number Diff line change
@@ -1,36 +1,42 @@
# True process posterior
python3 -m linfa.plot_disc --folder results/ \
--name test_06_lf_w_disc_TP1 \
--iter 25000 \
--mode histograms \
--num_points 10 \
--limfactor 1.0 \
# # True process posterior
# python3 -m linfa.plot_disc --folder results/ \
# --name test_18_lf_w_disc_TP15_prior_rep_meas \
# --iter 50000 \
# --mode histograms \
# --num_points 10 \
# --limfactor 1.0 \

# Discrepancy surface
python3 -m linfa.plot_disc --folder results/ \
--name test_06_lf_w_disc_TP1 \
--iter 25000 \
--mode discr_surface \
--num_points 40 \
--limfactor 1.0 \
# # Discrepancy surface
# python3 -m linfa.plot_disc --folder results/ \
# --name test_18_lf_w_disc_TP15_prior_rep_meas \
# --iter 50000 \
# --mode discr_surface \
# --num_points 40 \
# --limfactor 1.0 \

# Marginal statistics
python3 -m linfa.plot_disc --folder results/ \
--name test_06_lf_w_disc_TP1 \
--iter 25000 \
--mode marginal_stats \
--saveinterval 1000 \
# # Marginal statistics
# python3 -m linfa.plot_disc --folder results/ \
# --name test_18_lf_w_disc_TP15_prior_rep_meas \
# --iter 50000 \
# --mode marginal_stats \
# --saveinterval 1000 \

# Loss vs. iterations plot, calibration parameters posterior
python3 -m linfa.plot_res --folder results/ \
--name test_06_lf_w_disc_TP1 \
--iter 25000 \
# # Marginal posterior
# python3 -m linfa.plot_disc --folder results/ \
# --name test_18_lf_w_disc_TP15_prior_rep_meas \
# --iter 50000 \
# --mode marginal_posterior \

# Marginal statistics for groups to study
# python3 -m linfa.plot_disc_groups --folder results/ \
# --names 'test_15_lf_w_disc_TP1_rep_meas' 'test_16_lf_w_disc_TP15_rep_meas' 'test_17_lf_w_disc_TP1_prior_rep_meas' 'test_18_lf_w_disc_TP15_prior_rep_meas' \
# --iter 25000 \
# --mode marginal_stats_group \
# --saveinterval 1000 \
# --labels 'TP1' 'TP15' 'TP1 + prior' 'TP15 + prior' \
# --grouping 'repeated measurements'
# # Loss vs. iterations plot, calibration parameters posterior
# python3 -m linfa.plot_res --folder results/ \
# --name test_18_lf_w_disc_TP15_prior_rep_meas \
# --iter 50000 \

Marginal statistics for groups to study
python3 -m linfa.plot_disc_groups --folder results/ \
--names 'test_07_lf_w_disc_TP15' 'test_09_lf_w_disc_TP15_prior' 'test_16_lf_w_disc_TP15_rep_meas' 'test_18_lf_w_disc_TP15_prior_rep_meas' \
--iter 50000 \
--mode marginal_stats_group \
--saveinterval 1000 \
--labels 'TP15' 'TP15 + prior' 'TP15 + rep. meas.' 'TP15 + prior + rep. meas.' \
--grouping 'prior'

0 comments on commit f3ab4dd

Please sign in to comment.