-
I was using Model.fit with an install of lmfit from April 2022. It worked great for my equation which varies 5 parameters. With the current version of lmfit, it does not fit well at all and is extremely sensitive to initial guesses. I have another code file for a different application where I use the minimize function instead, and it behaves the same as before. Interestingly, I converted the Model.fit code to use minimize (trying to fix the problem) and it gives me the same exact results as Model.fit does. So I'm guessing Model.fit used to minimize in a different way than the minimize function, but now it minimizes in the same way. Could someone please shed some light on what was changed in Model.fit that could be causing this? |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 3 replies
-
Please provide the lmfit version that "worked" for you before and I'm assuming you're now using the latest release? I assume you did read through the release notes to see what has changed between these versions to see whether that could explain the differences you're seeing? Also, please provide the code you're using that would help pinpointing any potential cause. |
Beta Was this translation helpful? Give feedback.
-
@acouturi7 if you're comparing 1.2.2 to 1.0.3, you may need to look further back in the Changelog. A couple of possibilities come to mind: The code you provided is not complete enough to know the type of data you are working with. For us to give anything beyond broad general statements you will have to fix these things. |
Beta Was this translation helpful? Give feedback.
There are Changelogs for most versions in the Releases section of GitHub.
Weird. Why would that not surprise you? It seems like you are saying that you know the fit is unstable. If you know that your fits are so unstable that they are sensitive to the initial steps taken to calculate the derivative, then you sort of know that the fits are not reliable.