Skip to main content

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.

Metadata

Release files for jaxnnls 1.0.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for jaxnnls 1.0.1
File Size Uploaded
jaxnnls-1.0.1.tar.gz 8.3 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for jaxnnls 1.0.1
File Interpreter ABI Platform
jaxnnls-1.0.1-py2.py3-none-any.whl Python 3, Python 2 none any Details

Total release size: 18.3 kB

Release files / jaxnnls-1.0.1.tar.gz

Download URL jaxnnls-1.0.1.tar.gz
Size 8.3 kB
Tags Source
SHA-256 checksum
How to use checksums
6f153813455bb6569acf62db74e913822ea5f299238467c724b2d47da8e547df
BLAKE2b-256 checksum
How to use checksums
b8baf7c99bed610e4531953b21ac1f851e673efd55591e3800049a8becbb6699
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via python-requests/2.32.3

Release files / jaxnnls-1.0.1-py2.py3-none-any.whl

Download URL jaxnnls-1.0.1-py2.py3-none-any.whl
Size 10.0 kB
Tags Python 2 Python 3
SHA-256 checksum
How to use checksums
8d874b92f87ef89b0e0a364cbe6fcffd738cc5879d55bbdc2506872ad28e1f41
BLAKE2b-256 checksum
How to use checksums
1bc9cdb9eb2539d05d96a498d6c3cd9039c7cfbd28da63c0f71513d8b312014c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via python-requests/2.32.3

Release history Release notifications | RSS feed

This release

1.0.1 This release

2 release files

1.0.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page