User:Jarle Pahr/SciPy

From OpenWetWare

Jump to: navigation, search

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()


Contents

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

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

Functions

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.

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

scipy.optimize.fmin_powell:

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

  • Unconstrained, non-linear optimization using a conjugate gradient algorithm.

Constrained Optimization BY Linear Approximation (COBYLA): http://docs.scipy.org/doc/scipy/reference/generated/scipy.optimize.fmin_cobyla.html#scipy.optimize.fmin_cobyla

  • Constrained non-linear optimization with inequality constraints
  • Variable bounds and equality constraints not explicitly supported (must be implemented as inequality constraints).
  • Reference:

Advances in Optimization and Numerical Analysis Mathematics and Its Applications Volume 275, 1994, pp 51-67 A Direct Search Optimization Method That Models the Objective and Constraint Functions by Linear Interpolation. M. J. D. Powell.

Sequential Least Squares Programming (SLSQP):

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.

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

  • Unconstrained, non-linear optimization using the Broyden–Fletcher–Goldfarb–Shanno (BFGS) algorithm.

http://en.wikipedia.org/wiki/Broyden%E2%80%93Fletcher%E2%80%93Goldfarb%E2%80%93Shanno_algorithm


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

Global solvers:

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

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

  • Simulated annealing. Non-linear optimization. Supports bound constraints.
Personal tools