Calibrated, explainable machine learning on routine laboratory data to characterize diagnostic assignment patterns in rheumatic diseases: a retrospective study of 12,085 patients

Read full text
Authors: Amal M. Elmesiry, Amira Shahin Ibrahim, Hemmat Ahmed Elabd, Basma Mohamed El Naggar, Eman E. Abd Elsalam, Mai Abd El Halim Moussa, Eman A. Rageh, Mona Mokhtar, Muhammad M. Harb, Aya H. Elshazly, Mohamed A. Khalafallah, Atef Abdelaziz Hassan
Cited by: 0

Abstract

Abstract Background Overlap in routine laboratory profiles complicates differential diagnosis of rheumatic diseases, particularly seronegative spondyloarthritis. We examined whether models trained on routine labs reproduce diagnostic assignment patterns and yield calibrated, explainable probabilities. Methods We analyzed a publicly available, fully de-identified dataset (n = 12,085). Adults (≥ 18 years) with confirmed diagnoses and ≤ 30% biomarker missingness were included. Nineteen routine variables (demographics, ESR/CRP, serology) plus four engineered features were used. Missingness (~ 14.5%) was imputed using MICE, variables were standardized, and the data were split 80/20 with stratification. Random Forest, LightGBM, XGBoost, CatBoost, and TabNet were trained with fixed, literature-informed hyperparameters. We assessed 5-fold CV, independent test performance, calibration (Brier/ECE), and SHAP; a predefined seronegative subgroup (RF/anti-CCP negative) was analyzed. Results XGBoost achieved the highest test accuracy (85.48%); Random Forest (83.78%) was selected for detailed interpretation due to superior calibration. Performance varied by disease: SLE recall was 97.9% compared to ankylosing spondylitis (AS), 57.6%. Among 2,417 test cases, 381 (15.76%) were misclassified; the most frequent error was AS misclassified as RA (109; 28.6%). SHAP ranked ESR/CRP, RF/anti-CCP, HLA-B27, and C3/C4 as dominant contributors. In seronegative patients (n = 390), the prevalence of HLA-B27 was higher (+ 6.5%; p = 0.024), and the prevalence of anti-La was lower (–11.6%; p = 0.001). Conclusions Routine laboratory data can be converted into calibrated, explainable probabilities that characterize diagnostic assignment patterns, rather than independent predictions. Given poor AS performance, the approach is not reliable for differentiating spondyloarthropathies from RA without additional clinical or imaging data. External/temporal validation, integration of clinical and imaging features, and prospective evaluation are needed. Trial registration Not applicable.

Fields of Study & Subjects

Artificial Intelligence in Healthcare Machine Learning in Healthcare Spondyloarthritis Studies and Treatments

Publication details

Journal / source
Figshare
Publication date
1 January 2026