tnmf

Transform-Invariant Non-Negative Matrix Factorization

https://github.com/emdgroup/tnmf

Science Score: 44.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
    Found CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
    Found .zenodo.json file
  • DOI references
  • Academic publication links
  • Committers with academic emails
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (14.6%) to scientific vocabulary

Keywords

data-science invariant-features machine-learning matrix-factorization python source-separation sparse-coding tensor-factorization
Last synced: 6 months ago · JSON representation ·

Repository

Transform-Invariant Non-Negative Matrix Factorization

Basic Info
Statistics
  • Stars: 7
  • Watchers: 4
  • Forks: 2
  • Open Issues: 7
  • Releases: 0
Topics
data-science invariant-features machine-learning matrix-factorization python source-separation sparse-coding tensor-factorization
Created almost 5 years ago · Last pushed over 4 years ago
Metadata Files
Readme Changelog Contributing License Citation

README.md

Flake8 Linter Pylint Linter Pytest and Coverage Build Documentation Publish to PyPI Open in Streamlit

Logo

Transform-Invariant Non-Negative Matrix Factorization

A comprehensive Python package for Non-Negative Matrix Factorization (NMF) with a focus on learning transform-invariant representations.

The packages supports multiple optimization backends and can be easily extended to handle application-specific types of transforms.

General Introduction

A general introduction to Non-Negative Matrix Factorization and the purpose of this package can be found on the corresponding GitHub Pages.

Installation

For using this package, you will need Python version 3.7 (or higher). The package is available via PyPI.

Installation is easiest using pip:

pip install tnmf

Demos and Examples

The package comes with a streamlit demo and a number of examples that demonstrate the capabilities of the TNMF model. They provide a good starting point for your own experiments.

Online Demo

Without requiring any installation, the demo is accessible via streamlit sharing.

Local Execution

Once the package is installed, the demo and the examples can be conveniently executed locally using the tnmf command: * To execute the demo, run tnmf demo. * A specific example can be executed by calling tnmf example <example_name>.

To show the list of available examples, type tnmf example --help.

License

Copyright (c) 2021 Merck KGaA, Darmstadt, Germany

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

The full text of the license can be found in the file LICENSE in the repository root directory.

Usage and Citation

If you use this software, please cite us using the information in CITATION.cff.

Contributing

Contributions to the package are always welcome and can be submitted via a pull request. Please note, that you have to agree to the Contributor License Agreement to contribute.

Working with the Code

To checkout the code and set up a working environment with all required Python packages, execute the following commands:

git checkout https://github.com/emdgroup/tnmf.git ./tnmf cd tmnf python3 -m virtualenv .venv source .venv/bin/activate pip install --upgrade pip pip install -r requirements.txt

Now, you should be able to execute the unit tests by calling pytest to verify that the code is running as expected.

Pull Requests

Before creating a pull request, you should always try to ensure that the automated code quality and unit tests do not fail. This section explains how to run them locally to understand and fix potential issues.

Code Style and Quality

Code style and quality are checked using flake8 and pylint. To execute them, change into the repository root directory, run the following commands and inspect their output:

flake8 pylint tnmf

In order for a pull request to be accaptable, no errors may be reported here.

Unit Tests

Automated unit tests reside inside the folder tnmf/tests. They can be executed via pytest by changing into the repository root directory and running

pytest

Debugging potential failures from the command line might be cumbersome. Most Python IDEs, however, also support pytest natively in their debugger. Again, for a pull request to be acceptable, no failures may be reported here.

Code Coverage

Code coverage in the unit tests is measured using coverage. A coverage report can be created locally from the repository root directory via

coverage run coverage combine coverage report

This will output a concise table with an overview of python files that are not fully covered with unit tests along with the line numbers of code that has not been executed. A more detailed, interactive report can be created using

coverage html

Then, you can open the file htmlcov/index.html in a web browser of your choice to navigate through code annotated with coverage data. Required overall coverage to is configured in setup.cfg, under the key fail_under in section [coverage:report].

Building the Documentation

To build the documentation locally, change into the doc subdirectory and run make html. Then, the documentation resides at doc\_build\html\index.html.

Owner

  • Name: EMD Group
  • Login: emdgroup
  • Kind: organization
  • Email: github-admin@merckgroup.com
  • Location: Germany

Citation (CITATION.cff)

cff-version: 1.2.0
authors: 
  -
    affiliation: "Merck KGaA, Darmstadt, Germany"
    family-names: Šošić
    given-names: Adrian
    orcid: https://orcid.org/0000-0003-2845-6635
  -
    affiliation: "Merck KGaA, Darmstadt, Germany"
    family-names: Winkel
    given-names: Mathias
    orcid: https://orcid.org/0000-0002-0345-9701
license: "Apache-2.0"
message: "If you use this software, please cite it using these metadata."
url: "https://emdgroup.github.io/tnmf/"
repository-code: "https://github.com/emdgroup/tnmf"
title: "Transform-Invariant Non-Negative Matrix Factorization"
date-released: 2021-07-12

GitHub Events

Total
  • Watch event: 1
Last Year
  • Watch event: 1

Committers

Last synced: almost 3 years ago

All Time
  • Total Commits: 342
  • Total Committers: 3
  • Avg Commits per committer: 114.0
  • Development Distribution Score (DDS): 0.433
Top Committers
Name Email Commits
Mathias Winkel m****l@m****m 194
Adrian Sosic a****c@m****m 137
Mathias d****y@u****m 11
Committer Domains (Top 20 + Academic)

Issues and Pull Requests

Last synced: 6 months ago

All Time
  • Total issues: 11
  • Total pull requests: 50
  • Average time to close issues: 29 days
  • Average time to close pull requests: 8 days
  • Total issue authors: 2
  • Total pull request authors: 2
  • Average comments per issue: 0.18
  • Average comments per pull request: 0.58
  • Merged pull requests: 47
  • Bot issues: 0
  • Bot pull requests: 0
Past Year
  • Issues: 0
  • Pull requests: 0
  • Average time to close issues: N/A
  • Average time to close pull requests: N/A
  • Issue authors: 0
  • Pull request authors: 0
  • Average comments per issue: 0
  • Average comments per pull request: 0
  • Merged pull requests: 0
  • Bot issues: 0
  • Bot pull requests: 0
Top Authors
Issue Authors
  • dasmy (7)
  • AdrianSosic (4)
Pull Request Authors
  • dasmy (33)
  • AdrianSosic (17)
Top Labels
Issue Labels
enhancement (3) bug (1) question (1)
Pull Request Labels

Packages

  • Total packages: 1
  • Total downloads:
    • pypi 20 last-month
  • Total dependent packages: 0
  • Total dependent repositories: 1
  • Total versions: 3
  • Total maintainers: 2
pypi.org: tnmf

Transform-Invariant Non-Negative Matrix Factorization

  • Versions: 3
  • Dependent Packages: 0
  • Dependent Repositories: 1
  • Downloads: 20 Last month
Rankings
Dependent packages count: 10.1%
Forks count: 19.2%
Stargazers count: 20.4%
Dependent repos count: 21.6%
Average: 25.0%
Downloads: 53.6%
Maintainers (2)
Last synced: 6 months ago

Dependencies

requirements.txt pypi
  • coverage ==5.5
  • flake8 ==3.9.1
  • flake8-bandit ==2.1.2
  • flake8-bugbear ==21.4.3
  • flake8-deprecated ==1.3
  • flake8-executable ==2.1.1
  • m2r2 ==0.2.7
  • matplotlib ==3.3.3
  • more-itertools ==8.6.0
  • numpy ==1.19.4
  • opt-einsum ==3.3.0
  • pylint ==2.8.2
  • pytest ==6.2.3
  • scipy ==1.5.4
  • sphinx ==3.5.4
  • sphinx-autoapi ==1.8.1
  • sphinx-rtd-theme ==0.5.2
  • streamlit ==0.87.0
  • torch ==1.8.1