A tutorial for establishing an ensemble model to stratify patients with acute myeloid leukemia (AML) into three risk groups based on tabular non-clinician-initiated data.
The performance of the model is compared to the European LeukemiaNet (ELN) risk stratification system.
The tabular data used in this tutorial is from the paper: Unified classification and risk-stratification in Acute Myeloid Leukemia.
- NCRI cohort (for training and validation)
- SG cohort (for testing, external cohort).
If you don't have GPU, try using Google Colab.
Install the packages
pip3 install -r requirements.txt
The tutorial is divided into three parts:
- Feature selection
- Data normalization
- Model selection: random forest, xgboost
- Hyperparameter optimizer: hyperopt
- Ensemble: loss-based weighting
- Performance metrics: Accuracy, F1-score
- Visualization: Confusion matrix
- Survival Analysis: Kaplan-Meier estimator, C-index
โโโ dataset : row data
โ โโโ NCRI.tsv : NCRI cohort (for training and validation)
โ โโโ SG.tsv : SG cohort (for testing, external cohort)
โ
โโโ utils: utility functions
โ โโโ hyperparameters
โ โ โโโ hyperoptimizer.py : hyperparameter optimizer
โ โ โโโ space.py : hyperparameters spaces for each model
| โโโ aml_spliter.py : split and normalize the dataset into training, validation set
| โโโ get_image_bytes.py : plot and convert confusion matrix to bytes
| โโโ KM_survival_analysis.py : plot the survival curve and calculate the p-value
| โโโ selected_features.py : feature selected in the study
|
โโโ tutorial.ipynb: tutorial (not yet provided)
|
(The tutorial will produce the following files)
|
โโโ data_preprocessed : preprocessed data
โ โโโ NCRI.csv
โ โโโ SG.csv
|
โโโ ESB_result
โโโ best_trial : store the best parameters of each model
โโโ models : store each model with the best parameters and weights of each model
โโโ prediction : store the predictions of each model
โโโ train : store the predictions of the training set
โโโ validation : store the predictions of the validation set
โโโ external : store the predictions of the test set
Follow the step by step in tutorial.ipynb (not yet provided)