Skip to main content
import sparsesolvers as ss
import numpy as np

N = 10

# Create an example sensing matrix
A = np.random.normal(loc=0.025, scale=0.025, size=(N, N)) + np.identity(N)

# An incoming signal
signal = np.zeros(N)
signal[2] = 1

# Use the homotopy solver to produce sparse solution, x.
x, info = ss.Homotopy(A).solve(signal, tolerance=0.1)

# Example output: error=0.064195, sparsity=0.9, argmax=2
print("error=%f, sparsity=%f, argmax=%i" % (
    info.solution_error, 1 - np.count_nonzero(x) / np.double(N),
    np.argmax(x)))

References

  1. A. Y. Yang, Z. Zhou, A. Ganesh, S. S. Sastry, and Y. Ma – Fast ℓ₁-minimization Algorithms For Robust Face Recognition – IEEE Trans. Image Processing, vol. 22, pp. 3234–3246, Aug 2013.

  2. R. Chartrand, W. Yin – Iteratively Reweighted Algorithms For Compressive Sensing – Acoustics Speech and Signal Processing 2008. ICASSP 2008. IEEE International Conference, pp. 3869-3872, March 2008.

  3. D. O’Leary – Robust Regression Computation Using Iteratively Reweighted Least Squares – Society for Industrial and Applied Mathematics, 1990

Metadata

Release files for sparsesolvers 0.8.8

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

Built distributions (wheels)

Table of built distributions (wheels) for sparsesolvers 0.8.8
File Interpreter ABI Platform
sparsesolvers-0.8.8-cp36-cp36m-manylinux1_x86_64.whl CPython 3.6 CPython 3.6 pymalloc Linux glibc 2.5+ x86-64 Details
sparsesolvers-0.8.8-cp35-cp35m-manylinux1_x86_64.whl CPython 3.5 CPython 3.5 pymalloc Linux glibc 2.5+ x86-64 Details
sparsesolvers-0.8.8-cp27-cp27mu-manylinux1_x86_64.whl CPython 2.7 CPython 2.7 pymalloc wide-unicode Linux glibc 2.5+ x86-64 Details

Total release size: 4.2 MB

Release files / sparsesolvers-0.8.8-cp36-cp36m-manylinux1_x86_64.whl

Download URL sparsesolvers-0.8.8-cp36-cp36m-manylinux1_x86_64.whl
Size 1.4 MB
Tags CPython 3.6 CPython 3.6 pymalloc Linux glibc 2.5+ x86-64
SHA-256 checksum
How to use checksums
ef43e9bd38a928e09f969b4327a5042da8e2c93a94c9060b366d5b7dff15f6e6
BLAKE2b-256 checksum
How to use checksums
815222e7ca1b336ad1632903997b8aad40360d9ea40c10a6d8a3f25211b6c97a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release files / sparsesolvers-0.8.8-cp35-cp35m-manylinux1_x86_64.whl

Download URL sparsesolvers-0.8.8-cp35-cp35m-manylinux1_x86_64.whl
Size 1.4 MB
Tags CPython 3.5 CPython 3.5 pymalloc Linux glibc 2.5+ x86-64
SHA-256 checksum
How to use checksums
af1da4670d429c95509ab3ede4fed4a86d52ae067a73961a9c17c7b36760fc8e
BLAKE2b-256 checksum
How to use checksums
d8c5b96ae62f2302761eb50ea833888995630899a1208053d2f1a8fa6e23a98c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release files / sparsesolvers-0.8.8-cp27-cp27mu-manylinux1_x86_64.whl

Download URL sparsesolvers-0.8.8-cp27-cp27mu-manylinux1_x86_64.whl
Size 1.4 MB
Tags CPython 2.7 CPython 2.7 pymalloc wide-unicode Linux glibc 2.5+ x86-64
SHA-256 checksum
How to use checksums
b9fff8b5d465c060ada2caeaf31677bda6ccd13d20428d268c67552cea21451f
BLAKE2b-256 checksum
How to use checksums
2aec8d9f1f7aa79f940745630b483e4eee8330ec25edb195834693ee8626af5a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release history Release notifications | RSS feed

This release

0.8.8 This release

3 release files

0.8.7

3 release files

0.8.6

3 release files

0.8.5

3 release files

0.8.2

3 release files

0.8.1

2 release files

0.0.2

3 release files

0.0.1

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