IgE-mediated hypersensitivity reactions to beta-lactam antibiotics represent one of the most prevalent and potentially life-threatening forms of drug allergy, often involving cutaneous, respiratory, gastrointestinal, and cardiovascular manifestations, including hypotension and hemodynamic instability.
Given these limitations, intelligent data-driven models show promise as complementary tools for supporting more rapid and accurate assessments of allergic risk.
This study aimed to develop, train, and evaluate machine-learning models for predicting IgE-mediated allergic reactions to beta-lactam antibiotics and to design a clinical decision-support tool intended to assist physicians in this field.
A total of 322 patient records were evaluated using nine independent variables: age, gender, culprit drug group, time since last reaction, reaction repetition, reaction with another drug from the same class, time-to-onset of drug reactions, reaction severity, and history of other allergies.
These findings suggest that machine-learning models, particularly Random Forest, may serve as adjunctive tools for structured risk stratification of suspected IgE-mediated beta-lactam hypersensitivity in an allergy-clinic setting.
IgE-mediated hypersensitivity reactions to beta-lactam antibiotics represent one of the most prevalent and potentially life-threatening forms of drug allergy, often involving cutaneous, respiratory, gastrointestinal, and cardiovascular manifestations, including hypotension and hemodynamic instability. Conventional diagnostic approaches such as clinical history assessment and in vivo and in vitro testing are limited by suboptimal sensitivity and specificity as well as restricted availability for many patients. Given these limitations, intelligent data-driven models show promise as complementary tools for supporting more rapid and accurate assessments of allergic risk. This study aimed to develop, train, and evaluate machine-learning models for predicting IgE-mediated allergic reactions to beta-lactam antibiotics and to design a clinical decision-support tool intended to assist physicians in this field. Clinical data were collected from patients referred to an allergy clinic in Iran and subsequently curated for analysis. A total of 322 patient records were evaluated using nine independent variables: age, gender, culprit drug group, time since last reaction, reaction repetition, reaction with another drug from the same class, time-to-onset of drug reactions, reaction severity, and history of other allergies. Multiple machine-learning algorithms were implemented to predict the final clinical diagnosis as the dependent outcome variable, which was established according to EAACI-based clinical assessment. Within the limitations of the balanced single-centre dataset, Random Forest achieved the highest composite mean score in internal cross-validation (0.912), with accuracy of 0.90, sensitivity of 0.90, specificity of 0.89, F-score of 0.90, and AUC of 0.97. In same-centre temporal validation, the Random Forest model was applied to the independent 80-patient dataset without retraining or retuning and achieved accuracy of 0.96, sensitivity of 0.95, specificity of 0.98, F-score of 0.96, AUC of 0.99, and a composite mean score of 0.97. These findings suggest that machine-learning models, particularly Random Forest, may serve as adjunctive tools for structured risk stratification of suspected IgE-mediated beta-lactam hypersensitivity in an allergy-clinic setting. However, this single-centre, balanced, retrospective study should be considered preliminary, and the developed software should be regarded as a research decision-support prototype rather than a tool ready for routine clinical implementation. Further prospective, multicentre validation and direct comparison with established clinical risk-stratification approaches are required before clinical deployment.