This is the function
lsqnonneg from the package
I just changed
qr.solve into using Moore-Penrose inverse instead
qr.solve crashes for
some singular inputs. Now it won't crash but it's sometimes running for very long
time (forever?), presumably with those problematic inputs. After too many steps
the function halts and lies that the fit was terrible. I don't think this will
The definition of "too many steps". Default value is 3 (times 10 times the matrix height).
A vector (
x) and the error (
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.