Skip to content

Add 3d Visualizations of optimization problems #577

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
janosg opened this issue Apr 3, 2025 · 4 comments
Open

Add 3d Visualizations of optimization problems #577

janosg opened this issue Apr 3, 2025 · 4 comments
Labels

Comments

@janosg
Copy link
Member

janosg commented Apr 3, 2025

Current situation

We have om.slice_plot to visualize objective functions. You can see them in action here

Desired Situation

  • For two-dimensional problems it would be nice to do a 3d visualization of objective function. This could either be a 3d plot or a heatmap plot. Examples for both can be found here
  • For higher dimensional functions we could do a grid of such plots to show how the function varies when changing two parameters at a time. This would follow the idea of a seaborn.pairplot.

Proposed implementation

  • Doing the function evaluations to create the data for the plots needs to be seeparated from the actual plotting code
  • The function evaluations should be done in parallel using our batch evaluators. You can check the slice plot implementation to see how that is done
  • The interface should be similar to slice plot
@shammeer-s
Copy link

Hi @janosg

I've been working on this PR (As my first PR for GSoC Application) — made a few custom tweaks to a copy of the current slice plot function. Just wanted to check — are we aiming for something like the 3D plot I’ve attached here for the sphere function? Also added a heatmap version. Just making sure I’m heading in the right direction. Let me know what you think!

@janosg
Copy link
Member Author

janosg commented Apr 6, 2025

Hi @shammeer-s, yes you are on the right track with both plots.

There needs to be an option for the user to decide which plot type they want ("3d" or "contours") or if they want both.

For higher dimensional functions the plots need to be arranged in a grid (similar to seaborns pairplot).

@shammeer-s
Copy link

Thanks for the confirmation @janosg
I'm putting an extra param called "projection" for choosing the type of plot projection("3d" or "contour"). I'll create the PR soon.

@shammeer-s
Copy link

PR: #581

Hi @janosg
The above mentioned PR completes the enhancement and adds support for contour and 3D surface plots, along with pairwise grid visualizations, and integrates them into the existing slice_plot interface using a clean and modular design.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants