-
-
Notifications
You must be signed in to change notification settings - Fork 44
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
NonlinearLeastSquaresProblem returns stalled #459
Comments
We can take the return code from the termination condition and convert it to success in this case |
I have no idea if that would be a lot of hassle, but I quite like @oscardssmith's suggestion to introduce |
Bump just to say that I spent a good chunk of time today trying to understand why a least-squares problem was "stalled", when I think it has simply found the minimum I am looking for. I don't mind seeing the retcode "stalled", but what is a problem for my case was that since "stalled" is considered a failure it doesn't return the best value it found, instead giving back the starting u0. (Which seems to be in contrast to the documented behavior of the default termination conditions). The same may also be true of a MaxIters return code in some cases, where (following the trace) it clearly finds a local minimum and I would like to simply have that local minimum out, instead it just gives back the original guess. |
Since my work involves models with noticeable, expected mismatch between model and data, right now this issue prevents me from making use of these algorithms the way I would like to, so instead I have to turn to an optimization solver (which is what I was using beforehand anyway, until I got excited about this). I would submit a PR, except that I couldn't figure out how to fix this: it looks like at present the termination conditions don't know about the problem type, so there is no way to check whether it's a NonlinearLeastSquaresProblem. Perhaps for least squares problems there should be a separate set of termination conditions, anyway, since a least squares problem may often have a persistent offset from 0 in f(u). |
Describe the bug 🐞
If it does not find a solution, a
NonlinearLeastSquars
problem returnsStalled
, thus unsuccessful.Expected behavior
Return successful retcode. On slack Oscar suggested to maybe create a new
stalled_success
retcode for that case.Minimal Reproducible Example 👇
Environment (please complete the following information):
using Pkg; Pkg.status()
using Pkg; Pkg.status(; mode = PKGMODE_MANIFEST)
The text was updated successfully, but these errors were encountered: