Skip to main content

Sparse Optimisation Research Code

Project description

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 (SPORCO has only been tested on version 2.7), and modules scipy, numpy, 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:

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

Installation

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. 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

If the source has been obtained from a source distribution package then HTML documentation can be built in the build/sphinx/html directory (the top-level document is index.html) by the command

python setup.py build_sphinx

If the source has been cloned from the project github, it is necessary to first issue the command

sphinx-apidoc --separate -d 2 -o source ../sporco modules.rst

within the docs directory.

License

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

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.1.tar.gz (691.6 kB view details)

Uploaded Source

File details

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

File metadata

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

File hashes

Hashes for sporco-0.0.1.tar.gz
Algorithm Hash digest
SHA256 9fa46d90cbf44923d40b191914c78eec3ffb8c080873a9ad2c353ec2372246c6
MD5 0777110563b45214cd0356d60bed8e13
BLAKE2b-256 f807dac9c22a5ddd811756b036fb6e99cfd43511a4110b68d29679955ea7c56f

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