-
Notifications
You must be signed in to change notification settings - Fork 7
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
Add linear optimization to Optimize Recoils or Fluence #252
Merged
Conversation
This file contains 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
- the button doesn't affect optimization yet
- move general optimization methods from Nsgaii to BaseOptimizer
- input types have more leeway (e.g. np.ndarray or list)
- temporarily uses constant values for things - returns a duplicated med_sol - doesn't optimize that well, probably because SciPy's minimize decides the step size from initial values, some of which are almost 0
- mean squared error is a better estimator than absolute error sum
- sum is usually a better optimization target
- only Peak8 is implemented
- separate methods for finding peak information - function for splitting Espe - namedtuple for peak information - remove unused enumerate
- valley information is not used yet
- retry until enough peaks are found - remove least prominent peaks - remove most_prominent_i from PeakInfo - add TODOs
- update peak methods - update comments - add TODO for x monotony check
- median solution is now the first round's result
- check error messages are not shown to user yet - add solution checking - update Peak methods - update documentation
- fix prevents wrong order error if the last peak exceeds max width
- remove unused imports - rename _generate_mev_to_nm_function parameters - remove old TODOs - remove unused y argument - remove _get_bounds and bounds argument - add check for solution type (WIP)
- falsy espe is most likely caused by missing simulated data (like in nsgaii) - remove old pass statement - remove old TODO
- period separates error message from "Optimization stopped" at the end
- messages are shown in the optimization state field - add TODO
- a missing peak doesn't break the loop anymore
- rows and columns were out of order - only affects version control, UI remains unchanged
- add member variables - remove arguments from _generate_mev_to_nm_function - update docstrings - remove old TODOs
- fixes KeyError - partially untested (LinearOptimizer doesn't implement fluence optimization yet)
- enable_sim_params was not run until the skip simulation checkbox was pressed - update documentation
- settings can be edited, but they are not persisted after closing the dialog like for nsgaii - fluence is allowed despite being unimplemented - UI files and optimization_linear_parameters.py contain a lot of copy-paste
- previous version locked out the "skip simulation" button that toggles editing
- enable_sim_params is already called in __init__s
- add TODOs
tpitkanen
changed the title
Linear optimization
Add linear optimization to Optimize Recoils or Fluence
Feb 17, 2022
tpitkanen
force-pushed
the
linear_optimization
branch
from
March 2, 2022 20:55
498cde8
to
e24c1c4
Compare
This isn't entirely polished yet (missing some edge cases, a bit clunky settings, no tests), but it's usable. |
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.
Issue: #193
TODO:
_generate_mev_to_nm_function()
: handle the case where there are really short peaks at surface or between valid peaks (ignore missing peaks or use the longest streak of non-zeroish peaks)Future TODO:
PropertySavingWidget
, which doesn't work well on individual variables). As a quick fix, linear optimization could be the new default selection.ElementSimulation.calculate_espe()
uses multiple recoils for some reason, includingself.optimization_recoils[0]
. Check if a single recoil can be safely used instead.)