Non-negative least squares
|Part of a series on Statistics|
In mathematical optimization, the problem of non-negative least squares (NNLS) is a constrained version of the least squares problem where the coefficients are not allowed to become negative. That is, given a matrix A and a (column) vector of response variables y, the goal is to find
- subject to x ≥ 0.
Here x ≥ 0 means that each component of the vector x should be non-negative, and ‖·‖₂ denotes the Euclidean norm.
Non-negative least squares problems turn up as subproblems in matrix decomposition, e.g. in algorithms for PARAFAC and non-negative matrix/tensor factorization. The latter can be considered a generalization of NNLS.
Quadratic programming version
The NNLS problem is equivalent to a quadratic programming problem
The first widely used algorithm for solving this problem is an active set method published by Lawson and Hanson in their 1974 book Solving Least Squares Problems.:291 In pseudocode, this algorithm looks as follows:
This algorithm takes a finite number of steps to reach a solution and smoothly improves its candidate solution as it goes (so it can find good approximate solutions when cut off at a reasonable number of iterations), but is very slow in practice, owing largely to the computation of the pseudoinverse ((Aᴾ)ᵀ Aᴾ)⁻¹. Variants of this algorithm are available in Matlab as the routine lsqnonneg and in SciPy as optimize.nnls.
Many improved algorithms have been suggested since 1974. Fast NNLS (FNNLS) is an optimized version of the Lawson—Hanson algorithm. Other algorithms include variants of Landweber's gradient descent method and coordinate-wise optimization based on the quadratic programming problem above.
- Chen, Donghui; Plemmons, Robert J. (2009). Nonnegativity constraints in numerical analysis. Symposium on the Birth of Numerical Analysis. CiteSeerX .
- Bro, Rasmus; De Jong, Sijmen (1997). "A fast non-negativity-constrained least squares algorithm". Journal of Chemometrics. 11 (5): 393. doi:10.1002/(SICI)1099-128X(199709/10)11:5<393::AID-CEM483>3.0.CO;2-L.
- Lin, Chih-Jen (2007). "Projected Gradient Methods for Nonnegative Matrix Factorization" (PDF). Neural Computation. 19 (10): 2756–2779. PMID 17716011. doi:10.1162/neco.2007.19.10.2756.
- Boutsidis, Christos; Drineas, Petros (2009). "Random projections for the nonnegative least-squares problem". Linear Algebra and its Applications. 431 (5–7): 760–771. doi:10.1016/j.laa.2009.03.026.
- Lawson, Charles L.; Hanson, Richard J. (1995). Solving Least Squares Problems. SIAM.
- Stark, Philip B.; Parker, Robert L. (1995). "Bounded-variable least-squares: an algorithm and applications" (PDF). Computational Statistics. 10: 129–129.
- Franc, Vojtěch; Hlaváč, Václav; Navara, Mirko (2005). "Computer Analysis of Images and Patterns". Lecture Notes in Computer Science. 3691: 407. ISBN 978-3-540-28969-2. doi:10.1007/11556121_50.
- "scipy.optimize.nnls". SciPy v0.13.0 Reference Guide. Retrieved 25 January 2014.
- Johansson, B. R.; Elfving, T.; Kozlov, V.; Censor, Y.; Forssén, P. E.; Granlund, G. S. (2006). "The application of an oblique-projected Landweber method to a model of supervised learning". Mathematical and Computer Modelling. 43 (7–8): 892. doi:10.1016/j.mcm.2005.12.010.