This repository summarises the code made publicly available for the PainMonit Dataset (PMD), which can be found via the following link: PMD
The dataset comprises two parts: the heat-based PainMonit Experimental Dataset (PMED) and the physiotherapy-based PainMonit Clinical Dataset (PMCD). The code for the former can be found in the PMED/ directory, and the code for the latter can be found in the PMCD/ directory.
A more detailed description of the dataset can be found in the paper An Experimental and Clinical Physiological Signal Dataset for Automated Pain Recognition, which was published in Scientific Data and can be accessed via the following link.
-
Clone the project
git clone https://github.com/gouverneurp/PMD
-
Install Python (tested under Python 3.12).
-
Create a Python environment and activate it. Windows:
python -m venv venv .\venv\Scripts\activate
Linux:
python3 -m venv venv source venv/bin/activate -
Install the requirements
pip install -r requirements.txt
-
Go to the subdirectory PMED
cd PMED -
Place the PMED dataset (available under link) in the subdirectory dataset following the description in the README file there.
-
Run create_np_files.py to create a segmented dataset for machine learning. A numpy dataset composed of three files (X.npy, y.npy and subjects.npy) will be generated.
python create_np_files.py
-
After creating the segmented dataset, a Machine Learning pipeline can be applied. An example of such can be found in the following paper 'Explainable Artificial Intelligence (XAI) in Pain Research: Understanding the Role of Electrodermal Activity for Automated Pain Recognition'. The code is available on GitHub as well.
-
If you want to read in the original raw data files, you can do so in Python with the following code:
pd.read_csv(filename, sep=";", decimal=",")
where filename is the path to the file of one subject. Functions on how to read in the data can be found in the read_data.py script.
-
Functions on how the heater signal was cleaned can be found in the heater.py script.
-
Go to the subdirectory PMCD
cd PMCD -
Place the PMCD dataset (available under link) in the directories under dataset following the description in the README file there.
-
Run create_np_files.py to create a segmented dataset for machine learning. A Numpy dataset composed of three files (X.npy, y_heater.npy, y_covas.npy and subjects.npy) will be generated.
python create_np_files.py
-
If you want to want to read in the original raw data files, you can do so by using the functions in the read_data.py script:
python read_data.py
Bibtex entry:
@article{gouverneur2024experimental,
title={An Experimental and Clinical Physiological Signal Dataset for Automated Pain Recognition},
author={Gouverneur, Philip and Badura, Aleksandra and Li, Fr{\'e}d{\'e}ric and Bie{\'n}kowska, Maria and Luebke, Luisa and Adamczyk, Wac{\l}aw M and Szikszay, Tibor M and My{\'s}liwiec, Andrzej and Luedtke, Kerstin and Grzegorzek, Marcin and others},
journal={Scientific Data},
volume={11},
number={1},
pages={1051},
year={2024},
publisher={Nature Publishing Group UK London}
}