Skip to main content

A tensor decomposition model extracting temporal phenotypes

Project description

SWoTTeD : An Extension of Tensor Decomposition to Temporal Phenotyping

This repository contains the implementation of SWoTTeD (Sliding Window for Temporal Tensor Decomposition)

Illustration of SwoTTeD Decomposition

Authors

Overview

SWoTTeD is a tensor decomposition framework to extract temporal phenotypes from structured data. Most recent decomposition models allow extracting phenotypes that only describe snapshots of typical profiles, also called daily phenotypes. However, SWoTTeD extends the notion of daily phenotype into temporal phenotype describing an arrangement of features over a time window.

The capabilities of the SWoTTeD model are illustrated in the example notebook.

This code implements the SWoTTeD as a PyTorch Lightning module that you can embed in you own architecture. The SWoTTeD module enables:

  • to discover phenotypes through the decomposition of a 3D tensor (with dimensions: patients, features and time). To deal with patient' data having different duration, the dataset is a collection of pathways (2D matrices);
  • to project new patient pathways on discovered phenotypes;
  • to predict next events in a pathways.

More documentation about this project and how to use the model is available here: https://hsebia.gitlabpages.inria.fr/swotted/.

How to install

The pyproject.toml is the project configuration file for hatchling which enables to create and set up a virtual environment suitable to run SWoTTeD.

git clone https://gitlab.inria.fr/hsebia/swotted

cd swotted
pip install -e .

SWoTTeD is also available on the Python Package Index (PyPI). In this case, you will only have the model (but not the tests, including the random generator of random tensors with hidden patterns). See the First run example in the documentation in this case.

pip install swotted

How to cite

@article{sebia2024swotted,
  title={SWoTTeD: an extension of tensor decomposition to temporal phenotyping},
  author={Sebia, Hana and Guyet, Thomas and Audureau, Etienne},
  journal={Machine Learning},
  pages={1--42},
  year={2024},
  publisher={Springer}
}

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

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

swotted-1.0.3-py3-none-any.whl (21.7 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: swotted-1.0.3-py3-none-any.whl
  • Upload date:
  • Size: 21.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.3

File hashes

Hashes for swotted-1.0.3-py3-none-any.whl
Algorithm Hash digest
SHA256 554235edc318c9d3b4efe58feac46f97e9f7e8b7983523139fc338f785f96c90
MD5 d9ba0085acd292915862711b30f34092
BLAKE2b-256 7cff5e0c0150cac3a73085e0d6301a3c49f19c8fe1ee55a44c0f105caa65b7ce

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