Metadata-Version: 2.1
Name: zisnmf
Version: 0.1.1
Summary: Zero-inflated Supervised Non-negative Matrix Factorization
Author: Feng Zeng
Author-email: zengfeng@xmu.edu.cn
Classifier: Programming Language :: Python :: 3
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Requires-Python: >=3.6
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: matplotlib>=3.9.2
Requires-Dist: numpy>=2.0.2
Requires-Dist: pandas>=2.2.2
Requires-Dist: pyro_ppl>=1.9.1
Requires-Dist: scanpy>=1.10.3
Requires-Dist: scikit_learn>=1.5.2
Requires-Dist: scipy>=1.13.1
Requires-Dist: seaborn>=0.13.2
Requires-Dist: setuptools>=73.0.1
Requires-Dist: torch>=2.3.1
Requires-Dist: tqdm>=4.66.5

# 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:
```bash
pip install .
```

## Usage

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

```python
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)
