Metadata-Version: 2.1
Name: physioex
Version: 1.0.0.dev1
Summary: A python package for explainable sleep staging via deep learning
Author-email: Guido Gagliardi <guido.gagliardi@phd.unipi.it>
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: pyyaml==6.0.2
Requires-Dist: argparse
Requires-Dist: loguru==0.7.2
Requires-Dist: pkg_resources
Requires-Dist: some_other_dependency
Requires-Dist: boto3==1.35.3
Requires-Dist: botocore==1.35.3
Requires-Dist: braindecode==0.8.1
Requires-Dist: captum==0.7.0
Requires-Dist: dirhash==0.5.0
Requires-Dist: h5py==3.11.0
Requires-Dist: joblib==1.4.2
Requires-Dist: lightning==2.4.0
Requires-Dist: matplotlib==3.9.2
Requires-Dist: npy_append_array==0.9.16
Requires-Dist: numpy==2.1.1
Requires-Dist: pandas==2.2.3
Requires-Dist: paramiko==3.5.0
Requires-Dist: psg_utils==0.1.6
Requires-Dist: pyEDFlib==0.1.38
Requires-Dist: pytorch_lightning==2.4.0
Requires-Dist: pytorch_metric_learning==2.6.0
Requires-Dist: pyunpack==0.3
Requires-Dist: rarfile==4.2
Requires-Dist: requests==2.32.3
Requires-Dist: scikit_learn==1.5.2
Requires-Dist: scipy==1.14.1
Requires-Dist: seaborn==0.13.2
Requires-Dist: setuptools==72.1.0
Requires-Dist: torch==2.4.0
Requires-Dist: torchmetrics==1.4.1
Requires-Dist: tqdm==4.66.5
Requires-Dist: wfdb==4.1.2

<div style = "text-align: center;">
<img src="docs/assets/images/logo.svg" width = "250px", alt="PhysioEx Logo">

<h1> PhysioEx </h1>
</div>

![Python Version](https://img.shields.io/badge/python-3.7%2B-blue)
![PyPI Version](https://badge.fury.io/py/physioex.svg)

**PhysioEx ( Physiological Signal Explainer )** is a versatile python library tailored for building, training, and explaining deep learning models for physiological signal analysis. 

The main purpose of the library is to propose a standard and fast methodology to train and evalutate state-of-the-art deep learning architectures for physiological signal analysis, to shift the attention from the architecture building task to the explainability task. 

With PhysioEx you can simulate a state-of-the-art experiment just running the `train`, `test_model`  and `finetune` commands; evaluating and saving the trained model; and start focusing on the explainability task! 

## Supported deep learning architectures

- [Chambon2018](https://ieeexplore.ieee.org/document/8307462) model for sleep stage classification ( raw time series as input).
- [TinySleepNet](https://github.com/akaraspt/tinysleepnet) model for sleep stage classification (raw time series as input).
- [SeqSleepNet](https://arxiv.org/pdf/1809.10932.pdf) model for sleep stage classification (time-frequency images as input).

## Supported datasets

- [SHHS (Sleep Heart Health Study)](https://sleepdata.org/datasets/shhs): A multi-center cohort study designed to investigate the cardiovascular consequences of sleep-disordered breathing.
- [MROS (MrOS Sleep Study)](https://sleepdata.org/datasets/mros): A study focusing on the outcomes of sleep disorders in older men.
- [MESA (Multi-Ethnic Study of Atherosclerosis)](https://sleepdata.org/datasets/mesa): A study examining the prevalence, correlates, and progression of subclinical cardiovascular disease.
- [DCSM (Dreem Challenge Sleep Monitoring)](https://physionet.org/content/dreem/1.0.0/): A dataset from the Dreem Challenge for automatic sleep staging.
- [MASS (Montreal Archive of Sleep Studies)](https://massdb.herokuapp.com/en/): A comprehensive collection of polysomnographic sleep recordings.
- [HMC (Home Monitoring of Cardiorespiratory Health)](https://physionet.org/content/hmc-kinematics/1.0.0/): A dataset for the study of cardiorespiratory health using home monitoring devices.

For the public available datasets ( DCSM, HMC ) PhysioEx takes care of automatically download the data thanks to the `preprocess` command. The other datasets needs to be acquired first ( mostly on [NSSR](https://sleepdata.org) ) and then fetched by PhysioEx via the `preprocess` command.

## Installation guidelines

1. **Clone the Repository:**
```bash
   git clone https://github.com/guidogagl/physioex.git
   cd physioex
```
2. **Create a Virtual Environment (Optional but Recommended)**
```bash
    conda create -n physioex python==3.10
    conda activate physioex
    conda install pip
    pip install --upgrade pip  # On Windows, use `venv\Scripts\activate`
```
3. **Install Dependencies and Package in Development Mode**
```bash
    pip install -e .
```
