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

Implement arbitrary penalties for SNLLS & Pathway amplitudes contstraint #108

Merged
merged 13 commits into from
Mar 24, 2021

Conversation

luisfabib
Copy link
Collaborator

Description

This is a major upgrade to snlls.py and fitmodel.py. It improves snlls.py to be able to handle arbitrary penalties defined by outer functions or scripts. This allows us to implement a penalty in fitmodel.py that constrains the pathway amplitudes and makes the separation of the Lam0 and V0 parameters identifiable, strongly improving the fit accuracy and suppressing most uncertainty in fits of multi-pathway models such as 5-pulse DEER, etc.

Changelog:

snlls.py

  • Implement an option to pass arbitrary penalty function residuals to be included in the SNLLS algorithm.
  • Remove double smoothness penalization in the residual (snnls: double addition of regularization term #103).
  • Return the uncertainty quantification of linear and nonlinear parts as separate objects.
  • Improve uncertainty analysis by including correlations between linear and non-linear parameters.
  • Major code refactoring.
  • Improved behavior of scale determination.

fitmodel.py

Related Issues:

Closes #103
Closes #76

Luis Fabregas added 5 commits March 18, 2021 20:55
@luisfabib luisfabib added enhancement New feature or request design bugfix Patches something that isn't working fundamental An issue with fundamental concepts or problems labels Mar 20, 2021
@luisfabib luisfabib requested a review from stestoll March 20, 2021 20:36
@luisfabib
Copy link
Collaborator Author

The new keyword argument in snlls.py to pass custom penalties is called custom_penalty. We might want to change this, as it was the quick name I chose during development.

Another notation issue might be the difference between the built-in smoothness penalty (needed to ensure the linear problem is correctly computed) and any custom penalty passed by the user. A way to refer to them would be linear-penalty (for the smoothness penalty applied to the linear problem) and non-linear penalty (the user-defined penalty applied to the non-linear problem).

We need to adjust this before merging.

@luisfabib luisfabib added this to the 0.13.0 milestone Mar 22, 2021
deerlab/snlls.py Outdated Show resolved Hide resolved
deerlab/snlls.py Outdated Show resolved Hide resolved
deerlab/snlls.py Show resolved Hide resolved
deerlab/snlls.py Outdated Show resolved Hide resolved
deerlab/snlls.py Outdated Show resolved Hide resolved
deerlab/snlls.py Outdated Show resolved Hide resolved
deerlab/snlls.py Outdated Show resolved Hide resolved
deerlab/snlls.py Show resolved Hide resolved
deerlab/snlls.py Show resolved Hide resolved
deerlab/lsqcomponents.py Outdated Show resolved Hide resolved
@luisfabib luisfabib merged commit fdb09af into main Mar 24, 2021
@luisfabib luisfabib deleted the fix/snlls_penalty branch March 24, 2021 20:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bugfix Patches something that isn't working design enhancement New feature or request fundamental An issue with fundamental concepts or problems
Projects
None yet
2 participants