Skip to content

Instantly share code, notes, and snippets.

@vene
Last active April 21, 2024 16:54
Show Gist options
  • Star 3 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save vene/7224672 to your computer and use it in GitHub Desktop.
Save vene/7224672 to your computer and use it in GitHub Desktop.
Non-negative least squares in Python
Display the source blob
Display the rendered blob
Raw
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@larsmans
Copy link

The SCA algorithm looks promising too. It's extremely simple to implement (except I didn't work out the stopping conditions yet).

@coqr
Copy link

coqr commented Apr 21, 2024

Great.
I suggest taking a look at the two algorithms for constrained least squares NNLSE and LSEI. implemented by RICHARD J. HANSON and KAREN H. HASKELL. The original lFORTRAN codes and comments are at https://dl.acm.org/doi/pdf/10.1145/356004.356010
As far as I know, there is no implementation in Python. It would be fantastic if you could implement it.
Many thanks, Ricardo

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment