PLN-team / pyPLNmodels

Blazing fast inference of PLN models built on top of Python and PyTorch

Home Page:https://bbatardiere.pages.mia.inra.fr/pyplnmodels/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

PLNmodels: Poisson lognormal models

The Poisson lognormal model and variants can be used for analysis of mutivariate count data. This package implements efficient algorithms extracting meaningful data from difficult to interpret and complex multivariate count data. It has been built to scale on large datasets even though it has memory limitations. Possible fields of applications include

  • Genomics (number of times a gene is expressed in a cell)
  • Ecology (species abundances) One main functionality is to normalize the count data to obtain more valuable data. It also analyse the significance of each variable and their correlation as well as the weight of covariates (if available).

Getting started

The getting started can be found here. If you need just a quick view of the package, see next.

Installation

pyPLNmodels is available on pypi. The development version is available on GitHub.

Package installation

pip install pyPLNmodels

Usage and main fitting functions

The package comes with an ecological data set to present the functionality

import pyPLNmodels
from pyPLNmodels.models import PlnPCAcollection, Pln
from pyPLNmodels.oaks import load_oaks
oaks = load_oaks()

Unpenalized Poisson lognormal model (aka PLN)

pln = Pln.from_formula("counts ~ 1  + tree + dist2ground + orientation ", data = oaks, take_log_offsets = True)
pln.fit()
print(pln)
transformed_data = pln.transform()

Rank Constrained Poisson lognormal for Poisson Principal Component Analysis (aka PLNPCA)

pca =  PlnPCAcollection.from_formula("counts ~ 1  + tree + dist2ground + orientation ", data = oaks, take_log_offsets = True, ranks = [3,4,5])
pca.fit()
print(pca)
transformed_data = pln.transform()

References

Please cite our work using the following references:

  • J. Chiquet, M. Mariadassou and S. Robin: Variational inference for probabilistic Poisson PCA, the Annals of Applied Statistics, 12: 2674–2698, 2018. link

About

Blazing fast inference of PLN models built on top of Python and PyTorch

https://bbatardiere.pages.mia.inra.fr/pyplnmodels/

License:MIT License


Languages

Language:Jupyter Notebook 94.7%Language:Python 5.3%Language:Shell 0.0%