{"id":13399121,"url":"https://github.com/mims-harvard/nimfa","last_synced_at":"2025-10-10T22:02:14.734Z","repository":{"id":1570758,"uuid":"2005484","full_name":"mims-harvard/nimfa","owner":"mims-harvard","description":"Nimfa: Nonnegative matrix factorization in Python","archived":false,"fork":false,"pushed_at":"2021-02-12T12:29:48.000Z","size":8195,"stargazers_count":525,"open_issues_count":12,"forks_count":133,"subscribers_count":36,"default_branch":"master","last_synced_at":"2024-04-10T06:07:00.101Z","etag":null,"topics":["embeddings","latent-features","latent-variable-models","matrix-factorization","nonnegative-matrix-factorization"],"latest_commit_sha":null,"homepage":"http://ai.stanford.edu/~marinka/nimfa/","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mims-harvard.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"COPYING.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2011-07-06T08:46:42.000Z","updated_at":"2024-04-08T12:24:25.000Z","dependencies_parsed_at":"2022-08-28T11:11:26.340Z","dependency_job_id":null,"html_url":"https://github.com/mims-harvard/nimfa","commit_stats":null,"previous_names":["marinkaz/nimfa"],"tags_count":12,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mims-harvard%2Fnimfa","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mims-harvard%2Fnimfa/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mims-harvard%2Fnimfa/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mims-harvard%2Fnimfa/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mims-harvard","download_url":"https://codeload.github.com/mims-harvard/nimfa/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":221432717,"owners_count":16820064,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["embeddings","latent-features","latent-variable-models","matrix-factorization","nonnegative-matrix-factorization"],"created_at":"2024-07-30T19:00:34.354Z","updated_at":"2025-10-10T22:02:09.695Z","avatar_url":"https://github.com/mims-harvard.png","language":"Python","readme":"Nimfa\n-----\n\n[![build: passing](https://img.shields.io/travis/marinkaz/nimfa.svg)](https://travis-ci.org/marinkaz/nimfa)\n[![build: passing](https://coveralls.io/repos/marinkaz/nimfa/badge.svg)](https://coveralls.io/github/marinkaz/nimfa?branch=master)\n[![GitHub release](https://img.shields.io/github/release/marinkaz/nimfa.svg)](https://GitHub.com/marinkaz/nimfa/releases/)\n[![BSD license](https://img.shields.io/badge/License-BSD-blue.svg)](https://opensource.org/licenses/BSD-3-Clause)\n[![Conda Version](https://img.shields.io/conda/v/conda-forge/nimfa.svg)](https://anaconda.org/conda-forge/nimfa)\n\nNimfa is a Python module that implements many algorithms for nonnegative matrix factorization. Nimfa is distributed under the BSD license.\n\nThe project was started in 2011 by Marinka Zitnik as a Google Summer of Code project, and since\nthen many volunteers have contributed. See AUTHORS file for a complete list of contributors.\n\nIt is currently maintained by a team of volunteers.\n\n[**[News:]**](https://github.com/marinkaz/scikit-fusion) [Scikit-fusion](https://github.com/marinkaz/scikit-fusion), collective latent factor models, matrix factorization for data fusion and learning over heterogeneous data.\n\n[**[News:]**](https://github.com/mims-harvard/fastGNMF) [fastGNMF](https://github.com/mims-harvard/fastGNMF), fast implementation of graph-regularized non-negative matrix factorization using [Facebook FAISS](https://github.com/facebookresearch/faiss).\n\nImportant links\n---------------\n\n- Official source code repo: https://github.com/marinkaz/nimfa\n- HTML documentation (stable release): http://ai.stanford.edu/~marinka/nimfa\n- Download releases: http://github.com/marinkaz/nimfa/releases\n- Issue tracker: http://github.com/marinkaz/nimfa/issues\n\nDependencies\n------------\n\nNimfa is tested to work under Python 2.7 and Python 3.4.\n\nThe required dependencies to build the software are NumPy \u003e= 1.7.0,\nSciPy \u003e= 0.12.0.\n\nFor running the examples Matplotlib \u003e= 1.1.1 is required.\n\nInstall\n-------\n\nThis package uses setuptools, which is a common way of installing\npython modules. To install in your home directory, use:\n\n    python setup.py install --user\n\nTo install for all users on Unix/Linux:\n    \n    sudo python setup.py install\n\nFor more detailed installation instructions,\nsee the web page http://ai.stanford.edu/~marinka/nimfa.\n\nAlternatively, you may also install this package using conda:\n\n    conda install -c conda-forge nimfa\n\nUse\n---\n\nRun alternating least squares nonnegative matrix factorization with projected gradients and Random Vcol initialization algorithm on medulloblastoma gene expression data:\n\n    \u003e\u003e\u003e import nimfa\n    \u003e\u003e\u003e V = nimfa.examples.medulloblastoma.read(normalize=True)\n    \u003e\u003e\u003e lsnmf = nimfa.Lsnmf(V, seed='random_vcol', rank=50, max_iter=100)\n    \u003e\u003e\u003e lsnmf_fit = lsnmf()\n    \u003e\u003e\u003e print('Rss: %5.4f' % lsnmf_fit.fit.rss())\n    Rss: 0.2668\n    \u003e\u003e\u003e print('Evar: %5.4f' % lsnmf_fit.fit.evar())\n    Evar: 0.9997\n    \u003e\u003e\u003e print('K-L divergence: %5.4f' % lsnmf_fit.distance(metric='kl'))\n    K-L divergence: 38.8744\n    \u003e\u003e\u003e print('Sparseness, W: %5.4f, H: %5.4f' % lsnmf_fit.fit.sparseness())\n    Sparseness, W: 0.7297, H: 0.8796\n\n\nCite\n----\n\n    @article{Zitnik2012,\n      title     = {Nimfa: A Python Library for Nonnegative Matrix Factorization},\n      author    = {Zitnik, Marinka and Zupan, Blaz},\n      journal   = {Journal of Machine Learning Research},\n      volume    = {13},\n      pages     = {849-853},\n      year      = {2012}\n    }\n\nSelected publications (Methods)\n------------------------------\n\n- Data fusion by matrix factorization: http://dx.doi.org/10.1109/TPAMI.2014.2343973\n- Jumping across biomedical contexts using compressive data fusion: https://academic.oup.com/bioinformatics/article/32/12/i90/2240593\n- Survival regression by data fusion: http://www.tandfonline.com/doi/abs/10.1080/21628130.2015.1016702\n- Gene network inference by fusing data from diverse distributions: https://academic.oup.com/bioinformatics/article/31/12/i230/216398\n- Fast optimization of non-negative matrix tri-factorization: https://doi.org/10.1371/journal.pone.0217994\n\nSelected publications (Applications)\n------------------------------------\n\n- A comprehensive structural, biochemical and biological profiling of the human NUDIX hydrolase family: https://www.nature.com/articles/s41467-017-01642-w\n- Gene prioritization by compressive data fusion and chaining: http://dx.doi.org/10.1371/journal.pcbi.1004552\n- Discovering disease-disease associations by fusing systems-level molecular data: http://www.nature.com/srep/2013/131115/srep03202/full/srep03202.html\n- Matrix factorization-based data fusion for gene function prediction in baker's yeast and slime mold: http://www.worldscientific.com/doi/pdf/10.1142/9789814583220_0038\n- Matrix factorization-based data fusion for drug-induced liver injury prediction: http://www.tandfonline.com/doi/abs/10.4161/sysb.29072\n- Collective pairwise classification for multi-way analysis of disease and drug data: https://doi.org/10.1142/9789814749411_0008\n\nTutorials\n---------\n\n- Hidden Genes: Understanding cancer data with matrix factorization, ACM XRDS: Crossroads: https://dl.acm.org/citation.cfm?id=2809623.2788526 [[Jupyter Notebook]](https://nbviewer.jupyter.org/github/marinkaz/nimfa-ipynb/blob/master/ICGC%20and%20Nimfa.ipynb)\n\n\u003cp align=\"center\"\u003e\n\u003cimg src=\"https://github.com/marinkaz/nimfa/blob/master/tutorial-diseases.png\" width=\"800\" align=\"center\"\u003e\n\u003c/p\u003e\n","funding_links":[],"categories":["Python"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmims-harvard%2Fnimfa","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmims-harvard%2Fnimfa","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmims-harvard%2Fnimfa/lists"}