NNLS solves nonnegative least squares problems using a modified projected gradient method.
- Value parameters:
- maxIters
user defined maximum iterations
- Companion:
- object
Type members
Classlikes
Value members
Concrete methods
Solve a least squares problem, possibly with nonnegativity constraints, by a modified projected gradient method. That is, find x minimising ||Ax - b||_2 given A^T A and A^T b.
Solve a least squares problem, possibly with nonnegativity constraints, by a modified projected gradient method. That is, find x minimising ||Ax - b||_2 given A^T A and A^T b.
We solve the problem min_x 1/2 x' ata x' - x'atb subject to x >= 0
The method used is similar to one described by Polyak (B. T. Polyak, The conjugate gradient method in extremal problems, Zh. Vychisl. Mat. Mat. Fiz. 9(4)(1969), pp. 94-112) for bound- constrained nonlinear programming. Polyak unconditionally uses a conjugate gradient direction, however, while this method only uses a conjugate gradient direction if the last iteration did not cause a previously-inactive constraint to become active.
minimizeAndReturnState allows users to hot start the solver using initialState. If a initialState is provided and resetState is set to false, the optimizer will hot start using the previous state. By default resetState is true and every time reset will be called on the incoming state
minimizeAndReturnState allows users to hot start the solver using initialState. If a initialState is provided and resetState is set to false, the optimizer will hot start using the previous state. By default resetState is true and every time reset will be called on the incoming state
- Value parameters:
- ata
gram matrix
- atb
linear term
- initialState
initial state for calling the solver from inner loops
- resetState
reset the state based on the flag
- Returns:
converged state