https://github.com/bobaubouin/hypotension_pred

Use data-based approach to predict intra-operative hypotension.

https://github.com/bobaubouin/hypotension_pred

Science Score: 26.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
    Found .zenodo.json file
  • DOI references
  • Academic publication links
  • Academic email domains
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (14.7%) to scientific vocabulary
Last synced: 10 months ago · JSON representation

Repository

Use data-based approach to predict intra-operative hypotension.

Basic Info
  • Host: GitHub
  • Owner: BobAubouin
  • License: gpl-3.0
  • Language: Jupyter Notebook
  • Default Branch: main
  • Size: 23.6 MB
Statistics
  • Stars: 0
  • Watchers: 1
  • Forks: 0
  • Open Issues: 3
  • Releases: 0
Created over 2 years ago · Last pushed about 1 year ago
Metadata Files
Readme License

README.md

Hypotension_pred

Use a data-based approach to predict intra-operative hypotension.

Installation

Use a new virtual env and Python 3.11 (with pyenv) for maximal compatibility.

bash git clone https://github.com/BobAubouin/hypotension_pred hp_pred cd hp_pred pip install .

Dev / Contribution

In addition, you can add the optional build dev. So you will download the Python packages required to develop the project (unit test, linter, formatter).

bash git clone https://github.com/BobAubouin/hypotension_pred hp_pred cd hp_pred pip install -e .[dev]

Use

Download raw data from VitalDB

The data used are from the VitalDB open dataset. You must read the Data Use Agreement before using it.

To download the data you can use the package's command python -m hp_pred.dataset_download. The help command outputs the following:

```bash usage: dataset_download.py [-h] [-l {CRITICAL,FATAL,ERROR,WARN,WARNING,INFO,DEBUG,NOTSET}] [-s GROUPSIZE] [-o OUTPUTFOLDER]

Download the VitalDB data for hypertension prediction.

options: -h, --help show this help message and exit -l {CRITICAL,FATAL,ERROR,WARN,WARNING,INFO,DEBUG,NOTSET}, --loglevelname {CRITICAL,FATAL,ERROR,WARN,WARNING,INFO,DEBUG,NOTSET} The logger level name to generate logs. (default: INFO) -s GROUPSIZE, --groupsize GROUPSIZE Amount of cases dowloaded and processed. (default: 950) -o OUTPUTFOLDER, --outputfolder OUTPUTFOLDER The folder to store the data and logs. (default: data) ```

Create the segmented dataset

The class hp_pred.databuilder.DataBuilder is used to create the segmented dataset with a sliding window approach. An example of use is given in the scripts/dataset_build/base_dataset.py scripts. If you do not want to use features extracted using linear regression you can check the scripts/dataset_build/signal_dataset.py script.

Recreate JBHI results

The results associated with our paper can be replicated using the version of the git tagged jbhi_XP.

  • First download data from VitalDB using the command python -m hp_pred.dataset_download. It will download the raw data in the data/cases foler.
  • Then create the segmented dataset running the script scripts/dataset_build/30_s_dataset.py. It will create a new folder in data/datasets with the segmented data.
  • Train the XGB model using the script scripts/experiments/train_model.py, approximately 1h. It will save the model in the data/models folder.
  • Finally, you can show the results using the notebook scripts/experiments/show_results.ipynb.
  • Study of the leading time influence can be done using the notebook scripts/experiments/studyleading_time.ipynb.

Results might slightly differ due to the randomness of the model. Note that the results associated with data from Grenoble Hospital can not be replicated as the data is not public.

Citation

If you use this code in your research, please cite our paper.

Owner

  • Name: Bob Aubouin--Pairault
  • Login: BobAubouin
  • Kind: user
  • Location: Grenoble
  • Company: Gipsa-lab

PhD Student at Gipsa-Lab on the subject "Data-based anesthesia process modelling for online monitoring and prediction"

GitHub Events

Total
  • Delete event: 4
  • Push event: 78
  • Create event: 4
Last Year
  • Delete event: 4
  • Push event: 78
  • Create event: 4

Dependencies

pyproject.toml pypi
  • aiohttp ==3.9.3
  • dask ==2024.2.1
  • fastparquet ==2024.2.0
  • jinja2 ==3.1.3
  • matplotlib ==3.5.2
  • numpy ==1.26
  • optuna ==3.5.0
  • pandas ==2.1.3
  • scikit-learn ==1.4.1.post1
  • shap ==0.44.1
  • tqdm ==4.66.1
  • vitaldb ==1.4.7
  • xgboost ==2.0.3