getspams / spams-devel

SPAMS (SPArse Modeling Software)

Home Page:https://thoth.inrialpes.fr/people/mairal/spams/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

SPAMS: a SPArse Modeling Software

This is the source code of the SPAMS software (you can either use the precompiled toolbox or compile the sources before using it).

There are several possible configurations. In particular,

  • it should work with 32 and 64 bits operating systems.
  • Linux, Windows (at least for version <= 2.5) and Mac OS.
  • it can use either the netlib blas/lapack library, or the intel mkl library, or your favorite BLAS library (ACML for instance).
  • it can be compiled using either gcc for Linux and Mac (a recent gcc >= 4.5 is recommended), Microsoft visual studio compiler for Windows and the intel compiler for all platforms.
  • it can either be used as a C++ library, or interfaced with Matlab, Python and R.

Links

SPAMS-related git repositories are also available on Inria gitlab forge: see Original C++ project, Python specific project

Contact

Regarding SPAMS Python package: you can open an issue on the dedicated git project at https://github.com/getspams/spams-python

Regarding SPAMS R package: you can open an issue on the dedicated git project at https://github.com/getspams/spams-R

For any other question related to the use or development of SPAMS:


What is SPAMS?

SPAMS (SPArse Modeling Software) is an optimization toolbox for solving various sparse estimation problems.

  • Dictionary learning and matrix factorization (NMF, sparse PCA, ...)
  • Solving sparse decomposition problems with LARS, coordinate descent, OMP, SOMP, proximal methods
  • Solving structured sparse decomposition problems (l1/l2, l1/linf, sparse group lasso, tree-structured regularization, structured sparsity with overlapping groups, ...).

Authorship

It is developed and maintained by Julien Mairal (Inria), and contains sparse estimation methods resulting from collaborations with various people: notably, Francis Bach, Jean Ponce, Guillermo Sapiro, Rodolphe Jenatton and Guillaume Obozinski.

It is coded in C++ with a Matlab interface. Interfaces for R and Python have been developed by Jean-Paul Chieze, and archetypal analysis was written by Yuansi Chen.

Release of version 2.6/2.6.1 and porting to R-3.x and Python3.x was done by Ghislain Durif (Inria). The original porting to Python3.x is based on this patch and on the work of John Kirkham available here.

Version 2.6.2 (Python only) update is based on contributions by François Rheault and Samuel Saint-Jean.

Maintenance

Since version 2.6.3+, SPAMS (especially the Python version) is now maintained by the following team:

Funding

This work was supported in part by the SIERRA and VIDEOWORLD ERC projects, and by the MACARON ANR project.

License

Version 2.1 and later are open-source under GPLv3 licence. For other licenses, please contact the authors.


News

  • 14/02/2022: Python SPAMS is now officially hosted on Github
  • 07/02/2022: SPAMS C++ project and SPAMS for R are now officially hosted on Github
  • 03/02/2022: Python SPAMS v2.6.3 is released (source and PyPI)
  • 03/09/2020: Python SPAMS v2.6.2 is released (source and PyPI)
  • 15/01/2019: Python SPAMS v2.6.1 is available on PyPI)
  • 08/12/2017: Python SPAMS v2.6.1 for Anaconda (with MKL support) is released
  • 24/08/2017: Python SPAMS v2.6.1 is released (a single source code for Python 3 and 2)
  • 27/02/2017: SPAMS v2.6 is released, including precompiled Matlab packages, R-3.x and Python3.x compatibility
  • 25/05/2014: SPAMS v2.5 is released
  • 12/05/2013: SPAMS v2.4 is released
  • 05/23/2012: SPAMS v2.3 is released
  • 03/24/2012: SPAMS v2.2 is released with a Python and R interface, and new compilation scripts for a better Windows/Mac OS compatibility
  • 06/30/2011: SPAMS v2.1 goes open-source!
  • 11/04/2010: SPAMS v2.0 is out for Linux and Mac OS!
  • 02/23/2010: Windows 32 bits version available! Elastic-Net is implemented
  • 10/26/2009: Mac OS, 64 bits version available!

Note for users

SPAMS is now available in version 2.6

Python users

Python users can install SPAMS from PyPI by using pip install spams.

Developpers that would like to regenerate the entire Python interface and documentation can check the dedicated folder swig where an interface with some instructions is available.

R users

R users can download the sources of the R SPAMS package from the official website and install it from source.

Developpers that would like to regenerate the entire R interface and documentation can check the dedicated folder swig where an interface with some instructions is available.

Matlab users

Precompiled toolbox

You can use the precompiled toolbox spams-matlab-precompiled-v2.6-%LAST_DATE%-%OS%.tar.gz for Linux or MacOS. You extract the tarball and run Matlab in the current directory. You have to use the command start_spams in Matlab to load the precompiled functions. HOW_TO_USE.txt for details.

The precompiled version for MacOS was compiled on MacOS X Maverick (10.9.5), please let us know if you encounter any issues on more recent MacOS version.

At the moment, no precompiled version is available for Windows users, we are currently working on it.

DISCLAIMER

In the MacOS precompiled version, the multi-threading with OpenMP is not available (not supported by the compiler clang at the moment).

To enable multi-threading, you will have to compile the library (c.f. below) with a different compiler (e.g. gcc, intel or clang-omp).

Building the library (more advanced users)

The best way to compile the library is to open the file compile.m and follow instructions. You can modify the beginning of the file to choose the compiler, the blas library, set some options and the different paths, then run compile.m in Matlab.

After all the mex-files are compiled, a script run_matlab.sh is also created, at least for the Linux and/or Mac OS version. Depending on your configuration, it might be necessary to launch Matlab with the script in order to use the toolbox (in order to preload multi-threading libraries). Otherwise, just type "start_spams;" and use the SPAMS library.


References

A monograph about sparse estimation

We encourage the users of SPAMS to read the following monograph, which contains numerous applications of dictionary learning, an introduction to sparse modeling, and many practical advices.

Related publications

You can find here some publications at the origin of this software.

The "matrix factorization" and "sparse decomposition" modules were developed for the following papers:

The "proximal" module was developed for the following papers:

The feature selection tools for graphs were developed for:

The incremental and stochastic proximal gradient algorithm correspond to the following papers:

About

SPAMS (SPArse Modeling Software)

https://thoth.inrialpes.fr/people/mairal/spams/

License:GNU General Public License v3.0


Languages

Language:C++ 48.2%Language:Python 17.1%Language:MATLAB 12.1%Language:C 7.8%Language:R 4.6%Language:SWIG 3.5%Language:Perl 2.6%Language:Shell 1.9%Language:TeX 1.2%Language:Makefile 0.5%Language:Batchfile 0.4%Language:Objective-C 0.0%Language:Pascal 0.0%