Skip to main content

High performance ℓ₁-minimization solvers

Project description

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. MaFast ℓ₁-minimization Algorithms For Robust Face Recognition – IEEE Trans. Image Processing, vol. 22, pp. 3234–3246, Aug 2013.

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

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

Project details


Download files

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

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distributions

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

sparsesolvers-0.8.8-cp36-cp36m-manylinux1_x86_64.whl (1.4 MB view details)

Uploaded CPython 3.6m

sparsesolvers-0.8.8-cp35-cp35m-manylinux1_x86_64.whl (1.4 MB view details)

Uploaded CPython 3.5m

sparsesolvers-0.8.8-cp27-cp27mu-manylinux1_x86_64.whl (1.4 MB view details)

Uploaded CPython 2.7mu

File details

Details for the file sparsesolvers-0.8.8-cp36-cp36m-manylinux1_x86_64.whl.

File metadata

File hashes

Hashes for sparsesolvers-0.8.8-cp36-cp36m-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 ef43e9bd38a928e09f969b4327a5042da8e2c93a94c9060b366d5b7dff15f6e6
MD5 24d84d22026f3219bf77f2bf97f7dcef
BLAKE2b-256 815222e7ca1b336ad1632903997b8aad40360d9ea40c10a6d8a3f25211b6c97a

See more details on using hashes here.

File details

Details for the file sparsesolvers-0.8.8-cp35-cp35m-manylinux1_x86_64.whl.

File metadata

File hashes

Hashes for sparsesolvers-0.8.8-cp35-cp35m-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 af1da4670d429c95509ab3ede4fed4a86d52ae067a73961a9c17c7b36760fc8e
MD5 ac2992e6575cbec79c9b2e2e0f476401
BLAKE2b-256 d8c5b96ae62f2302761eb50ea833888995630899a1208053d2f1a8fa6e23a98c

See more details on using hashes here.

File details

Details for the file sparsesolvers-0.8.8-cp27-cp27mu-manylinux1_x86_64.whl.

File metadata

File hashes

Hashes for sparsesolvers-0.8.8-cp27-cp27mu-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 b9fff8b5d465c060ada2caeaf31677bda6ccd13d20428d268c67552cea21451f
MD5 0c3930642e50f3bd46343ebad74d9a1e
BLAKE2b-256 2aec8d9f1f7aa79f940745630b483e4eee8330ec25edb195834693ee8626af5a

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