[SciPy-User] optimization routines can not handle infinity values

Pauli Virtanen pav@iki...
Wed Sep 15 05:13:15 CDT 2010

Wed, 15 Sep 2010 11:15:20 +0200, Enrico Avventi wrote:
> thanx for the reply. as far as i know it shouldn't be a problem at all
> in theory. in fact convergence theorems for newton methods and, in
> general, descent method do not require the function to be defined
> everywhere. you need just a function defined in an open convex set that
> has compact sublevel sets - e.g f(x) = x - log(x). this is exactly my
> situation. it is just a matter of slightly changing the line search
> method to reject steps that would lead to an infinite value. i will look
> at how it is implemented in scipy and see if it can be fixed easily.

The line search routines can be easily changed -- they are separate 


If you implement an alternative inf-aware line search, I believe we can 
at least modify the optimization methods to dynamically swap to an inf-
aware approach (and add an option to turn it on manually), if the 
interpolation-based methods detect infinities.

Pauli Virtanen

More information about the SciPy-User mailing list