[SciPy-User] [SciPy-user] optimize fmin_cg parameter passing

Denis Laxalde denis.laxalde@mcgill...
Fri Apr 13 08:31:50 CDT 2012


aurora1625 wrote:
> My problem is:
> 
> my f function has several parameters(datatype:array), it's like 
> 
> f = \sum lambda_i * phi_i + \zeta *(exp(lambda_i + \nu_i))
> 
> this function is about lambda, so i get 
> 
> fprime = \sum phi_i + \zeta *(exp(lambda_i + \nu_i))
> 
> I want to pass in an initial lambda value, but how can I pass in other
> parameter, phi, zeta and nu.
> 
> I guess my function is about lambda, and the other parameters should be
> constant and fixed, but I really don't know how to pass them in. 

Extra parameters usually go in the `args::tuple` parameter for
minimizers in scipy, e.g.:

  fmin(f, x0, args=(phi, zeta, nu), ...)


-- 
Denis


More information about the SciPy-User mailing list