Skip to main content

Non-negative matrix factorization

Project description

BigNmf

Read the Docs PyPI version License: MIT

BigNmf (Big Data NMF) is a python package for performing single NMF and joint NMF algorithms. NMF (Non-negative matrix factorization) is a unsupervised classification algorithm.

Installation

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

pip3 install bignmf

Usage

The following is an example code snippet for running the nmf.

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)
model.run(trials, iter, verbose=0)
print(model.error)
model.cluster_data()
model.calc_consensus_matrices()
print(model.h_cluster)

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)
model = StandardNmf(data,k)
model.run(trials, iter, verbose=0)
print(model.error)
model.cluster_data()
model.calc_consensus_matrices()
print(model.h_cluster)

Here is the extensive documentation for more details.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Filename, size & hash SHA256 hash help File type Python version Upload date
bignmf-1.0.4-py3-none-any.whl (98.9 kB) Copy SHA256 hash SHA256 Wheel py3 Aug 5, 2018
bignmf-1.0.4.tar.gz (94.4 kB) Copy SHA256 hash SHA256 Source None Aug 5, 2018

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page