Skip to content
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

Linear optimization improvements #261

Merged
merged 4 commits into from
Mar 29, 2022

Conversation

tpitkanen
Copy link
Member

@tpitkanen tpitkanen commented Mar 29, 2022

Issue: #193

  • improved optimization accuracy: numpy.polyfit is far better than scipy.interpolate.interp1d
  • improved optimization stability: doesn't need monotonous sampled values anymore
  • prominences are used for statistical weights instead of as cut-off values
  • added user-selectable fitting polynomial degree

Done (from task list):

  • _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)
  • selectable number of iterations

Future TODO:

  • multi-thread initial espe runs (ElementSimulation.calculate_espe() uses multiple recoils for some reason, including self.optimization_recoils[0]. Check if a single recoil can be safely used instead.)
  • remember which combination of NSGA-II/Linear and recoil/fluence is selected (not as simple as saving the other settings because the settings are saved using PropertySavingWidget, which doesn't work well on individual variables). As a quick fix, linear optimization could be the new default selection.
  • add an option to get the starting solution from user
  • unit tests
  • add support for fluence optimization (currently only recoil optimization is supported)
  • customizable shape (number of peaks, rectangular or not, peak at surface or deeper)

- interpolation is more accurate
- sampled MeVs are allowed to be non-monotonous now
- improved error messages
- fitting accuracy is worse if the solution went negative previously
- add FIXME for verbose=True "Depth distribution thinks" spam
- simplifies code and seems to work better
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant