Skip to content

Commit

Permalink
update y axis label to use D_cand as well
Browse files Browse the repository at this point in the history
  • Loading branch information
austinhoag committed Sep 26, 2022
1 parent 986f7ec commit 6781c09
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 2 deletions.
Binary file modified examples/loan_tutorial/loan_cs.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion examples/loan_tutorial/plot_loan_cs.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
cs_file = './logs/candidate_selection_log0.p'
savename = './loan_cs.png'
solution_dict = load_pickle(cs_file)
save=False
save=True
show=not save
fig = plot_gradient_descent(solution_dict,
primary_objective_name='log loss',
Expand Down
2 changes: 1 addition & 1 deletion seldonian/utils/plot_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ def plot_gradient_descent(
g_vals_this_constraint = [x[constraint_index][0] for x in g_vals]
ax_g.plot(np.arange(len(g_vals)),g_vals_this_constraint,linewidth=2)
ax_g.set_xlabel("Iteration")
ax_g.set_ylabel(rf"$\mathrm{{HCUB}}(\hat{{g}}_{{{row_number}}})$",fontsize=fontsize)
ax_g.set_ylabel(rf"$\mathrm{{HCUB}}(\hat{{g}}_{{{row_number}}}(\theta,D_\mathrm{{cand}}))$",fontsize=fontsize)
ax_g.fill_between(np.arange(len(g_vals)),0.0,1e6,color='r',zorder=0,alpha=0.5)
ax_g.set_ylim(min(-0.25,min(g_vals_this_constraint)),max(0.25,max(g_vals_this_constraint)*1.2))
ax_g.axvline(x=best_index,linestyle='--',color='k')
Expand Down

0 comments on commit 6781c09

Please sign in to comment.