-
Notifications
You must be signed in to change notification settings - Fork 15
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
Question about the cause of "negative curvature" warning #1
Comments
Hi Navid, thanks for the information. Unfortunately, I think it is likely that you haven't actually done anything incorrect, and that this implementation is not actually that robust. My motivation for writing this was for a class project, and I really only tested some small problems with a small number of design variables (which can be seen in the .pdf in this repository). Also unfortunately, I don't have real plans to further maintain this project. I'm sorry this answer isn't much help. If you would like to use the L-BFGS-B algorithm with Matlab, I'd encourage you take a look at this wrapper around the original L-BFGS-B implementation, if you haven't already. Cheers, |
In most cases, I got that warning after "M = inv(MM);" often caused "Warning: Matrix is close to singular or badly scaled." In all cases, I was able to get rid of the warning by modifying the code so that a step is taken only if the new x has a lower f-value than the old one. That way I also got much better results. Maybe the same happens to you, depending on your function. Moreover, I had to make the following additions to avoid lbfgsb.m return x values out of the search space (which was likely caused by the almost-singularity of MM):
Just the first line was added. The others (old lines) just show the location in the code.
where strong_wolfe was called. Finally, there was a bug:
should read
as else early "negative curvature" causes |
@user929292 feel free to make a pull request, I will be happy to merge it if the two test files run. |
First of all thank you for sharing your implementation of l-bfgs-b. I have faced an issue I hope you can help me with. During optimization, I constantly get the warning" negative curvature detected, skipping L-BFGS update". Since I am implementing an algorithm named REPS from [1], I'm sure the problem is convex. So could you please tell me what might have I done wrong that causes this warning? My setting for L-BFGS-B is :
[1] Peters, Jan, Katharina Mülling, and Yasemin Altun. "Relative Entropy Policy Search." AAAI. 2010.
Thank you and best regards,
Navid.
The text was updated successfully, but these errors were encountered: