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 zisnmf

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.2.tar.gz (14.9 kB view details)

Uploaded Source

File details

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

File metadata

  • Download URL: zisnmf-0.1.2.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.2.tar.gz
Algorithm Hash digest
SHA256 12d5065808f5e8fdecaa4b52c0ab91ae3831040f4ff07fe5169afdff328d1c94
MD5 823dea4751ea1728919a5cfbf4e7ac81
BLAKE2b-256 37801fea1a342a2c221533da368e7a2f393dc68aab6fb5faf8c21f91fe4c4cc5

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