I am using scipy.optimize.minimize
for my optimization problem. Specifically, I tried solvers "L-BFGS-B" and "TNC", but both give me "Linear search failed"-like messages on my problem. What is the reason of the failure of the line search on these solvers? Does it mean that the final "optimal" value is potentially not optimal?
Asked
Active
Viewed 3,888 times
0

Ziyuan
- 4,215
- 6
- 48
- 77
-
4Dunno about TNC, but for L-BFGS-B, "line search failed" means that the algorithm was unable to find a low point along a ray originating at the current point. One possible cause is that your objective function cannot be evaluated along the ray (i.e., returning infinity or not-a-number or something). My advice is to put in some debugging printouts in your objective function to see where it is being evaluated and what return value it is computing. – Robert Dodier Jan 09 '15 at 17:03
-
Is your `fprime` analytic or finite-difference ? what are `factr` and `pgtol` ? (Some common-sense suggestions for debugging and visualizing any optimizer on your function are under [how-to-find-global-minimum-in-python-optimization-with-bounds](http://stackoverflow.com/questions/21670080/how-to-find-global-minimum-in-python-optimization-with-bounds) -- advt.) – denis Jan 10 '15 at 15:55
-
And yes, the message usually means the returned value is not optimal. You can check whether the `success` flag is True or not. – pv. Jan 15 '15 at 10:44