| title | emoji | colorFrom | colorTo | sdk | sdk_version | python_version | suggested_hardware | app_file | pinned | license |
|---|---|---|---|---|---|---|---|---|---|---|
Shuntclf |
🚀 |
blue |
blue |
gradio |
5.35.0 |
3.11 |
cpu-basic |
shuntclf/web/gradio_app.py |
false |
mit |
This repository contains the code used to create the machine learning models described in the study "Machine learning algorithms used for the prediction of chronic shunt-dependent hydrocephalus after spontaneous subarachnoid hemorrhage" by M. Gollwitzer and colleagues. Our research aims to identify early predictors of chronic shunt-dependent hydrocephalus to improve clinical outcomes. We employ several machine learning techniques to enhance the prediction of this condition.
The dataset is located at data/dataset.csv and includes features such as patient age at diagnosis, sex, Hunt & Hess grade, Fisher grade, presence of a central nervous system (CNS) infection, external ventricular drainage (EVD) placement, aneurysm characteristics, and treatment methods. It was compiled from the medical records of 510 patients who were treated for spontaneous subarachnoid hemorrhage (SAH) at our institution from January 2013 to December 2018 and met specific inclusion criteria related to SAH diagnosis and outcome data availability. Data collection was retrospective, with radiologic findings assessed by a single neuro-radiologist in a blinded fashion.
| Variable Name | Description |
|---|---|
age_diagnose |
Age of the patient at the time of diagnosis. |
sex |
Sex of the patient (male or female). |
hunt_hess |
Hunt and Hess grading of the hemorrhage to assess severity. |
fisher |
Fisher scale score, which predicts the risk of delayed cerebral ischemia based on the amount of blood detected on a CT scan. |
cns_infection |
Presence (1) or absence (0) of a central nervous system infection. |
EVD |
External ventricular drainage placement (1 if placed, 0 if not). |
aneurysm |
Presence (1) or absence (0) of an aneurysm. |
aneurysm_location |
Location of the aneurysm, e.g., MCA (Middle Cerebral Artery), ACom (Anterior Communicating Artery). |
aneurysm_diameter |
The maximum diameter of the aneurysm (millimeters). |
aneurysm_height |
The maximum height of the aneurysm (millimeters). |
aneurysm_treatment |
Treatment method for the aneurysm, e.g., coil or clip. |
shunt |
Whether a shunt was required (1) or not (0). This is the target variable throughout our study. |
The Python environment for running the analysis can be set up using either Poetry or pip:
- For Poetry, use the configuration in pyproject.toml.
- For pip, install dependencies from requirements.txt.
Run the training script located at shuntclf/main.py.
This script will train the classifiers using nested cross-validation. The results are saved to output/current/ including:
- report.csv: Contains the performance metrics for predictive models for shunt implantation.
- feature_importance.json: Contains the feature importance metrics, including coefficients and odds ratios for the logistic regression model.
For interactive model predictions, start the Gradio web application at shuntclf/web/gradio_app.py.
This application is also hosted online at: https://huggingface.co/spaces/risc42/shuntclf
- The source code of this project is licensed under the MIT License.
- The dataset provided in data/dataset.csv is licensed under the Creative Commons Attribution 4.0 International License. See the data/LICENSE-DATA.txt file for more details.