deerlab.fnnls¶
- fnnls(AtA, Atb, tol=None, maxiter=None, verbose=False)[source]¶
Fast non-negative least-squares (NNLS) solver.
Solves the problem
where
AtA
andAtb
using the fast non-negative least-squares (FNNLS) algorithm [1], [2].- Parameters:
- AtAmatrix_like
Matrix
- Atbarray_like
Vector
- tolfloat scalar
Tolerance used for deciding when elements of x are less than zero. The default is
tol = max(shape(AtA))*norm(AtA,1)*eps
.- maxiterinteger scalar
Maximum number of iterations. The default is
maxiter = 5*max(shape(AtA))
- verboseboolean
If set to
True
, display the iteration details during the optimization.
- Returns:
- xndarray
Solution vector.
References