Data and code used in the research
Interpretable Machine Learning for the Prediction of the Death Risk in Patients with Acute Diquat Poisoning
This study aims to establish and validate predictive models based on novel machine learning for the death risk in patients with acute diquat (DQ) poisoning and to explain the predictive models using Shapley Additive Explanations (SHAP). We analyzed the initial clinical data of 201 patients admitted for deliberate oral intake of DQ from February 2018 to August 2023. Machine learning methods such as Logistic Regression, Random Forest, Support Vector Machine (SVM), and Gradient Boosting were applied for building prediction models, and SHAP was used to provide an intuitive explanation of the death risk.
We have uploaded the study data and main scripts, which include:
- Data:
dq_data
- Model Evaluation Metrics:
model_metrics.ipynb
- ROC Curve:
roc_curve.ipynb
- Calibration Curve:
calibration_curve.ipynb
- Clinical Decision Curve Analysis (DCA):
dca_curve.ipynb
- SHAP Summary:
shap_summary.ipynb
- SHAP Explanation:
shap_explain.ipynb
-
Clone the repository:
git clone https://github.com/liuzheng01/dq_data.git cd dq_data
-
Install the required dependencies:
pip install -r requirements.txt
-
Run the model evaluation metrics:
jupyter notebook model_metrics.ipynb
-
Plot the ROC curve:
jupyter notebook roc_curve.ipynb
-
Plot the calibration curve:
jupyter notebook calibration_curve.ipynb
-
Perform Clinical Decision Curve Analysis (DCA):
jupyter notebook dca_curve.ipynb
-
Generate SHAP summary:
jupyter notebook shap_summary.ipynb
-
Perform SHAP explanation:
jupyter notebook shap_explain.ipynb
The study found that the Random Forest model had the best predictive performance with an AUC of 0.98. SHAP analysis identified key features such as Cr, PaCO2, DQ dose, lactic acid, and white blood cell count (WBC) as important factors in predicting the death risk in patients with acute DQ poisoning.
For any questions or further information, please contact:
- Zheng Liu: zhengliu@cmu.edu.cn
This project is licensed under the MIT License.
This research was supported by the National Natural Science Foundation of China (#81971821).