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

Remove lmfit #66

Merged
merged 11 commits into from
Jun 21, 2022
Merged

Remove lmfit #66

merged 11 commits into from
Jun 21, 2022

Conversation

mstimberg
Copy link
Member

Remove the use of lmfit and replace it by a direct call of scipy.optimize.least_squares. Even though lmfit used the same function internally, there is a difference that might affect results or speed of convergence: lmfit used a non-linear transformation of the variables to map [-∞, ∞] to the given range and then called least_squares without any bounds. The current approach instead uses the bounds feature of the least_squares algorithm itself. The internal algorithm is by default "Trust Region Reflective algorithm" instead of "Levenberg-Marquardt".

Needs some additional work to support other methods and other loss functions (e.g. with some robustness against outliers).

The callback is now directly included in our cost function, since least_squares does not support callbacks
@mstimberg mstimberg marked this pull request as draft October 21, 2021 14:41
Use binary wheels to install dependencies
@mstimberg mstimberg marked this pull request as ready for review June 21, 2022 12:40
@mstimberg
Copy link
Member Author

Other methods and loss functions can wait, will merge now.

@mstimberg mstimberg merged commit c7b3b22 into master Jun 21, 2022
@mstimberg mstimberg deleted the remove_lmfit branch June 21, 2022 12:41
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.

None yet

1 participant