Nimfa
Nimfa is a Python module that implements many algorithms for nonnegative matrix factorization. Nimfa is distributed under the BSD license.
The project was started in 2011 by Marinka Zitnik as a Google Summer of Code project, and since then many volunteers have contributed. See AUTHORS file for a complete list of contributors.
It is currently maintained by a team of volunteers.
Important links
- Official source code repo: https://github.com/marinkaz/nimfa
- HTML documentation (stable release): http://ai.stanford.edu/~marinka/nimfa
- Download releases: http://github.com/marinkaz/nimfa/releases
- Issue tracker: http://github.com/marinkaz/nimfa/issues
Dependencies
Nimfa is tested to work under Python 2.7 and Python 3.4.
The required dependencies to build the software are NumPy >= 1.7.0, SciPy >= 0.12.0.
For running the examples Matplotlib >= 1.1.1 is required.
Install
This package uses setuptools, which is a common way of installing python modules. To install in your home directory, use:
python setup.py install --user
To install for all users on Unix/Linux:
sudo python setup.py install
For more detailed installation instructions, see the web page http://ai.stanford.edu/~marinka/nimfa
Use
Run alternating least squares nonnegative matrix factorization with projected gradients and Random Vcol initialization algorithm on medulloblastoma gene expression data::
>>> import nimfa
>>> V = nimfa.examples.medulloblastoma.read(normalize=True)
>>> lsnmf = nimfa.Lsnmf(V, seed='random_vcol', rank=50, max_iter=100)
>>> lsnmf_fit = lsnmf()
>>> print('Rss: %5.4f' % lsnmf_fit.fit.rss())
Rss: 0.2668
>>> print('Evar: %5.4f' % lsnmf_fit.fit.evar())
Evar: 0.9997
>>> print('K-L divergence: %5.4f' % lsnmf_fit.distance(metric='kl'))
K-L divergence: 38.8744
>>> print('Sparseness, W: %5.4f, H: %5.4f' % lsnmf_fit.fit.sparseness())
Sparseness, W: 0.7297, H: 0.8796
Cite
@article{Zitnik2012,
title = {Nimfa: A Python Library for Nonnegative Matrix Factorization},
author = {Zitnik, Marinka and Zupan, Blaz},
journal = {Journal of Machine Learning Research},
volume = {13},
pages = {849-853},
year = {2012}
}
Metadata
Release files for nimfa 1.4.0
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 |
|---|---|---|---|---|
| nimfa-1.4.0.tar.gz | 5.7 MB | Without provenance | Details for nimfa-1.4.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| nimfa-1.4.0-py2.py3-none-any.whl | Python 2, Python 3 | none | any | Details for nimfa-1.4.0-py2.py3-none-any.whl |
Total release size: 10.4 MB
Release files / nimfa-1.4.0.tar.gz
| Download URL | nimfa-1.4.0.tar.gz |
|---|---|
| Size | 5.7 MB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
39cff2b86856d03ca8a3d9c38598034ecf1a768c325fd3a728bb9eadb8c6b919
|
|
BLAKE2b-256 checksum How to use checksums |
4281c07af372792380f402c1784cb7e1b9e77e4a9b706eddf6b6f2a8387a0db0
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.15.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.4.0 requests-toolbelt/0.9.1 tqdm/4.36.1 CPython/2.7.13
|
Release files / nimfa-1.4.0-py2.py3-none-any.whl
| Download URL | nimfa-1.4.0-py2.py3-none-any.whl |
|---|---|
| Size | 4.7 MB |
| Tags | Python 2 Python 3 |
|
SHA-256 checksum How to use checksums |
d9f2e1419c94524cec79e8d19291180707a2052ac2e25284edaba235d1575451
|
|
BLAKE2b-256 checksum How to use checksums |
75e31f5626e07fa38b9fd5bf92c018b97e8dd4eec69dd6284b1294fd46873e66
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.15.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.4.0 requests-toolbelt/0.9.1 tqdm/4.36.1 CPython/2.7.13
|
Security for nimfa 1.4.0
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.