(contribution and maintenance)

Original work by Julien Mairal

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,…).

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 and porting to R-3.x and Python3.x was done by Ghislain Durif (Inria).


  • For Matlab and R, you can download the sources from [1].
  • for Python, SPAMS is available on PyPI, so you can run pip install spams or pip install spams_mkl to use the specific version compatible with the MKL Intel library, or download the sources from [1].



Ghislain Durif
Research Engineer

Applied mathematics and mathematical engineering enthusiast.