Predicting olanzapine induced BMI increase using machine learning on population-based electronic health records
摘要
Weight gain is a common side effect in patients treated with olanzapine, contributing to increased risks of metabolic complications such as diabetes, cardiovascular disease, and reduced treatment adherence. However, identifying which patients are most likely to experience clinically significant BMI increase remains difficult in routine clinical practice. We investigated whether routinely collected electronic health record data could be used to predict BMI increase in individuals treated with olanzapine.
MethodsWe developed explainable machine-learning models using population-based psychiatric electronic health record data from Denmark. The study included 11,984 adults treated with olanzapine between 2016 and 2025 who had BMI measurements available during a period relevant to olanzapine exposure. The model outcome was defined as BMI increase > 5% from baseline. We evaluated three prediction settings: BMI increase after olanzapine initiation, BMI increase from the first BMI measurement during treatment to the next available follow-up, and BMI increase within a standardized 30–180-day follow-up window during treatment. Models were trained and internally evaluated using 2016–2024 data and then tested on held-out temporal 2025 data.
ResultsPrediction of clinically significant BMI increase after olanzapine initiation showed moderate discrimination, with the best performance observed within the 30–180 days post-initiation prediction window. XGBoost achieved an AUROC of 0.72 in the 2016–2024 data and 0.79 in the held-out 2025 data for this prediction. For the prediction of on-treatment BMI increase to the next available follow-up, AUROC was 0.71 in the 2016–2024 data but decreased to 0.61 in the 2025 data. When the on-treatment follow-up window was standardized to 30–180 days, performance was lower, with AUROCs of 0.64 and 0.58 in the 2016–2024 and 2025 data, respectively. Models using a minimal feature set of variables performed close to the full-feature models, suggesting that most predictive signal was captured by basic clinical variables. SHAP analysis indicated that lower baseline BMI, younger age, olanzapine dosage, historical BMI variability and past anxiolytic prescriptions were the features most associated with model predictions.
ConclusionRoutinely collected electronic health record data predicted olanzapine-associated BMI increase with moderate discrimination, but performance was less stable in temporally held-out data. The model associations were consistent with known risk patterns for olanzapine-associated weight gain and highlighted less established predictors of BMI increase during olanzapine treatment. These findings may support future work on risk stratification and metabolic monitoring, but they should be interpreted as preliminary and underscore the need for continued research in this domain to establish effective preventive measures for individuals undergoing antipsychotic treatments.