Prediction of Liver Enzyme Elevation Using Supervised Machine Learning in Patients With Rheumatoid Arthritis on Treatment with Methotrexate

Cureus. 2024 Jan 11;16(1):e52110. doi: 10.7759/cureus.52110. eCollection 2024 Jan.

Abstract

Objective The aim of this study is to develop a machine learning (ML) model to accurately predict liver enzyme elevation in rheumatoid arthritis (RA) patients on treatment with methotrexate (MTX) using electronic health record (EHR) data from a real-world RA cohort. Methods Demographic, clinical, biochemical, and prescription information from 569 RA patients initiated on MTX were collected retrospectively. The primary outcome was the liver transaminase elevation above the upper limit of normal (40 IU/mL), following the initiation of MTX. The total dataset was randomly split into a training (80%) and test set (20%) and used to develop a random forest classifier model. The best model was selected after hyper-parameter tuning and fivefold cross-validation. Results A total of 104 (18.2%) patients developed elevated transaminase while on MTX therapy. The best-performing predictive model had an accuracy/F1 score of 0.87. The top 10 predictive features were then used to create a limited feature model that retained most of the predictive accuracy, with an accuracy/F1 score of 0.86. Baseline high-normal transaminase levels, and higher lymphocyte and neutrophil blood count proportions were the highest predictors of elevated transaminase levels after MTX therapy. Conclusion Our proof-of-concept study suggests the possibility of building a well-performing ML model to predict liver transaminase elevation in RA patients being treated with MTX. Similar ML models could be used to identify "high-risk" patients and target them for early stratification.

Keywords: machine learning; medication safety; methotrexate; rheumatoid arthritis; transaminase elevation.