$$\begin{array}{l} \min \|Y - X K\|_F\ \mbox{s.t. }
K>=0 \end{array}$$ where $Y$ and $X$ are two real matrices of
dimension $n \times p$ and $n \times r$ respectively, and $\|.\|_F$ is the
Frobenius norm.
The algorithm is very fast compared to other approaches,
as it is optimised for handling multiple right-hand
sides.
Within the NMF
package, this algorithm is used
internally by the SNMF/R(L) algorithm from Kim et
al. (2007) to solve general Nonnegative Matrix
Factorization (NMF) problems, using alternating
nonnegative constrained least-squares. That is by
iteratively and alternatively estimate each matrix
factor.
The algorithm is an active/passive set method, which
rearrange the right-hand side to reduce the number of
pseudo-inverse calculations. It uses the unconstrained
solution $K_u$ obtained from the unconstrained least
squares problem, i.e. $\min \|Y - X K\|_F^2$ , so as to determine the initial passive
sets.
The function fcnnls
is provided separately so that
it can be used to solve other types of nonnegative least
squares problem. For faster computation, when multiple
nonnegative least square fits are needed, it is
recommended to directly use the function
.fcnnls
.
The code of this function is a port from the original
MATLAB code provided by Kim et al. (2007).