-
Notifications
You must be signed in to change notification settings - Fork 26
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
Adds Voronoi cost landscape plot #531
Adds Voronoi cost landscape plot #531
Conversation
…iser support for Voronoi
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## develop #531 +/- ##
=========================================
Coverage 99.08% 99.09%
=========================================
Files 52 54 +2
Lines 3605 3752 +147
=========================================
+ Hits 3572 3718 +146
- Misses 33 34 +1 ☔ View full report in Codecov by Sentry. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @BradyPlanden, this is a really nice addition! Please see my suggestions.
Co-authored-by: NicolaCourtier <[email protected]>
Co-authored-by: NicolaCourtier <[email protected]>
…eries # Conflicts: # CHANGELOG.md
Thanks @NicolaCourtier, this should be ready for another review after the tests pass. Any input on the method name? I'm torn between something simple like |
Thanks, I completely agree with updating the default 2d plot to this one for both speed and accuracy. I'd be happy with either |
…o `plot.contour`, `plot.surface` to become default 2d visualisation
This now has a breaking change for the plotting methods as described in the changelog. Essentially, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The new plots look great! Thanks @BradyPlanden!
* feat: initial voronoi plotting methods * fix: Optimiser.log object updates for aligned shape, adds SciPy optimiser support for Voronoi * refactor: update Optim.log for input conversion, cleanup * plots: updates to voronoi format, changelog entry * fix: clean examples, voronoi docstrings * tests: adds coverage for BaseOptimiser * tests: adds no cover to skip conditions * Apply suggestions from code review Co-authored-by: NicolaCourtier <[email protected]> * plots: updates gradient plotting to reduce cost calls. Co-authored-by: NicolaCourtier <[email protected]> * updates local stored cost name * breaking: refactors plotting to `pybop.plot` subdirectory, `plot2d` to `plot.contour`, `plot.surface` to become default 2d visualisation * notebooks: plot2d -> plot.contour, adds plot.surface --------- Co-authored-by: NicolaCourtier <[email protected]>
Description
pybop.plot.surface
)Optimiser.log
for consistent object typespybop.plot_XXX
methods becomepybop.plot.XXX
Plots
Here's the voronoi for a particle swarm parameterisation workflow. The voronoi works well for the heuristic / global optimisation algorithms, as they tend to explore the landscape.
For gradient based optimisers, the landscape is less informative. I believe this is intentionally helpful to the user, as it actually conveys the lack of information we know about the search space.
This PR should probably have a follow up that improves the documentation on how to use this plot, as it's not very common.
Issue reference
Fixes #361
Review
Before you mark your PR as ready for review, please ensure that you've considered the following:
Type of change
Key checklist:
$ pre-commit run
(or$ nox -s pre-commit
) (see CONTRIBUTING.md for how to set this up to run automatically when committing locally, in just two lines of code)$ nox -s tests
$ nox -s doctest
You can run integration tests, unit tests, and doctests together at once, using
$ nox -s quick
.Further checks:
Thank you for contributing to our project! Your efforts help us to deliver great software.