Figure 5:. Simulation studies for sensitivity analysis (A) The SPRINT population was randomly split into a training and internal validation set (n=6242, 67%) and a testing set (n=3119, 33%). In the positive control simulation, with HTE (B), an average treatment effect of 6% was introduced among women receiving aspirin. In the negative control simulation (no HTE; C), an average treatment effect of 1% was introduced across the population. After defining a dissimilarity matrix and phenomap for the training population and extracting individualised hazard estimates for each participant, an XGBoost model was trained to detect baseline phenotypes associated with HTEs (D). In the held-out test set, the algorithm successfully identified patient groups with HTE in the positive (E) but not the negative (F) control simulations. HR=hazard ratio. HTE=heterogeneous treatment effect. SPRINT=Systolic Blood Pressure Intervention Trial. UMAP=uniform manifold approximation. XGBoost=extreme gradient-boosting algorithm.