This repository holds code for the Understanding Fairness and Explainability in Multimodal Approaches within Healthcare project. See the original project propsoal for more information.
Note: Only public or fake data are shared in this repository.
- The main code is found in the root of the repository (see Usage below for more information)
- The accompanying report is also available in the
reports
folder - More information about the code usage can be found in the model card
To get a local copy up and running follow these simple steps.
To clone the repo:
git clone https://github.com/nhsengland/mm-healthfair
To create a suitable environment:
- Use pip + requirements.txt
python -m venv _env
source _env/bin/activate
pip install -r requirements.txt
- Use poetry (recommended)
- Install poetry (see website for documentation)
- Navigate to project root directory
cd mm-healthfair
- Create environment from poetry lock file:
poetry install
- Run scripts using
poetry run python3 xxx.py
Note: There are known issues when installing the scispacy package for Python versions >3.10 or Apple M1 chips. Project dependencies strictly require py3.10 to avoid this, however OSX users may need to manually install nmslib with CFLAGS="-mavx -DWARN(a)=(a)" pip install nmslib
to circumvent this issue (see open issue nmslib/nmslib#476).
This repository contains code used to extract and preprocess demographic, time-series and clinical notes from MIMIC-IV v2.2. Additionally, it includes the model architectures and training scripts used to train multimodal models on different modalities and generate the results described in the report.
- Preprocessed features from MIMIC-IV 2.2
- Trained models
- Notebook exploring the dataset and visualising results
Seeds have been set to reproduce the results in the report.
The MIMIC-IV dataset (v2.2) can be downloaded from PhysioNet.org. This project made use of three modules:
- Hosp: hospital level data for patients: labs, micro, and electronic medication administration
- ED: data from the emergency department
- Notes: deidentified free-text clinical notes
Further information can be found in PhysioNet's documentation.
See the repo issues for a list of proposed features (and known issues).
Contributions are what make the open source community such an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated.
- Fork the Project
- Create your Feature Branch (
git checkout -b feature/AmazingFeature
) - Commit your Changes (
git commit -m 'Add some AmazingFeature'
) - Push to the Branch (
git push origin feature/AmazingFeature
) - Open a Pull Request
See CONTRIBUTING.md for detailed guidance.
Unless stated otherwise, the codebase is released under the MIT Licence. This covers both the codebase and any sample code in the documentation.
See LICENSE for more information.
The documentation is © Crown copyright and available under the terms of the Open Government 3.0 licence.
To find out more about the Analytics Unit visit our project website or get in touch at [email protected].