[SciPy-user] fmin using spherical bounds
Thu May 21 11:21:50 CDT 2009
Thanks very much for your rapid response, I'll certainly give this a try.
Unfortunately, re-parameterizing my function is not an option, since the
only sensible new choice of coordinates would be hyperspherical ones: that
way, I would specify the bounds of the radius to be b/w 0. and R. The
problem with that scheme is that these minimization schema evaluate the
gradient in cartesian coordinates only (not to mention how amazingly messy
it would be to decompose my function into hyperspherical harmonics).
It would make sense that scipy/numpy should have a minimization function
that will evaluate the function only after it verifies that it has taken a
step into an allowed region of parameter space.
> On Thu, May 21, 2009 at 11:19 AM, ElMickerino <firstname.lastname@example.org>
>> Hello Fellow SciPythonistas,
>> I have a seemingly simple task: minimize a function inside a
>> in parameter space. Unfortunately, I can't seem to make fmin_cobyla do
>> I'd like it to do, and after reading some of the old messages posted to
>> forum, it seems that fmin_cobyla will actually wander outside of the
>> regions of parameter space as long as it smells a minimum there (with
>> appropriate hand-waving).
>> The function I'd like to minimize is only defined in this hypersphere
>> hyperellipsoid, but I do some linear algebra), so ideally I'd use
>> like fmin_bounds to strictly limit where the search can occur, but it
>> that fmin_bounds can only handle rectangular bounds. fmin_cobyla seems
>> be happy to simply ignore the constraints I give it (and yes, I've got
>> statements that make it clear that it is wandering far, far outside of
>> 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.
> maybe you can give fmin_slsqp a try
> It is very flexible for defining the constraints. I recently added the
> example from the trac ticket to the tutorial.
> Otherwise I would try to reparameterize, or extend the objective
> function to all real numbers with a penalization term.
> SciPy-user mailing list
View this message in context: http://www.nabble.com/fmin-using-spherical-bounds-tp23654947p23656148.html
Sent from the Scipy-User mailing list archive at Nabble.com.
More information about the SciPy-user