Package minimise :: Module minimise
[hide private]
[frames] | no frames]

Module minimise

source code

Functions [hide private]
 
minimise(func, dfunc=None, d2func=None, args=(), x0=None, minimiser=None, func_tol=1e-05, maxiter=1000, full_output=0, print_flag=0)
Generic code for iterative minimisers.
source code
Variables [hide private]
  noscipy_flag = 0

Imports: sys, copy, match, fmin, fmin_bfgs, fmin_ncg, simplex_scipy, bfgs_scipy, ncg_scipy, grid, coordinate_descent, steepest_descent, bfgs, newton, levenberg_marquardt, cauchy_point, simplex


Function Details [hide private]

minimise(func, dfunc=None, d2func=None, args=(), x0=None, minimiser=None, func_tol=1e-05, maxiter=1000, full_output=0, print_flag=0)

source code 
Generic code for iterative minimisers.


Function options
~~~~~~~~~~~~~~~~

func                    - The function to minimise.
dfunc                   - The function which returns the gradient vector.
d2func                  - The function which returns the hessian matrix or approximation.

f_args                  - The tuple of arguments to supply to the function func.
df_args                 - The tuple of arguments to supply to the function dfunc.
d2f_args                - The tuple of arguments to supply to the function d2func.

xk                      - The parameter vector which on input is the initial values, x0.
fk                      - The function value which on input corresponds to x0.
dfk                     - The gradient vector which on input corresponds to x0.
d2fk                    - The hessian matrix or approximation which on input corresponds to x0.

xk_new                  - The parameter vector for the next iteration which on input can be anything.
fk_new                  - The function value for the next iteration which on input can be anything.
dfk_new                 - The gradient vector for the next iteration which on input can be anything.
d2fk_new                - The hessian matrix for the next iteration which on input can be anything.

func_tol                - The cutoff value used to terminate minimisation by comparison to the difference in function values between iterations.
maxiter                 - The maximum number of iterations.
print_flag              - A flag specifying how much information should be printed to standard output during minimisation:

The print flag corresponds to:
        0 - No output.
        1 - Minimal output.
        2 - Full output.


Returned objects
~~~~~~~~~~~~~~~~

The minimised parameter vector, function value at the minimum, number of iterations, and a warning flag are returned.
The warning flag corresponds to:
        0 - Minimisation terminated successfully.
        1 - Maximum number of iterations have been reached.