[SciPy-user] L-BFGS in scipy
nwagner at iam.uni-stuttgart.de
Thu Sep 14 01:24:00 CDT 2006
Xiaojian Wang wrote:
> Is anybody know which optimize module can handle general constrains?
> not like
> lower(i) < Xi < upper(i) in scipy.optimize.fmin_l_bfgs_b().
> instead, I would like to include constraint:
> Gi = cos(X1) + X2**2 + X3*X4 <= 0.0
fmin_cobyla(func, x0, cons, args=(), consargs=None, rhobeg=1.0,
rhoend=0.0001, iprint=1, maxfun=1000)
Minimize a function using the Constrained Optimization BY Linear
Approximation (COBYLA) method
func -- function to minimize. Called as func(x, *args)
x0 -- initial guess to minimum
cons -- a sequence of functions that all must be >=0 (a single
if only 1 constraint)
args -- extra arguments to pass to function
consargs -- extra arguments to pass to constraints (default of None
use same extra arguments as those passed to func).
Use () for no extra arguments.
rhobeg -- reasonable initial changes to the variables
rhoend -- final accuracy in the optimization (not precisely guaranteed)
iprint -- controls the frequency of output: 0 (no output),1,2,3
maxfun -- maximum number of function evaluations.
> On 9/13/06, *Nils Wagner* <nwagner at iam.uni-stuttgart.de
> <mailto:nwagner at iam.uni-stuttgart.de>> wrote:
> Robert Kern wrote:
> > Nils Wagner wrote:
> >> Hi all,
> >> Has someone implemented the limited memory BFGS method in scipy ?
> > Yes. scipy.optimize.fmin_l_bfgs_b(). Please grep for these things.
> Thank you Robert.
> If bounds=None we have an unconstraint version.
> Thus fmin_l_bfgs_b is also an unconstrained optimizer. I missed that.
> Maybe fmin_l_bfgs_b should also be added to the list of
> optimization routines
> help (optimize) yields
> A collection of general-purpose optimization routines.
> fmin -- Nelder-Mead Simplex algorithm
> (uses only function calls)
> fmin_powell -- Powell's (modified) level set method (uses only
> function calls)
> fmin_cg -- Non-linear (Polak-Ribiere) conjugate gradient
> (can use function and gradient).
> fmin_bfgs -- Quasi-Newton method
> (can use function and gradient)
> fmin_ncg -- Line-search Newton Conjugate Gradient (can use
> function, gradient and Hessian).
> leastsq -- Minimize the sum of squares of M equations in
> N unknowns given a starting estimate.
> Constrained Optimizers (multivariate)
> fmin_l_bfgs_b -- Zhu, Byrd, and Nocedal's L-BFGS-B constrained
> (if you use this please quote their papers --
> see help)
> and I disregard fmin_l_bfgs_b because it is given in the section
> Constrained Optimizers.
> Sorry for the noise.
> SciPy-user mailing list
> SciPy-user at scipy.org <mailto:SciPy-user at scipy.org>
> SciPy-user mailing list
> SciPy-user at scipy.org
More information about the SciPy-user