{"id":34066473,"url":"https://github.com/satwik77/libnmf","last_synced_at":"2025-12-14T06:38:51.146Z","repository":{"id":62575903,"uuid":"115033693","full_name":"satwik77/libnmf","owner":"satwik77","description":"Optimization and Regularization variants of Non-negative Matrix Factorization (NMF)","archived":false,"fork":false,"pushed_at":"2018-10-19T12:02:11.000Z","size":80,"stargazers_count":33,"open_issues_count":2,"forks_count":3,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-09-17T18:43:08.043Z","etag":null,"topics":["non-negative-matrix-factorization","optimization","regularization"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/satwik77.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-12-21T18:08:45.000Z","updated_at":"2024-12-27T11:42:08.000Z","dependencies_parsed_at":"2022-11-03T18:58:33.202Z","dependency_job_id":null,"html_url":"https://github.com/satwik77/libnmf","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/satwik77/libnmf","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/satwik77%2Flibnmf","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/satwik77%2Flibnmf/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/satwik77%2Flibnmf/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/satwik77%2Flibnmf/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/satwik77","download_url":"https://codeload.github.com/satwik77/libnmf/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/satwik77%2Flibnmf/sbom","scorecard":{"id":801618,"data":{"date":"2025-08-11","repo":{"name":"github.com/satwik77/libnmf","commit":"3da4d98c2216c2e993667e591486129bd43b9a5c"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":1.7,"checks":[{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"SAST","score":0,"reason":"no SAST tool detected","details":["Warn: no pull requests merged into dev branch"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Dangerous-Workflow","score":-1,"reason":"no workflows found","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Pinned-Dependencies","score":-1,"reason":"no dependencies found","details":null,"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"Code-Review","score":0,"reason":"Found 0/14 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Token-Permissions","score":-1,"reason":"No tokens found","details":null,"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: MIT License: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'master'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"Vulnerabilities","score":0,"reason":"10 existing vulnerabilities detected","details":["Warn: Project is vulnerable to: PYSEC-2021-870 / GHSA-8rh6-h94m-vj54","Warn: Project is vulnerable to: PYSEC-2018-34 / GHSA-2fc2-6r4j-p65h","Warn: Project is vulnerable to: PYSEC-2021-856 / GHSA-5545-2q6w-2gh6","Warn: Project is vulnerable to: PYSEC-2019-108 / GHSA-9fq2-x9r6-wfmf","Warn: Project is vulnerable to: PYSEC-2018-33 / GHSA-cw6w-4rcx-xphc","Warn: Project is vulnerable to: PYSEC-2021-857 / GHSA-f7c7-j99h-c22f","Warn: Project is vulnerable to: GHSA-fpfv-jqm9-f5jm","Warn: Project is vulnerable to: PYSEC-2017-1 / GHSA-frgw-fgh6-9g52","Warn: Project is vulnerable to: PYSEC-2023-102","Warn: Project is vulnerable to: PYSEC-2023-114"],"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}}]},"last_synced_at":"2025-08-23T10:38:39.234Z","repository_id":62575903,"created_at":"2025-08-23T10:38:39.234Z","updated_at":"2025-08-23T10:38:39.234Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":27719930,"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","status":"online","status_checked_at":"2025-12-14T02:00:11.348Z","response_time":56,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["non-negative-matrix-factorization","optimization","regularization"],"created_at":"2025-12-14T06:38:50.303Z","updated_at":"2025-12-14T06:38:51.136Z","avatar_url":"https://github.com/satwik77.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# libNMF\n\n[![PyPI version shields.io](https://img.shields.io/pypi/v/libnmf.svg)](https://pypi.python.org/pypi/libnmf)  [![Build Status](https://travis-ci.org/satwik77/libnmf.svg?branch=master)](https://travis-ci.org/satwik77/libnmf) [![PyPI license](https://img.shields.io/pypi/l/ansicolortags.svg)](https://pypi.python.org/pypi/ansicolortags/)\n\nThe library contains implementations of different optimization and regularization variants of non-negative matrix factorization.\n\nList of algorithms implemented:\n1. Multiplicative Update Rule (nmf.py)\n2. Alternating Least Squares NMF (alsnmf.py)\n3. Graph Regularized NMF (gnmf.py)\n4. Probabilistc NMF (pnmf.py)\n5. Kernel NMF (knmf.py)\n6. Chambolle-Pock based first-order primal dual algo (fpdnmf.py)\n\n\n\n\n\n\n## Setup:\n\n#### Stable:\n\n```shell\n$ pip install -U libnmf\n```\n\n#### Dev:\n\nTo get the project's source code, clone the github repository:\n\n```shell\n$ git clone https://github.com/satwik77/libnmf.git\n```\n\nInstall VirtualEnv using the following (optional):\n\n```shell\n$ [sudo] pip install virtualenv\n```\n\nCreate and activate your virtual environment (optional):\n\n```shell\n$ virtualenv venv\n$ source venv/bin/activate\n```\n\nInstall all the required packages:\n\n```shell\n$ pip install -r requirements.txt\n```\n\nInstall the library by running the following command from the root directory of the repository:\n\n```shell\n$ python setup.py install\t\n```\n\n\n## Usage:\n\n```python\n\u003e\u003e\u003e import numpy as np\n\n\u003e\u003e\u003e # For Graph Regularized NMF\n\u003e\u003e\u003e from libnmf.gnmf import GNMF\n\u003e\u003e\u003e X = np.random.random((10,10))\n\u003e\u003e\u003e gnmf= GNMF(X, rank=4)\n\u003e\u003e\u003e gnmf.compute_factors(max_iter= 20, lmd= 0.3, weight_type='heat-kernel', param= 0.4)\n\n\u003e\u003e\u003e # For first-order primal-dual algo\n\u003e\u003e\u003e from libnmf.fpdnmf import FPDNMF\n\u003e\u003e\u003e fpdnmf= FPDNMF(X, rank=4)\n\u003e\u003e\u003e fpdnmf.compute_factors(max_iter=30, nditer=5)\n\u003e\u003e\u003e #print fpdnmf.W, fpdnmf.H, fpdnmf.div_error\n```\n\n\nRefer to examples/Simple-Usage.ipynb for more on usage.\n\n## References\n\n* [1] Lee, D. D., \u0026 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)\n\n* [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)\n\n* [3] Cai, D., He, X., Han, J., \u0026 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)\n\n* [4] Bayar, B., Bouaynaya, N., \u0026 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)\n\n* [5] Zhang, D., Zhou, Z. H., \u0026 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)\n\n* [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)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsatwik77%2Flibnmf","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsatwik77%2Flibnmf","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsatwik77%2Flibnmf/lists"}