a statsmodels implement based on pytorch
can perform single-cell gene differential expression analysis 1000X faster than R package.
- pandas
- statsmodels
- torch
import scpy
scpy.fit(x, y, family='poisson', device='cpu', **kwargs)
scpy.fit_batch(X, Y, family='negative_binomial', device='cpu', **kwargs)
Support specifying method, maxiter and other parameters in statsmodels optimizers
python -m scpy demo.py demo.csv -d 0,1,2,3,4,5,6,7
demo.py
args = { 'X': X, 'Y': Y, 'family': 'negative_binomial', 'xnames': xnames, 'yname': yname, 'kwargs': {} }
- Currently only supports 'poisson' and 'negative_binomial', add more distributions.
- Fix bug on Hessian matrix inversion.
- Automatically cache x and y in fit_batch.