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 is positive definite. Or equivalently

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

when you set

\begin{align*}
Q&=A^TA \\
q&=A^Tb
\end{align*}

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.

Link to the documentation.

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.1.tar.gz (8.3 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.1-py2.py3-none-any.whl (10.0 kB view details)

Uploaded Python 2Python 3

File details

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

File metadata

  • Download URL: jaxnnls-1.0.1.tar.gz
  • Upload date:
  • Size: 8.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: python-requests/2.32.3

File hashes

Hashes for jaxnnls-1.0.1.tar.gz
Algorithm Hash digest
SHA256 6f153813455bb6569acf62db74e913822ea5f299238467c724b2d47da8e547df
MD5 f27a11ce0b8ec2d7f001d10893fe358b
BLAKE2b-256 b8baf7c99bed610e4531953b21ac1f851e673efd55591e3800049a8becbb6699

See more details on using hashes here.

File details

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

File metadata

  • Download URL: jaxnnls-1.0.1-py2.py3-none-any.whl
  • Upload date:
  • Size: 10.0 kB
  • Tags: Python 2, Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: python-requests/2.32.3

File hashes

Hashes for jaxnnls-1.0.1-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 8d874b92f87ef89b0e0a364cbe6fcffd738cc5879d55bbdc2506872ad28e1f41
MD5 3dea53ebef0cd2cfcd625f8963e7f616
BLAKE2b-256 1bc9cdb9eb2539d05d96a498d6c3cd9039c7cfbd28da63c0f71513d8b312014c

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