[SciPy-user] Minimize a bounded convex function
Fri Oct 19 11:09:34 CDT 2007
On 10/18/07, Anne Archibald <firstname.lastname@example.org> wrote:
> On 18/10/2007, Geoffrey Zhu <email@example.com> wrote:
> > I am trying to minimize a convex function f(x) that is not defined
> > when x<=0 or when x>=1.5. I am trying to use scipy.optimize.golden(),
> > but when the minimal point is very close to zero, golden() will call
> > my target function on the undefined region. Is there any way to ensure
> > that the optimizer will only look for answers within the domain?
> There's one open interval that many optimizers can handle, namely the
> real line. You can try transforming your x coordinate so that (for
> example) x = (tanh(w)+1)*0.75 and then minimizing as a function of w.
> This probably doesn't preserve convexity (though it should not
> introduce any local minima), but it means that you can use unbounded
> minimization and avoid the endpoints.
> SciPy-user mailing list
Thanks a lot, Anne. This should work. Fortunately golden() does not
More information about the SciPy-user