I have a sparse matrix whose shape is 570000*3000. I tried nima to do NMF (using the default nmf method, and set max_iter
to 65). However, I found nimfa very slow. Have anyone used a faster library to do NMF?
Asked
Active
Viewed 4,295 times
5

Keith Hughitt
- 4,860
- 5
- 49
- 54

Hanfei Sun
- 45,281
- 39
- 129
- 237
1 Answers
21
I have used libNMF
before. It's written in C and is very fast. There is a paper documenting the algorithm and code.
The paper also lists several alternative packages for NMF (in bunch of different languages (which I have copied here for future reference).
- The Mathworks [3, 33]
- Cemgil [5]
- Cichocki et al. [6]
- Cichocki et al. [7]
- Hansen et al. [14]
- Hoyer [16]
- Kim et al. [19]
- Lin [25]
- Matlab/Python
- http://www.csie.ntu.edu.tw/~cjlin/nmf/index.html
- Schmidt et al. [30]
- Gaujoux [10]
- Liu [26]
- Battenberg et al. 2
- Schmitt et al. [31]
- Dhillon et al. [8]
- Greene et al. [13]
- Pathak et al. [28]
- Wang et al. [34]
Disclaimer: I have not tried any of these other packages (aside from MATLAB's).
-
As an update for other people finding this via Google: **Mlpack** is a nice, fast, modern C++ Machine Learning library and they have a Module called "AMF - Alternative Matrix Factorization", which also has a few NMF algorithms: http://www.mlpack.org/docs/mlpack-2.0.1/doxygen.php?doc=namespacemlpack_1_1amf.html – Benjamin Maurer Apr 15 '16 at 09:14
-
Most of the links in this answer are broken. Again a great example of why software recommendations don't fit the SO model. – Cris Luengo May 14 '21 at 14:51
-
I just released a very fast NMF implementation in the RcppML R package. It makes use of the Eigen C++ library and is extensively optimized. It's on CRAN: `install.packages("RcppML")`. I will be maintaining and developing it for a long time. – zdebruine Jul 29 '21 at 14:07