This repository contains the code for benchmarking uncertainty quantification methods in drug response prediction using the GDSC database, and for leveraging the estiamtes using various applications.
## Installation
Requires Python >= 3.9.
```bash
pip install -e .
This installs uadr as an editable package along with its dependencies (PyTorch, PyTorch Lightning, scikit-learn, etc.). For the SHAP analysis scripts, also install:
pip install -e ".[shap]"The experiments use the GDSC drug response database. Processed data with the right structure is available at: Zenodo
python examples/cross_validation_models.py --model_type pnne --cv_type cell_line_cold_start --scaling_mode z_normSupported model types: pnn(Guassian NN), pnne (Gaussian NN Ensemble), mcd (MCDropout NN), qfn (Quantile NN), br (Bayesian Ridge), rf (Random Forest).
python examples/case_specific_finetune.py --run_id my_run --scaling_mode z_normcd examples/XAI_drivers
python XAI_train_model.py
python XAI_shap_analysis.pyAll figure scripts read results from examples/data/experiments/ and write to figure_code/figures/. Run any script from the repository root:
python figure_code/prediction_performance_figures.py
python figure_code/uncertainty_performance_figures.py
python figure_code/OOD_figures.py
python figure_code/tissue_analysis_figures.py
python figure_code/case_specific_fine_tuning_figures.py
python figure_code/XAI_drivers_figures.py
python figure_code/uncertainty_prediction_illustration_figure.py
python figure_code/nongaussian_calibration.pynongaussian_calibration.py checks whether approximating the Random Forest predictive
distribution as Gaussian distorts the calibration comparison, by recomputing coverage
non-parametrically from the per-tree predictions. It reads the per-fold calib_*.json
shipped in LUDRP_results_data.zip; pass --recompute to regenerate them from a refit
(roughly an hour per fold).