A machine learning approach for stratifying risk for food allergies utilizing electronic medical record data
Authors: Tamar Landau, Keren Gamrasni, Yotam Barlev, Arnon Elizur, Shira Benor, Francis Mimouni, Michael Brandwein
Journal: Allergy (2023)

The prevalence and burden of food allergy (FA) has grown globally, creating a need to identify infants at risk of food allergies to manage or even prevent the condition.1 There is no accepted methodology for stratifying one's chances of developing FA, despite numerous studies pointing to genetic,2 environmental,3 and medical history1, 3 risk factors for the conditions. A family history of atopic conditions has been used to identify high-risk infants in the immediate postnatal period in the research setting4 yet performs poorly and does not distinguish between genetic and environmental risk factors. Machine learning algorithms can be trained on the extensive and rich data available in electronic medical records (EMR), as has been done to identify anaphylaxis visits to the emergency department5 and separately, to identify allergic reactions in the healthcare setting.6 EMR's can additionally be harnessed for risk stratification, as has been done for pediatric obesity.4 We hypothesized that the combined analysis of risk elements from a large and nationally representative healthcare provider EMR would allow us to develop prediction models and stratify an infant's risk of developing FA. We performed a retrospective, cross-sectional database study from medical records stored in the Leumit Health Services (Leumit) EMR. Leumit provides coverage and medical services to roughly 700,000 members throughout Israel. Leumit's system has electronically captured routine data from all medical consultations, procedures, prescriptions, and sociodemographic data since 1999. The FA population (n = 4077) included patients born between 2010 and 2020 with an initial FA diagnosis by an allergist before the age of four. The non-FA control population (n = 95,686) was selected from the general population and included individuals who were never diagnosed with FA and were born in the same years. ICD-9 codes used for a FA diagnosis and raw clinical variables are described in Tables S1 and S2. All variables were derived from the prenatal and postnatal period prior to the food allergy diagnosis, but no later than from 4 months of age. Logistic regression and random forest regression models (RFRMs) were trained and tested on the combined dataset. RFRM often outperforms logistic regression models when analyzing large datasets due to their bootstrapping and bagging abilities (see Appendix S1: Methods section), yet the latter provides an intuitive explainability that is important for clinicians. We present both to balance maximal predictive value with the needs of clinicians and researchers. Logistic regression models pointed to several significant risk factors, including the use of systemic antibiotics during pregnancy (OR 1.93, CI 1.82–2.00, p < .001) or during infancy (OR 2.86, CI 2.49–3.27, p < .001), a prior diagnosis of atopic dermatitis (OR 8.61, CI 7.71–9.60, p < .001) and others (Table 1, Figure 1B). RFRM incorporating all risk factors from the period prior to the FA diagnosis resulted in a receiver operating characteristic curve with an area under the curve (AUC) of 0.80 and an accuracy of 83%, with corresponding sensitivity of 62%, and specificity of 84% (Figure 1B–D). Feature importance identified the number of courses of systemic antibiotics while pregnant as the largest effect in constructing the RFRM (Figure 1E and Figure S1). When trained using risk factors available only in the prenatal period, the AUC was 0.76 with an accuracy of 79% and corresponding sensitivity of 59%, and a specificity of 80% (Figure 1F). Whereas no widely accepted benchmark for the stratification of food allergies exists, we compared our predictive algorithm to parameters that are sporadically employed in the clinical or research setting. These parameters include maternal history of FA, parental history of atopic conditions, or a previous diagnosis of atopic dermatitis before 4 months of age (Figure 1F). The drastic and significant improvement shown in our regression model demonstrates the model's superiority to a risk assessment using family history or infant history of atopy alone. Predictive modeling using routinely collected electronic medical record data can serve as a powerful tool to stratify an infant's risk of developing FA. Knowledge of an infant's risk can inform both caregivers and medical professionals as to timely interventions to mitigate the development of FA, including the early introduction of allergens according to local guidelines,7 and can allow for a drastic reduction in clinical trials designed to assess the efficacy of FA prevention strategies. Future studies incorporating additional features, including maternal and infant dietary practices, are warranted to further hone the predictive capability of these risk stratification techniques. Tamar Landau was involved in data curation (supporting), formal analysis (lead), investigation (supporting), writing—review and editing (equal). Keren Gamrasni and Yotam Barlev were involved in project administration (supporting), investigation (supporting), and writing—review and editing (equal). Arnon Elizer, Shira Benor, and Francis Mimouni were involved in resources (equal), supervision (equal), investigation (supporting), and writing—review and editing (equal). Michael Brandwein was involved in conceptualization (lead), data curation (supporting), formal analysis (supporting), investigation (lead), project administration (supporting), and writing—original draft preparation (lead). The authors acknowledge the Leumit Start team for their partnership in this research endeavor. This study was funded by MYOR Diagnostics ltd. TL, KG, YB, and MB report personal fees from MYOR Diagnostics Ltd., during the conduct of the study. The data that support the findings of this study are available from Leumit Research Institute. Restrictions apply to the availability of these data, which were used under license for this study. Data are available from Leumit Research Institute. Appendix S1 Please note: The publisher is not responsible for the content or functionality of any supporting information supplied by the authors. Any queries (other than missing content) should be directed to the corresponding author for the article.