Make sure refinement results can be plotted - #1717
Open
MBartkowiakSTFC wants to merge 2 commits into
Open
MBartkowiakSTFC wants to merge 2 commits into
MBartkowiakSTFC wants to merge 2 commits into
Conversation
Collaborator
Author
|
@ChiCheng45 @oerc0122 What kind of visual output do you think would be useful at the end of an optimisation run? I was considering adding a plot of FoM over time to give a basic idea of how the refinement was converging. |
Collaborator
Collaborator
Author
|
OK, I added a logscale plot of the FoM values as a function of refinement step. Also, the cornerplot inputs and the parameter plot inputs now both use the same subset of all the points, which currently means that they get sorted by the FoM and points with the highest FoM are not included in the plot. The default setting is to keep half of the points. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



Description of work

Simplifies the plotting mechanism for the parameter output. The plotter takes all the points sampled by CMAES and makes a corner plot showing the parameter correlation:
There is also a scatter plot of parameters sorted by FoM:

It would probably make sense to output the correlation information directly from the optimiser. Also, discarding a fraction of the initial values before creating the corner plot could also help illustrate what correlations have been found.
Fixes
PlotResults,examples/sto-dos.py.To test
Run
examples/sto-dos.py. It should save plots to a file. (You can adjust the parameters to make the run faster/shorter.)Add
control.plot_results()to the "Argon-a-to-z" Jupyter notebook and check if the plot is created at the end.