Related Experiment Video
Updated: Jan 10, 2026

Implementation of a Real-Time Psychosis Risk Detection and Alerting System Based on Electronic Health Records using CogStack
Published on: May 15, 2020
Predicting first-time anaphylaxis in the elderly using stacked machine learning and population registers
Toni Mora1, David Roche1, Rosa Muñoz-Cano2,3,4
1Research Institute for Evaluation and Public Policies (IRAPP), Universitat Internacional de Catalunya (UIC), Barcelona, Spain.
Background:
Anaphylaxis is a severe, potentially life-threatening allergic reaction that requires rapid identification and intervention. Predicting individuals at risk remains a clinical challenge due to its multifactorial nature and variable presentation.
Objective:
To develop and evaluate explainable machine learning models that predict the risk of anaphylaxis using routinely collected clinical data.
Methods:
We analysed a matched case-control dataset derived from anonymised electronic health records. After applying chi-squared-based feature selection, we trained multiple classification algorithms-including logistic regression, decision trees, random forests, XGBoost, and a stacking ensemble. Model performance was evaluated using AUC, sensitivity, specificity, precision, and F1-score. SHAP values were used to assess model explainability.
Results:
The best-performing model achieved an AUC of 0.79, demonstrating high discrimination and balanced sensitivity/specificity. Key predictors included healthcare utilisation patterns, age, socioeconomic proxy (copayment level), and specific diagnostic codes related to allergic conditions.
Conclusion:
This study demonstrates the potential of interpretable machine learning approaches to support the early identification of individuals at high risk of anaphylaxis. These tools can enhance clinical risk stratification and inform preventive strategies in routine practice.
Related Concept Videos
Allergic Reactions
Drug Dosing: Geriatric Patients
Allergic Drug Reactions
Pharmacokinetics in Geriatric Patients: Effect of Age on Drug Distribution
Analysis of Population Pharmacokinetic Data
Pharmacokinetics in Geriatric Patients: Effect of Age on Drug Absorption

