Skip to main content

Leaspy is a software package for the statistical analysis of longitudinal data.

Project description

pipeline status Documentation Status PyPI version

Leaspy - LEArning Spatiotemporal Patterns in Python

Leaspy is a software package for the statistical analysis of longitudinal data, particularly medical data that comes in a form of repeated observations of patients at different time-points.

Get started Leaspy

OS

  • Mac and Linux - check for windows

Dependencies

  • Python (>=3.6)
  • torch (>=1.2.0, <1.7)
  • numpy (>=1.16.6)
  • pandas (>=1.0.5)
  • scipy (>=1.5.4)
  • scikit-learn (>=0.21.3, <0.24)
  • joblib (>=0.13.2)
  • matplotlib (>=3.0.3)
  • statsmodels (>=0.12.1)

Installation

  1. Create a dedicated environment (optional):

Using conda

conda create --name leaspy python=3.7
conda activate leaspy

Or using pyenv

pyenv virtualenv leaspy
pyenv local leaspy
  1. Install leaspy pip install leaspy

Description

Leaspy is a software package for the statistical analysis of longitudinal data, particularly medical data that comes in a form of repeated observations of patients at different time-points. Considering these series of short-term data, the software aims at :

  • recombining them to reconstruct the long-term spatio-temporal trajectory of evolution
  • positioning each patient observations relatively to the group-average timeline, in term of both temporal differences (time shift and acceleration factor) and spatial differences (diffent sequences of events, spatial pattern of progression, ...)
  • quantifying impact of cofactors (gender, genetic mutation, environmental factors, ...) on the evolution of the signal
  • imputing missing values
  • predicting future observations
  • simulating virtual patients to unbias the initial cohort or mimis its characteristics

The software package can be used with scalar multivariate data whose progression can be modeled by a logistic shape, an exponential decay or a linear progression. The simplest type of data handled by the software are scalar data: they correspond to one (univariate) or multiple (multivariate) measurement(s) per patient observation. This includes, for instance, clinical scores, cognitive assessments, physiological measurements (e.g. blood markers, radioactive markers) but also imaging-derived data that are rescaled, for instance, between 0 and 1 to describe a logistic progression.

Further information

More detailed explanations about the models themselves and about the estimation procedure can be found in the following articles :

  • Mathematical framework: A Bayesian mixed-effects model to learn trajectories of changes from repeated manifold-valued observations. Jean-Baptiste Schiratti, Stéphanie Allassonnière, Olivier Colliot, and Stanley Durrleman. The Journal of Machine Learning Research, 18:1–33, December 2017. [Open Access PDF](https: //hal.archives-ouvertes.fr/hal-01540367).
  • Application to imaging data: Statistical learning of spatiotemporal patterns from longitudinal manifold-valued networks. I. Koval, J.-B. Schiratti, A. Routier, M. Bacci, O. Colliot, S. Allassonnière and S. Durrleman. MICCAI, September 2017. Open Access PDF
  • Application to imaging data: Spatiotemporal Propagation of the Cortical Atrophy: Population and Individual Patterns. Igor Koval, Jean-Baptiste Schiratti, Alexandre Routier, Michael Bacci, Olivier Colliot, Stéphanie Allassonnière, and Stanley Durrleman. Front Neurol. 2018 May 4;9:235. Open Access PDF
  • Intensive application for Alzheimer's Disease progression: AD Course Map charts Alzheimer's disease progression, I. Koval, A. Bone, M. Louis, S. Bottani, A. Marcoux, J. Samper-Gonzalez, N. Burgos, B. Charlier, A. Bertrand, S. Epelbaum, O. Colliot, S. Allassonniere & S. Durrleman, Under review Open Access PDF
  • www.digital-brain.org: website related to the application of the model for Alzheimer's disease

Supported features

  • fit : determine the population parameters that describe the disease progression at the population level
  • personalize : determine the individual parameters that characterize the individual scenario of biomarker progression
  • estimate : evaluate the biomarker values of a patient at any age, either for missing value imputation or future prediction
  • simulate : generate synthetic data from the model

Examples & Tutorials

The example/start/ folder contains a starting point if you want to launch your first scipts and notebook with the Leaspy package. You can find additional description in this Medium post (Warning: The plotter and the individual parameters described there have been deprecated since then)

Documentation

https://leaspy.readthedocs.io/en/latest/

Website

[Coming soon]

Support

The development of this software has been supported by the European Union H2020 program (project EuroPOND, grant number 666992, project HBP SGA1 grant number 720270), by the European Research Council (to Stanley Durrleman project LEASP, grant number 678304) and by the ICM Big Brain Theory Program (project DYNAMO).

Licence

The package is distributed under the GNU GENERAL PUBLIC LICENSE v3.

Contacts

http://www.aramislab.fr/

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

leaspy-1.0.3.tar.gz (494.0 kB view details)

Uploaded Source

Built Distribution

leaspy-1.0.3-py3-none-any.whl (547.2 kB view details)

Uploaded Python 3

File details

Details for the file leaspy-1.0.3.tar.gz.

File metadata

  • Download URL: leaspy-1.0.3.tar.gz
  • Upload date:
  • Size: 494.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.3.0 pkginfo/1.7.0 requests/2.24.0 setuptools/54.1.2 requests-toolbelt/0.9.1 tqdm/4.58.0 CPython/3.7.9

File hashes

Hashes for leaspy-1.0.3.tar.gz
Algorithm Hash digest
SHA256 9f94f2f2b06924cb9c0abb11f9aebc3bf3e255c87b1753a4417447144dbc6ae2
MD5 52e939a21b0c8f80bbecd230c1c1548d
BLAKE2b-256 aaaf940204ab27805c261944c3aa3ec15ff5ed0070c4ba378980c95e9cce1af0

See more details on using hashes here.

Provenance

File details

Details for the file leaspy-1.0.3-py3-none-any.whl.

File metadata

  • Download URL: leaspy-1.0.3-py3-none-any.whl
  • Upload date:
  • Size: 547.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.3.0 pkginfo/1.7.0 requests/2.24.0 setuptools/54.1.2 requests-toolbelt/0.9.1 tqdm/4.58.0 CPython/3.7.9

File hashes

Hashes for leaspy-1.0.3-py3-none-any.whl
Algorithm Hash digest
SHA256 7d486a20ba752cab94a48d2953dc33da45ff95221490bea52a8c6f7e398f1d88
MD5 fb0d7364c1d02ef86eb3213eaa3614e3
BLAKE2b-256 978d3e9798bff7f6b97cf38c3128c97cb41c8cbf17ff52b62847cfcaf7a62071

See more details on using hashes here.

Provenance

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page