Skip to main content

The jaxnnls package provides functions to solve non-negative

Project description

JaxNNLS

This package can be used for solving non-negative least square (NNLS) problems of the following form:

$$ \begin{align*} \underset{x}{\text{minimize}} & \quad \frac{1}{2}x^TQx - q^Tx \ \text{subject to} & \quad x \geq 0 \end{align*} $$

where $Q \succeq 0$. Or equivalently

$$ \begin{align*} \underset{x}{{\text{solve}}} & \quad Ax = b \ \text{subject to} & \quad x \geq 0 \end{align*} $$

where $A^TA = Q$ and $A^Tb = q$.

This solver can be combined with JAX's jit and vmap functionality, as well as differentiated with reverse-mode grad.

The NNLS problem is solved with a primal-dual interior point algorithm. This code is a modification on the qpax package, but in the special case of NNLS. Because of the simplifications in this special case the resulting code is significantly faster when $Q$ large in size.

As with the qpax code, derivative smoothing can be applied to the gradients.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

jaxnnls-1.0.0.tar.gz (7.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

jaxnnls-1.0.0-py2.py3-none-any.whl (9.9 kB view details)

Uploaded Python 2Python 3

File details

Details for the file jaxnnls-1.0.0.tar.gz.

File metadata

  • Download URL: jaxnnls-1.0.0.tar.gz
  • Upload date:
  • Size: 7.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.11.9

File hashes

Hashes for jaxnnls-1.0.0.tar.gz
Algorithm Hash digest
SHA256 21418d2923662c2ec4d56984a5eed4479f464a8dddfb9c1bb4b3669be338d77e
MD5 922fbc94232a17b6110ddf96e3215036
BLAKE2b-256 d710b802d06d44c3a3d7026e5cf2514ab40b507dc6d88bb1b46d2711042aafc9

See more details on using hashes here.

File details

Details for the file jaxnnls-1.0.0-py2.py3-none-any.whl.

File metadata

  • Download URL: jaxnnls-1.0.0-py2.py3-none-any.whl
  • Upload date:
  • Size: 9.9 kB
  • Tags: Python 2, Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.11.9

File hashes

Hashes for jaxnnls-1.0.0-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 d971f794d5b3ab18117efbb220c5c0f1660a659f25d7135a563389a047cad3b2
MD5 a4ef33928db60980cf952e15d4b0d6ee
BLAKE2b-256 241d15743ba63bd54928a0eac7fe7c073cdbc39cdb17073ee673f39f9d77b2d9

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page