User:Jarle Pahr/SciPy: Difference between revisions

From OpenWetWare
Jump to navigationJump to search
Line 24: Line 24:


=Optimization=
=Optimization=
http://scicomp.stackexchange.com/questions/83/is-there-a-high-quality-nonlinear-programming-solver-for-python


Tutorial: http://docs.scipy.org/doc/scipy/reference/tutorial/optimize.html#tutorial
Tutorial: http://docs.scipy.org/doc/scipy/reference/tutorial/optimize.html#tutorial
==Functions==
SciPy functions:
http://docs.scipy.org/doc/scipy/reference/generated/scipy.optimize.fmin.html#scipy.optimize.fmin
http://docs.scipy.org/doc/scipy/reference/generated/scipy.optimize.minimize.html#scipy.optimize.minimize
Cobyla:
http://docs.scipy.org/doc/scipy/reference/generated/scipy.optimize.fmin_cobyla.html#scipy.optimize.fmin_cobyla
*Constrained optimization with inequality constraints
*Variable bounds and equality constraints not explicitly supporte (must be implemented as inequality constraints).
Sequential Least SQuares Programming (SLSQP):
Global solvers:
http://docs.scipy.org/doc/scipy/reference/generated/scipy.optimize.brute.html#scipy.optimize.brute


minimize: http://docs.scipy.org/doc/scipy/reference/generated/scipy.optimize.minimize.html#scipy.optimize.minimize
minimize: http://docs.scipy.org/doc/scipy/reference/generated/scipy.optimize.minimize.html#scipy.optimize.minimize
*General interface to several methods for minimization of multi-variate scalar function.
*General interface to several methods for minimization of multi-variate scalar function.





Revision as of 04:24, 14 January 2014

Notes on the SciPy Python library:


http://www.scipy.org/

http://scipy-lectures.github.io/

http://oneau.wordpress.com/2011/02/28/simple-statistics-with-scipy/

Testing:

import scipy as sci
sci.test()


Installation files

http://www.lfd.uci.edu/~gohlke/pythonlibs/#scipy-stack


Linalg

http://docs.scipy.org/doc/scipy/reference/linalg.html

Optimization

http://scicomp.stackexchange.com/questions/83/is-there-a-high-quality-nonlinear-programming-solver-for-python

Tutorial: http://docs.scipy.org/doc/scipy/reference/tutorial/optimize.html#tutorial

Functions

SciPy functions:

http://docs.scipy.org/doc/scipy/reference/generated/scipy.optimize.fmin.html#scipy.optimize.fmin

http://docs.scipy.org/doc/scipy/reference/generated/scipy.optimize.minimize.html#scipy.optimize.minimize

Cobyla:

http://docs.scipy.org/doc/scipy/reference/generated/scipy.optimize.fmin_cobyla.html#scipy.optimize.fmin_cobyla

  • Constrained optimization with inequality constraints
  • Variable bounds and equality constraints not explicitly supporte (must be implemented as inequality constraints).


Sequential Least SQuares Programming (SLSQP):


Global solvers:

http://docs.scipy.org/doc/scipy/reference/generated/scipy.optimize.brute.html#scipy.optimize.brute


minimize: http://docs.scipy.org/doc/scipy/reference/generated/scipy.optimize.minimize.html#scipy.optimize.minimize

  • General interface to several methods for minimization of multi-variate scalar function.



scipy.optimize.fmin: http://docs.scipy.org/doc/scipy/reference/generated/scipy.optimize.fmin.html#scipy.optimize.fmin


Sequential Least Squares Programming (SLSQP):

http://stackoverflow.com/questions/49926/open-source-alternative-to-matlabs-fmincon-function


For comparison see http://www.mathworks.se/help/optim/ug/fmincon.html

See also http://scicomp.stackexchange.com/questions/83/is-there-a-high-quality-nonlinear-programming-solver-for-python

and http://openopt.org/SciPy


See also: http://scipy-lectures.github.io/advanced/mathematical_optimization/


Constrained minimization of multivariate scalar functions (minimize): http://docs.scipy.org/doc/scipy/reference/tutorial/optimize.html#tutorial-sqlsp

More on use of fmin_slsp:

http://scipy-user.10969.n7.nabble.com/using-scipy-optimize-fmin-slsqp-and-setting-bounds-None-None-td14134.html


scipy.optimize.fmin_ncg

Unconstrained optimization by Newton-Conjugate Gradient(NCG) method.

scipy.optimize.fmin_tnc

Truncated Newton-CG method. Allows variable bounds. Does not support equality/inequality constraints.