Skip to main content

Package implementing PLN models

Project description

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 the quickstart next.

🛠 Installation

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

Package installation

pip install pyPLNmodels

⚡️ Quickstart

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

import pyPLNmodels
from pyPLNmodels.models import PlnPCAcollection, Pln, ZIPln
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 = pca.best_model().transform()

Zero inflated Poisson Log normal Model (aka ZIPln)

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

👐 Contributing

Feel free to contribute, but read the CONTRIBUTING.md first. A public roadmap will be available soon.

⚡️ Citations

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

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

pyPLNmodels-0.0.71.tar.gz (1.7 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pyPLNmodels-0.0.71-py3-none-any.whl (3.6 kB view details)

Uploaded Python 3

File details

Details for the file pyPLNmodels-0.0.71.tar.gz.

File metadata

  • Download URL: pyPLNmodels-0.0.71.tar.gz
  • Upload date:
  • Size: 1.7 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.9.18

File hashes

Hashes for pyPLNmodels-0.0.71.tar.gz
Algorithm Hash digest
SHA256 29d8cb02ef7e86641ce569f8d01fc61b2274019ff7e8f8bdce638f1582928c90
MD5 f7cf2881f97b8a431dd096f3e5c7ee28
BLAKE2b-256 3cba46d9fa15efb72e74f8497f55ecafaca922dc9a9ba923e0d3d8eb40ee19c4

See more details on using hashes here.

File details

Details for the file pyPLNmodels-0.0.71-py3-none-any.whl.

File metadata

  • Download URL: pyPLNmodels-0.0.71-py3-none-any.whl
  • Upload date:
  • Size: 3.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.9.18

File hashes

Hashes for pyPLNmodels-0.0.71-py3-none-any.whl
Algorithm Hash digest
SHA256 f0958dcc205bf8494e9d0e873209a741188689c923008f53c1f54978c1dc85a1
MD5 82b61781069a4d158fd2a70e18c88ebb
BLAKE2b-256 c3177f0da93fddfc8748922e50770a1270ebf943611c6a3f8f855f22f13b9448

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