Skip to main content

BigNmf

Build Status Read the Docs PyPI version License: MIT

BigNmf (Big Data NMF) is a python 3 package for conducting analysis using NMF algorithms.

NMF Introduction

NMF (Non-negative matrix factorization) factorizes a non-negative input matrix into non-negative factors. The algorithm has an inherent clustering property and has been gaining attention in various fields especially in biological data analysis.

Brunet et al in their paper demonstrated NMF's superior capability in clustering the leukemia dataset compared to standard clustering algorithms like Hierarchial clustering and Self-organizeing maps.

Available algorithms

The following are the algorithms currently available. If you would like to know more about the algorithm, the links below lead to their papers of origin.

Installation

This package is available on the PyPi repository. Therefore you can install, by running the following.

pip3 install bignmf

Usage

The following examples illustrate typical usage of the algorithm.

1. Single NMF

from bignmf.datasets.datasets import Datasets
from bignmf.models.snmf.standard import StandardNmf

Datasets.list_all()
data=Datasets.read("SimulatedX1")
k = 3
iter =100
trials = 50

model = StandardNmf(data,k)

# Runs the model
model.run(trials, iter, verbose=0)
print(model.error)

# Clusters the data
model.cluster_data()
print(model.h_cluster)

#Calculates the consensus matrices
model.calc_consensus_matrices() 
print(model.consensus_matrix_w)

2. Joint NMF

from bignmf.models.jnmf.integrative import IntegrativeJnmf
from bignmf.datasets.datasets import Datasets

Datasets.list_all()
data_dict = {}
data_dict["sim1"] = Datasets.read("SimulatedX1")
data_dict["sim2"] = Datasets.read("SimulatedX2")

k = 3
iter =100
trials = 50
lamb = 0.1

model = IntegrativeJnmf(data_dict, k, lamb)
# Runs the model
model.run(trials, iter, verbose=0)
print(model.error)

# Clusters the data
model.cluster_data()
print(model.h_cluster)

#Calculates the consensus matrices
model.calc_consensus_matrices() 
print(model.consensus_matrix_w)

Here is the extensive documentation for more details.

Metadata

Release files for bignmf 1.0.5

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for bignmf 1.0.5
File Size Uploaded
bignmf-1.0.5.tar.gz 95.5 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for bignmf 1.0.5
File Interpreter ABI Platform
bignmf-1.0.5-py3-none-any.whl Python 3 none any Details

Total release size: 195.1 kB

Release files / bignmf-1.0.5.tar.gz

Download URL bignmf-1.0.5.tar.gz
Size 95.5 kB
Tags Source
SHA-256 checksum
How to use checksums
b03e3316cdc402e07f8906ca9f969505ee7045a54acf1580fe357d3353f64756
BLAKE2b-256 checksum
How to use checksums
cb591c440b30762fa24409ca427ba220de29196708c5c0d3cb2189c1469a20de
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.11.0 pkginfo/1.4.2 requests/2.19.1 setuptools/40.0.0 requests-toolbelt/0.8.0 tqdm/4.24.0 CPython/3.7.0

Release files / bignmf-1.0.5-py3-none-any.whl

Download URL bignmf-1.0.5-py3-none-any.whl
Size 99.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
0ffc85ca9e85df0bda52947fdf3604b3e10fdd1c4ee7e89bbe023d529a1d27fa
BLAKE2b-256 checksum
How to use checksums
3ec318178ae33fdbe4311f5b80259491a52fc9f77c79740a787c1fef13f76510
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.11.0 pkginfo/1.4.2 requests/2.19.1 setuptools/40.0.0 requests-toolbelt/0.8.0 tqdm/4.24.0 CPython/3.7.0

Release history Release notifications | RSS feed

This release

1.0.5 This release

2 release files

1.0.4

2 release files

1.0.3

2 release files

1.0.2

2 release files

1.0.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page