user defined maximum iterations
Solve a least squares problem, possibly with nonnegativity constraints, by a modified projected gradient method.
Solve a least squares problem, possibly with nonnegativity constraints, by a modified projected gradient method. That is, find x minimising ||Ax - b||_2 given AT A and AT 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.
user defined maximum iterations
minimizeAndReturnState allows users to hot start the solver using initialState.
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
gram matrix
linear term
initial state for calling the solver from inner loops
reset the state based on the flag
converged state
NNLS solves nonnegative least squares problems using a modified projected gradient method.