Skip to main content

Zero-inflated Supervised Non-negative Matrix Factorization

Project description

LSNMF

This package implements Zero-inflated Supervised Non-negative Matrix Factorization (ZISNMF) for Python using PyTorch. ZISNMF is a supervised matrix factorization method that can discover marker genes associated with specific contexts such as cell types and disease states from single-cell RNA-seq data.

Installation

Users can download the code and install it using pip:

pip install .

Usage

The usage of zisnmf is similar to scikit-learn's NMF:

from zisnmf import ZISNMF

# Load your data matrix X and label matrix L
# ...

# Create a LSNMF instance
model = ZISNMF(n_cells, n_features, n_classes, n_extra_states,  zero_inflated=True, device='cuda')

# Fit the model
num_epochs = 30
batch_size = 2048
learning_rate = 0.001
alpha = 0.2
W, H = model.fit_transform(X, L, num_epochs=num_epochs, batch_size=batch_size, learning_rate=learning_rate, alpha=alpha)

Project details


Download files

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

Source Distribution

zisnmf-0.1.1.tar.gz (14.9 kB view details)

Uploaded Source

File details

Details for the file zisnmf-0.1.1.tar.gz.

File metadata

  • Download URL: zisnmf-0.1.1.tar.gz
  • Upload date:
  • Size: 14.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.9.19

File hashes

Hashes for zisnmf-0.1.1.tar.gz
Algorithm Hash digest
SHA256 8eb35e5d4badaba6c2d69f286d53f8944fc0e9d33efc4d0dc73490e45cde9c43
MD5 947346d5a7109d7dd688562c946a5ace
BLAKE2b-256 efe6b77af0eaba91a0a17be4e4c03cbc3cc4da140653cc75b9e5f8d45ec173c3

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page