optim

Non-linear optimization toolkit.

Select category:

Optimization

nelder_mead_min
[x0,v,nev] = nelder_mead_min (f,args,ctl) - Nelder-Mead minimization
nrm
Using X0 as a starting point find a minimum of the scalar function F.
line_min
[a,fx,nev] = line_min (f, dx, args, narg, h, nev_max) - Minimize f() along dx
powell
Multidimensional minimization (direction-set method).
adsmax
ADSMAX Alternating directions method for direct search optimization. [x, fmax, nf] = ADSMAX(FUN, x0, STOPIT, SAVIT, P) attempts to maximize the function FUN, using the starting vec...
mdsmax
MDSMAX Multidirectional search method for direct search optimization. [x, fmax, nf] = MDSMAX(FUN, x0, STOPIT, SAVIT) attempts to maximize the function FUN, using the starting vecto...
bfgsmin
bfgsmin: bfgs or limited memory bfgs minimization of function
battery
battery.m: repeatedly call bfgs using a battery of start values, to attempt to find global min of a nonconvex function
cg_min
NonLinear Conjugate Gradient method to minimize function F.
de_min
de_min: global optimisation using differential evolution
nonlin_min
Frontend for nonlinear minimization of a scalar objective function.
brent_line_min
Line minimization of f along df

Data fitting

lsqlin
Solve the linear least squares program min 0.5 sumsq(C*x - d) x subject to A*X <= B, AEQ*X = BEQ, LB <= X <= UB.
pronyfit
USAGE [alpha,c,rms] = pronyfit( deg, x1, h, y )
wpolyfit
Return the coefficients of a polynomial P(X) of degree N that minimizes 'sumsq (p(x(i)) - y(i))', to best fit the data in the least squares sense.
leasqr
Levenberg-Marquardt nonlinear regression.
nonlin_residmin
Frontend for nonlinear minimization of residuals returned by a model function.
nonlin_curvefit
Frontend for nonlinear fitting of values, computed by a model function, to observed values.
LinearRegression
general linear regression
polyfitinf
function [A,REF,HMAX,H,R,EQUAL] = polyfitinf(M,N,K,X,Y,EPSH,MAXIT,REF0) Best polynomial approximation in discrete uniform norm INPUT VARIABLES: M : degree of the fitting po...
wsolve
[x,s] = wsolve(A,y,dy)

Optimization statistics

residmin_stat
Frontend for computation of statistics for a residual-based minimization.
curvefit_stat
Frontend for computation of statistics for fitting of values, computed by a model function, to observed values.
polyconf
[y,dy] = polyconf(p,x,s)

Zero finding

vfzero
A variant of 'fzero'.

Compatibility

quadprog
Solve the quadratic program min 0.5 x'*H*x + x'*f x subject to A*X <= B, AEQ*X = BEQ, LB <= X <= UB.
linprog
Solve a linear problem.
lsqnonlin
Solve nonlinear least-squares (nonlinear data-fitting) problems min [EuclidianNorm(f(x))] .^ 2 x
lsqcurvefit
Solve nonlinear least-squares (nonlinear data-fitting) problems min [EuclidianNorm (f(x, xdata) - ydata)] .^ 2 x
nlinfit
Nonlinear Regression.
fmincon
Compatibility frontend for nonlinear minimization of a scalar objective function.

Numerical derivatives

dfdp
function prt = dfdp (x, f, p, dp, func[, bounds]) numerical partial derivatives (Jacobian) df/dp for use with leasqr --------INPUT VARIABLES--------- x=vec or matrix of indep var(used as arg to...
dcdp
function prt = dcdp (f, p, dp, func[, bounds])
dfpdp
function jac = dfpdp (p, func[, hook])
dfxpdp
function jac = dfxpdp (x, p, func[, hook])
cdiff
c = cdiff (func,wrt,N,dfunc,stack,dx) - Code for num. differentiation = "function df = dfunc (var1,..,dvar,..,varN) .. endfunction Returns a string of octave code that defines a function 'df...
deriv
Calculate derivate of function F.
numgradient
numgradient(f, {args}, minarg)
numhessian
numhessian(f, {args}, minarg)
jacobs
Calculate the jacobian of a function using the complex step method.

Pivoting

cpiv_bard
[lb, idx, ridx, mv] = cpiv_bard (v, m[, incl])
gjp
m = gjp (m, k[, l])

Tests

test_min_1
[x,v,niter] = feval (optim_func, "testfunc","dtestf", xinit);
test_min_2
[xlev,vlev,nlev] = feval(optim_func, "ff", "dff", xinit) ;
test_min_3
[xlev,vlev,nlev] = feval (optim_func, "ff", "dff", xinit, "extra", extra) ; [xlev,vlev,nlev] = feval \ (optim_func, "ff", "dff", list (xinit, obsmat, obses));
test_min_4
Plain run, just to make sure ###################################### Minimum wrt 'x' is y0 [xlev,vlev,nlev] = feval (optim_func, "ff", "dff", {x0,y0,1}); ctl.df = "dff";
test_nelder_mead_min_1
Use vanilla nelder_mead_min
test_nelder_mead_min_2
Test using volume #################################################
poly_2_ex
ex = poly_2_ex (l, f) - Extremum of a 1-var deg-2 polynomial
optim_problems
Problems for testing optimizers.
wrap_f_dfdp
[ret1, ret2] = wrap_f_dfdp (f, dfdp, varargin)
test_wpolyfit
x y dy

Examples

bfgsmin_example
initial values
rosenbrock
Rosenbrock function - used to create example obj. fns.

Documentation

optim_doc
Show optim package documentation.

Package: optim