Skip to content

Commit

Permalink
Merge #458
Browse files Browse the repository at this point in the history
458: Make mse computations more flexible for new vars r=charleskawczynski a=charleskawczynski

One last fix for #395.

Co-authored-by: Charles Kawczynski <kawczynski.charles@gmail.com>
  • Loading branch information
bors[bot] and charleskawczynski committed Oct 27, 2021
2 parents 27e07e2 + b2c6e20 commit 6b5d1a1
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions integration_tests/utils/compute_mse.jl
Original file line number Diff line number Diff line change
Expand Up @@ -482,9 +482,14 @@ function compute_mse(case_name, best_mse, plot_dir; ds_dict, plot_comparison = t
mse[tc_var] = mse_single_var / data_scale_used^2
end

push!(mse_reductions, (best_mse[tc_var] - mse[tc_var]) / best_mse[tc_var] * 100)
if haskey(best_mse, tc_var)
push!(mse_reductions, (best_mse[tc_var] - mse[tc_var]) / best_mse[tc_var] * 100)
push!(table_best_mse, best_mse[tc_var])
else
push!(mse_reductions, 0)
push!(table_best_mse, Inf)
end
push!(computed_mse, mse[tc_var])
push!(table_best_mse, best_mse[tc_var])
end

save_plots(plot_dir, plots_dict; group_figs, have_tc_main, fig_height, case_name)
Expand Down

0 comments on commit 6b5d1a1

Please sign in to comment.