Skip to content

delnatan/FNNLSa

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 

Repository files navigation

FNNLSa

Python port of FNNLSa algorithm by Rasmus Bro. Directly taken from his MATLAB file exchange:

http://www.mathworks.com/matlabcentral/fileexchange/3388-nnls-and-constrained-regression?focused=5051382&tab=function

This translation requires NumPy.

Note that for FNNLS, the symmetric matrix $A^TA$ and matrix-vector product $A^T b$ is used as arguments, so FNNLSa(AtA, Atb). The NNLS implementation from scipy.optimize uses nnls(A,b) instead.

Running %timeit magic with IPython notebook with a toy problem (see ipynb file in this repository):

scipy.optimize NNLS

41 ms ± 358 µs per loop (mean ± std. dev. of 7 runs, 10 loops each)

FNNLSa

9.73 ms ± 51.7 µs per loop (mean ± std. dev. of 7 runs, 100 loops each)

For a transformation matrix (600 x 1000)

About

Python port of FNNLSa algorithm

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published