[SciPy-User] quadratic programming with fmin_slsqp
Wed Mar 21 08:51:53 CDT 2012
On Tue, Mar 20, 2012 at 7:58 AM, denis <email@example.com> wrote:
> On Mar 16, 5:45 pm, josef.p...@gmail.com wrote:
>> scipy is missing a fmin_quadprog
> minmize() is a reasonable common interface to 10 or so optimizers,
> see http://docs.scipy.org/doc/scipy/reference/tutorial/optimize.html
> - minimize.py is not in scipy-0.9.0.tar nor in scipy-0.10.1.tar
> (a test to see if anybody's using it ?)
> - only L-BFGS-B TNC COBYLA and SLSQP support bounds.
> One could supply a trivial box / penaltybox as outlined below
> (I use this playing around with Neldermead)
> but I'm not sure anybody would use it
> plus there's openopt pyomo mystic ...
> maybe more solvers than real testcases :-
> -- denis
> class Funcbox:
> """ F = Funcbox( func, [box=(0,1), penalty=None, grid=0,
> *funcargs, **kwargs
> wraps a func() with a constraint box and grid
> func: a function of a numpy vector or array-like
> box: (low, high) to np.clip, default (0,1).
> These can be vectors; low_j == high_j freezes x_j at that
> penalty: e.g. (0, 1, 1000) adds a quadratic penalty
> to func() where xclip is outside (0, 1)
> 1000 * sum( max( 0 - x, 0 )**2 + max( x - 1, 0 )**2 )
> = 1 4 9 16 ... at -.01 -.02 ... and 1.01 1.02 ...
> The default is None, no penalty.
> (The penalty box should be smaller than the clip box;
> x is first gridded if grid > 0, then clipped, then penalty
> grid: e.g. .01 snaps all x_j to multiples of .01 --
> a simple noise smoother, recommended for noisy functions.
> The default is 0, no gridding.
> SciPy-User mailing list
What I meant was, getting a high level interface that can be used as
in other packages
scikits.datasmooth is using cvxopt for it
fmin_slsqp "sounds" similar
More information about the SciPy-User