add low level 2d profile plot function and 2d profile function#1652
add low level 2d profile plot function and 2d profile function#1652
Conversation
|
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## develop #1652 +/- ##
===========================================
+ Coverage 83.86% 83.90% +0.03%
===========================================
Files 164 164
Lines 14346 14491 +145
===========================================
+ Hits 12031 12158 +127
- Misses 2315 2333 +18 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
- Fix colorbar layout using constrained_layout (no more overlap) - Always extend axes to parameter bounds; remove show_bounds parameter - Auto-generate scale-aware axis labels from problem.x_scales - Accept optional x_labels override to match 1D profiles API - Pairplot-style label cleanup: parameter names on edges only, ratio label kept on off-edge diagonal subplots - Reset MaxNLocator on diagonal subplots to avoid dense tick marks - Add smoke tests for visualize_2d_profile and profile_lowlevel_2d - Add 2D profile cell to getting_started.ipynb
|
Remaining TODO list from @EchoRLiu
This will be taken care of in the another PR dealing with profiling enhancements.
This is weird, I saw it a couple of times. We'll need to check what happens, why does profiling stop prematurely sometimes. It might be the weird conditions in adaptive searches that doesn't have a else, so profiling can fail silently. Needs to be investigated.
Good as initial visualization, can be changed via user.
For another PR as it deals with general profiling. |
- Compute global vmin/vmax across all off-diagonal panels so the colorbar accurately represents all subplots - Add profile_color parameter for diagonal 1D profile line color - Add vmin/vmax parameters to profile_lowlevel_2d for external control
|
Thanks, looks mostly good to me. Two minor things looking at https://pypesto--1652.org.readthedocs.build/en/1652/example/getting_started.html:
|
PaulJonasJost
left a comment
There was a problem hiding this comment.
One thing that is bugging me a bit is that if we have a lot of points in a small intervall, the black borders of the point overshadow the coloring.
Addresses reviewer feedback on #1652 and polishes the 2D profile grid so every subplot is legible on its own. - Self-describing subplots: every panel now carries its own axis label and tick labels instead of relying on grid position. Diagonal panels show "Log-posterior ratio" / "Objective value"; off-diagonals show both parameter labels. - Off-diagonal scatter points are sorted by color so dense clusters reveal actual ratio structure rather than reading as uniformly dark. Marker edges removed for the same reason. - New `_add_bound_lines_1d` / `_add_bound_lines_2d` helpers draw dashed lower/upper bound lines on every panel as a cross-plot anchor. - New `_add_panel_legend` helper adds compact legends on the top-left diagonal and the first 2D off-diagonal, explaining the glyphs. - New `label_fontsize` parameter; labels are rendered bold with a larger default, tick labels follow two points smaller, colorbar label matches. Tightened gridspec so y-labels hug their own axis rather than drifting between columns. - Tests cover the new styling (fontsize, spines hidden, legend presence on the expected panels, dashed bound line count).



This PR is to address #1651.
To do so, I added two new visualization functions:
profile_lowlevel_2d()- Visualizes the relationship between two parameters during profilingvisualize_2d_profile()- High-level n by n profile grid:profile_lowlevel_2d()This would provide a complete overview of how parameters interact during profile likelihood computation