GithubHelp home page GithubHelp logo

sporco's Introduction

SParse Optimization Research COde (SPORCO)

Build Status Code Health Documentation Status Test Coverage PyPi Release Supported Python Versions Package License

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. If module mpldatacursor is installed, function plot.plot will support the data cursor that it provides.

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 python-scipy python-numexpr
sudo apt-get install python-matplotlib python-pip libfftw3-dev
sudo pip install future
sudo pip install pyfftw

or Python 3

sudo apt-get install python3-numpy python3-scipy python3-numexpr
sudo apt-get install python3-matplotlib python3-pip 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 python-numpydoc
sudo pip install pytest-runner
sudo pip install sphinxcontrib-bibtex

or Python 3

sudo apt-get install python3-pytest 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/stdsparse/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.

Jupyter Notebook versions of some of the demos in examples are also available in the same directories as the corresponding demo scripts.

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.

sporco's People

Contributors

bwohlberg avatar jasmainak avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.