Skip to main content

Sparse Optimisation Research Code

Project description

Build Status Code Health Documentation Status PyPi Release

SPORCO is a Python package for solving optimisation problems with sparsity-inducing regularisation. These consist primarily of sparse coding and dictionary learning problems, including convolutional sparse coding and dictionary learning, but there is also support for other problems such as Total Variation regularisation and Robust PCA. In the current version all of the optimisation algorithms are based on the Alternating Direction Method of Multipliers (ADMM).

Requirements

The primary requirements are Python itself, and modules numpy, scipy, future, pyfftw, and matplotlib. Module numexpr is not required, but some functions will be faster if it is installed.

Installation of these requirements is system dependent. Under a recent version of Ubuntu Linux, the following commands should be sufficient for Python 2

sudo apt-get install python-numpy
sudo apt-get install python-scipy
sudo apt-get install python-numexpr
sudo apt-get install python-matplotlib
sudo apt-get install python-pip
sudo apt-get install libfftw3-dev
sudo pip install future
sudo pip install pyfftw

or Python 3

sudo apt-get install python3-numpy
sudo apt-get install python3-scipy
sudo apt-get install python3-numexpr
sudo apt-get install python3-matplotlib
sudo apt-get install python3-pip
sudo apt-get install libfftw3-dev
sudo pip3 install future
sudo pip3 install pyfftw

Some additional dependencies are required for running the unit tests or building the documentation from the package source. Under a recent version of Ubuntu Linux, the following commands should be sufficient for Python 2

sudo apt-get install python-pytest
sudo apt-get install python-numpydoc
sudo pip install pytest-runner
sudo pip install sphinxcontrib-bibtex

or Python 3

sudo apt-get install python3-pytest
sudo apt-get install python3-numpydoc
sudo pip3 install pytest-runner
sudo pip3 install sphinxcontrib-bibtex

Installation

To install the most recent release of SPORCO from PyPI do

pip install sporco

To install the development version from GitHub do

git clone git://github.com/bwohlberg/sporco.git

followed by

cd sporco
python setup.py build
python setup.py install

The install command will usually have to be performed with root permissions.

Usage

Scripts illustrating usage of the package can be found in the examples directory of the source distribution. These examples can be run from the root directory of the package by, for example

python examples/demo_bpdn.py

To run these scripts prior to installing the package it will be necessary to first set the PYTHONPATH environment variable to include the root directory of the package. For example, in a bash shell

export PYTHONPATH=$PYTHONPATH:`pwd`

from the root directory of the package.

Documentation

Documentation is available online at Read the Docs, or can be built from the root directory of the source distribution by the command

python setup.py build_sphinx

in which case the HTML documentation can be found in the build/sphinx/html directory (the top-level document is index.html).

License

This package is distributed with a BSD license; see the LICENSE file for details.

Acknowledgments

Thanks to Aric Hagberg for valuable advice on python packaging, documentation, and related issues.

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

sporco-0.0.3.tar.gz (691.0 kB view details)

Uploaded Source

Built Distribution

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

sporco-0.0.3-py2.7.egg (819.8 kB view details)

Uploaded Egg

File details

Details for the file sporco-0.0.3.tar.gz.

File metadata

  • Download URL: sporco-0.0.3.tar.gz
  • Upload date:
  • Size: 691.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for sporco-0.0.3.tar.gz
Algorithm Hash digest
SHA256 7884b06e7c194e10dd00226bbd2cac36b610600b9b77cf3e3ccda16f86127098
MD5 d7d3df48ba2833a50c8e5e9e12bb5d4b
BLAKE2b-256 f7c2df2619cb9c18ac8f119fd83c94d3bdd97686a77fd3d1b5052b2a64afc6c8

See more details on using hashes here.

File details

Details for the file sporco-0.0.3-py2.7.egg.

File metadata

  • Download URL: sporco-0.0.3-py2.7.egg
  • Upload date:
  • Size: 819.8 kB
  • Tags: Egg
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for sporco-0.0.3-py2.7.egg
Algorithm Hash digest
SHA256 8bcd3ac7713e29f2f85c6b69215cc557360fa4338462eb5932d887a3fdae5e28
MD5 f7453d2d3217b822b5a01fb2ee65dc50
BLAKE2b-256 43cb4e518c5457d9c73a19b733b15fad50fb98960ad782c32247a7b7f1484ac0

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