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)
Authors
- Hana Sebia, Inria, AIstroSight
- Thomas Guyet, Inria, AIstroSight
- Mike Rye, Inria, AIstroSight
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 poetry which enables to create and set up a virtual environment suitable to run SWoTTeD
.
git clone https://gitlab.inria.fr/hsebia/swotted
## In case of the use of poetry
poetry install
poetry shell
SWoTTeD
is also available as a Python package. 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
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for swotted-1.0.2a3-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f63fd9ef3dbe8ace6b4781b62e7b385efd36a7df5f305f4cefc7f1c4514aeeff |
|
MD5 | 8e9beaac3d0d5018974fd71e0302c3d0 |
|
BLAKE2b-256 | 52057148be701f03b641a0317db91bcb37bd1b3e72d0b0ca0eca0336055b6a6b |