The library contains implementations of different optimization and regularization variants of non-negative matrix factorization.
List of algorithms implemented:
1. Multiplicative Update Rule (nmf.py)
2. Alternating Least Squares NMF (alsnmf.py)
3. Graph Regularized NMF (gnmf.py)
4. Probabilistc NMF (pnmf.py)
5. Kernel NMF (knmf.py)
6. Chambolle-Pock based first-order primal dual algo (fpdnmf.py)
## Setup:
To get the project's source code, clone the github repository:
```shell
$ git clone https://github.com/satwik77/libnmf.git
```
Install VirtualEnv using the following (optional):
```shell
$ [sudo] pip install virtualenv
```
Create and activate your virtual environment (optional):
```shell
$ virtualenv venv
$ source venv/bin/activate
```
Install all the required packages:
```shell
$ pip install -r requirements.txt
```
Install the library by running the following command from the root directory of the repository:
```shell
$ python setup.py install
```
## Usage:
```python
>>> import numpy as np
>>> # For Graph Regularized NMF
>>> from libnmf.gnmf import GNMF
>>> X = np.random.random((10,10))
>>> gnmf= GNMF(X, rank=4)
>>> gnmf.compute_factors(max_iter= 20, lmd= 0.3, weight_type='heat-kernel', param= 0.4)
>>> # For first-order primal-dual algo
>>> from libnmf.fpdnmf import FPDNMF
>>> fpdnmf= FPDNMF(X, rank=4)
>>> fpdnmf.compute_factors(max_iter=30, nditer=5)
>>> #print fpdnmf.W, fpdnmf.H, fpdnmf.div_error
```
Refer to examples/Simple-Usage.ipynb for more on usage.
## References
* [1] Lee, D. D., & Seung, H. S. (2001). Algorithms for non-negative matrix factorization. In Advances in neural information processing systems (pp. 556-562). [Paper](https://papers.nips.cc/paper/1861-algorithms-for-non-negative-matrix-factorization.pdf)
* [2] Lee, D. D. and Seung, H. S. (1999), Learning the Parts of Objects by Non-negative Matrix Factorization, Nature 401(6755), 788-799. [Paper](http://lsa.colorado.edu/LexicalSemantics/seung-nonneg-matrix.pdf)
* [3] Cai, D., He, X., Han, J., & Huang, T. S. (2011). Graph regularized nonnegative matrix factorization for data representation. IEEE Transactions on Pattern Analysis and Machine Intelligence, 33(8), 1548-1560. [Paper](http://www.cad.zju.edu.cn/home/dengcai/Publication/Journal/TPAMI-GNMF.pdf)
* [4] Bayar, B., Bouaynaya, N., & Shterenberg, R. (2014). Probabilistic non-negative matrix factorization: theory and application to microarray data analysis. Journal of bioinformatics and computational biology, 12(01), 1450001. [Paper](https://pdfs.semanticscholar.org/18c2/302cbf1fe01a8338a186999b69abc5701c2e.pdf)
* [5] Zhang, D., Zhou, Z. H., & Chen, S. (2006). Non-negative matrix factorization on kernels. PRICAI 2006: Trends in Artificial Intelligence, 404-412. [Paper](https://cs.nju.edu.cn/zhouzh/zhouzh.files/publication/pricai06a.pdf)
* [6] Yanez, Felipe, and Francis Bach. "Primal-dual algorithms for non-negative matrix factorization with the Kullback-Leibler divergence." In Acoustics, Speech and Signal Processing (ICASSP), 2017 IEEE International Conference on, pp. 2257-2261. IEEE, 2017. [Paper](https://arxiv.org/pdf/1412.1788.pdf)
Metadata
Release files for libNMF 0.1.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| libNMF-0.1.2.tar.gz | 7.0 kB | Without provenance | Details for libNMF-0.1.2.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| libNMF-0.1.2-py3-none-any.whl | Python 3 | none | any | Details for libNMF-0.1.2-py3-none-any.whl |
Total release size: 17.2 kB
Release files / libNMF-0.1.2.tar.gz
| Download URL | libNMF-0.1.2.tar.gz |
|---|---|
| Size | 7.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
c3e1d3eb33c40f14b3ccb589d83fb056a978870b2da9da9334c5e7f6026f7eac
|
|
BLAKE2b-256 checksum How to use checksums |
4685b5247b16aab8e9d4f7b2a1c64e90fe72254d150484701037b798883ac462
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.12.1 pkginfo/1.4.2 requests/2.19.1 setuptools/40.4.3 requests-toolbelt/0.8.0 tqdm/4.27.0 CPython/3.5.2
|
Release files / libNMF-0.1.2-py3-none-any.whl
| Download URL | libNMF-0.1.2-py3-none-any.whl |
|---|---|
| Size | 10.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
eabb866392e92059f1fad2b1d7d410572fc115378d531be37822a56856b81451
|
|
BLAKE2b-256 checksum How to use checksums |
73b964bf9971ffea94f96c17b7674196cb10952a63c8ba08c19541f3951b1625
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.12.1 pkginfo/1.4.2 requests/2.19.1 setuptools/40.4.3 requests-toolbelt/0.8.0 tqdm/4.27.0 CPython/3.5.2
|
Security for libNMF 0.1.2
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.