[SciPy-user] fmin using spherical bounds

ElMickerino elmickerino@hotmail....
Thu May 21 10:19:15 CDT 2009

Hello Fellow SciPythonistas,

I have a seemingly simple task: minimize a function inside a (hyper)sphere
in parameter space.  Unfortunately, I can't seem to make fmin_cobyla do what
I'd like it to do, and after reading some of the old messages posted to this
forum, it seems that fmin_cobyla will actually wander outside of the allowed
regions of parameter space as long as it smells a minimum there (with some
appropriate hand-waving).

The function I'd like to minimize is only defined in this hypersphere (well,
hyperellipsoid, but I do some linear algebra), so ideally I'd use something
like fmin_bounds to strictly limit where the search can occur, but it seems
that fmin_bounds can only handle rectangular bounds.  fmin_cobyla seems to
be happy to simply ignore the constraints I give it (and yes, I've got print
statements that make it clear that it is wandering far, far outside of the
allowed region of parameter space).  Is there a simple way to use
fmin_bounds with a bound of the form:

      x^2 + y^2 + z^2 + .... <= 1.0 ?

or more generally:

      transpose(x).M.x <= 1.0  where x is a column vector and M is a
positive definite matrix?

It seems very bizarre that fmin_cobyla is perfectly happy to wander very,
very far outside of where it should be.

Thanks very much,

View this message in context: http://www.nabble.com/fmin-using-spherical-bounds-tp23654947p23654947.html
Sent from the Scipy-User mailing list archive at Nabble.com.

More information about the SciPy-user mailing list