Expand description
Optimisation with simple bounds l ≤ x ≤ u, following scipy.optimize:
minimize_lbfgsb: the limited-memory quasi-Newton method L-BFGS-B of Byrd, Lu, Nocedal and Zhu (1995): a generalised Cauchy point along the projected gradient path fixes the active bounds, a subspace minimisation of the limited-memory model moves the free variables, and a line search capped at the bounds finishes the step.least_squares_bounded: nonlinear least squares with bounds and robust loss functions by the trust-region reflective method of Branch, Coleman and Li (a port of SciPy’sleast_squares(method='trf')with the exact trust-region solver).lsq_linear: linear least squares with bounds by the bounded-variable least-squares algorithm of Stark and Parker (SciPy’slsq_linear(method='bvls')).nnls: non-negative least squares by the active-set method of Lawson and Hanson.
See the book entry Bound-constrained optimisation.
Structs§
- Bounded
Least Squares Result - The result of
least_squares_bounded. - Bounded
Result - The result of a bound-constrained minimisation.
- Lbfgsb
Options - Options for
minimize_lbfgsb, with SciPy’s defaults. - Least
Squares Options - Options for
least_squares_bounded, with SciPy’s defaults. - Linear
LsqResult - The result of
lsq_linearandnnls.
Enums§
- Loss
- Robust loss functions
ρ(z)of the squared residualz = (f / f_scale)²(SciPy’sloss).
Functions§
- least_
squares_ bounded - Minimises
½ Σ ρ(fᵢ(x)²)subject tolb ≤ x ≤ ubby the trust-region reflective method (SciPy’sleast_squares(method='trf', tr_solver='exact', x_scale=1)).funreturns the residuals andjactheir Jacobian (rows = residuals). - least_
squares_ dogbox - Bounded nonlinear least squares by the dogbox method (SciPy’s
least_squares(method="dogbox")), Voglis and Lagaris’s rectangular trust region. Variables on a bound whose gradient pushes further out are fixed; for the others the Gauss-Newton step and the Cauchy point define a dogleg, followed inside the intersection of the box-shaped trust region with the bounds. It suits small problems with bounds, and is SciPy’s port step for step; same options and result asleast_squares_bounded. - least_
squares_ lsmr - The trust-region reflective method with an iterative trust-region solver, for large or
sparse problems (SciPy’s
least_squares(method='trf', tr_solver='lsmr')). The Jacobian is anyLinearOperator(a sparseCsrMatrix, a dense matrix, or products supplied by closures), used only through products with vectors. - lsq_
linear - Linear least squares with bounds,
min ½‖A x − b‖²subject tolb ≤ x ≤ ub(SciPy’slsq_linear(method='bvls')), by Stark and Parker’s bounded-variable least squares: start from the unconstrained solution clipped to the bounds, then, while the KKT conditions are violated, free the variable with the most violated condition and solve on the free set, stepping back to the first bound crossed. - minimize_
lbfgsb - Minimises
fsubject tolb ≤ x ≤ ubby L-BFGS-B (SciPy’sminimize(method='L-BFGS-B')).fgreturns the value and gradient. Infinite bounds are allowed. - nnls
- Non-negative least squares
min ‖A x − b‖withx ≥ 0(SciPy’snnls), by Lawson and Hanson’s active-set method: repeatedly free the variable whose gradient most wants to grow, solve the unconstrained problem on the free set, and step back to the boundary when a free variable would turn negative.