The Non-Negative Matrix Factorization Toolbox in MATLAB (The NMF MATLAB Toolbox)

Yifeng Li
Centre for Molecular Medicine and Therapeutics
Department of Medical Genetics
University of British Columbia
Vancouver, BC, Canada

Alioune Ngom
School of Computer Science
University of Windsor
Windsor, Ontario, Canada

What's New in the Current Version

  1. Versatile sparse matrix factorization (VSMF) is added in v 1.4.
  2. Statistical comparison methods are added in v 1.3.


NMF factorize one non-negative matrix into two non-negative factors, that is the basis matrix and the coefficient matrix. It has been successfully applied in Bioinformatics as data mining approach. The NMF MATLAB Toolbox comprises implementations of the standard NMF and its variants. This toolbox includes most of the important data-mining applications via NMF, such as clustering, biclustering, feature extraction, feature selection, classification, and missing values. The current version is 1.4 (Feb. 26, 2013). This toolbox is free for academic research only. You can download it from source code. A short tutorial is also available from source code.

Key Features

  1. Relatively Complete Algorithms: includes most of the optimization algorithms based on multiple update rules and non-negative least squares. Includes most of the variants: Sparse-NMF, Semi-NMF, Convex-NMF, Kernel-NMFs, Orthogonal-NMF, and Weighted-NMF. Our novel versatile sparse matrix factorization is also implemented.
  2. Powerful Applications: includes most of the data-mining applications of NMF: clustering, biclustering, feature extraction, feature selection, classification, and missing values.
  3. Visualization: Provide the heat maps of the clustering and bi-clustering results, and allow user to save the heat maps into different formats.
  4. Simplicity: Rich examples are provided for each application.
  5. Free Open Source: Free open source for academic use under licence GUN GPL v3.


  1. Y. Li and A. Ngom, "The non-negative matrix factorization toolbox for biological data mining," BMC Source Code for Biology and Medicine, vol 8, pp. 10, April 2013.


It is greatly appreciated if you report the bugs in our toolbox to us. Any comment on improving this toolbox is mostly welcome. Please contact Yifeng Li: yifeng DOT li DOT cn AT gmail DOT com and li11112c AT uwindsor DOT ca, and Alioune Ngom: angom AT cs DOT uwindsor DOT ca.

Related Publications and Toolboxes before This Toolbox

  1. NMFLAB for Signal and Image Processing: This toolbox includes a variety of algorithms such as multiplicative algorithm, exponentiated gradient, projected gradient, conjugate gradient, and Quasi-Newton. This toolbox also consists of some new concepts of NMF. Preprocessing and post-processing are also provided.
  2. NMF:DTU Toolbox: This toolbox contains 5 NMF optimization algorithms such as multiple undate rules, projected gradient method, probabilistic non-negative matrix factorization, alternating least squares, and alternating least squares with optimal brain surgeon.
  3. NMFN: Non-negative Matrix Factorization: This is implemented by R. Several algorithms are included in the package.
  4. NMF: Algorithms and framework for Nonnegative Matrix Factorization: This is also a R package. Several algorithms are implemented and their main interface allow parallel computations.
  5. Text to Matrix Generator (TMG): This is a Matlab Toolbox for text mining.
  6. Q. Qi, Y. Zhao, M. Li, and R. Simon, "Non-negative matrix factorization of gene expression profiles: a plug-in for BRB-ArrayTools," Bioinformatics, vol. 25, no. 4, pp. 545-547, 2009.
  7. E.J. Fertig, J. Ding, A.V. Favorov, G. Parmigiani, and M.F. Ochs, "an R/C++ package to identify patterns and biological process activity in transcriptomic data," Bioinformatics, vol. 26, no. 21, pp. 2792-2793, 2010.


  • Version 1.4 uploaded. February 26, 2013
  • Version 1.3 uploaded. November 29, 2012
  • Version 1.2 new examples, functions, and tutorial added. August 10, 2012
  • Version 1.1 examples added. March 07, 2012
  • Version 1.1 uploaded. December 30, 2011
  • Version 1.0 uploaded. May 26, 2011

You may be also interested in my
Non-Negative Matrix Factorization toolbox at https://sites.google.com/site/nmftool,
Sparse Representation toolbox at https://sites.google.com/site/sparsereptool,
Regularized Linear Models and Kernels toolbox: https://sites.google.com/site/rlmktool,
Probabilistic Graphical Models toolbox at https://sites.google.com/site/pgmtool,
Spectral Clustering toolbox at https://sites.google.com/site/speclust.
Subpages (1): source code