Osteoporosis is a systemic skeletal condition defined by progressive loss of bone mineral density (BMD) and deterioration of bone microarchitecture, which increases fracture risk—particularly vertebral fractures that are often clinically silent. Dual-energy X-ray absorptiometry (DXA) is the clinical reference standard for BMD assessment but is limited by cost, accessibility and an inability to directly detect vertebral fractures. The study aims to develop a practical, low-cost machine learning framework that can perform both BMD estimation (regression) and WHO-based severity stratification (classification) using only routinely available, inexpensive clinical markers suitable for resource-constrained environments.
Clinical records were obtained from the Nuclear Medicine, Oncology and Radiotherapy Institute (NORI) and Capital Development Authority (CDA) hospitals in Pakistan. Recruitment spanned 01/07/2024–30/12/2025; data access for analysis occurred 05/01/2026–25/02/2026. Ethical approval and participant informed consent were obtained; data were anonymized and assigned random identifiers.
The starting cohort comprised 187 adults (77 male, 110 female) aged ≥18 years who had lumbar spine DXA T-scores recorded. Records incomplete for required biomarkers or DXA were excluded, leaving a final dataset of 159 complete patient records. Seventeen input variables were included: Age, Gender, Weight, Height, BMI, Smoking, Trauma, Diabetes, Menopause, ABO blood group, Rh factor, Hemoglobin (Hb), Hematocrit (HCT), Alkaline Phosphatase, Serum Potassium, Serum Calcium and Total Vitamin D. Target variables were lumbar spine L1–L4 BMD (continuous, 0.476–1.545 g/cm3) and a three-class WHO severity label: 0 = Normal, 1 = Osteopenia, 2 = Osteoporosis. The class distribution was imbalanced: 49.06% normal, 34.59% osteopenia, 16.35% osteoporosis.
The authors implemented a lightweight, dual-stage pipeline to support both classification (osteoporosis severity) and regression (lumbar spine BMD estimation) using a feature-efficient approach intended for clinics without routine access to imaging. The framework emphasizes easily obtained laboratory markers—specifically ABO blood group, serum Calcium, Potassium, and Total Vitamin D—and basic demographic/anthropometric data such as Age and Weight. The design purposefully avoids dependence on high-dimensional imaging or computationally intensive models to be feasible in resource-constrained settings.
Initial preprocessing removed uninformative variables, applied label encoding to categorical features and filled a few missing biomarker values using the class mean. Feature selection proceeded in two stages:
Stage I: Pearson correlation coefficient matrix was used to assess pairwise relationships and remove features with multicollinearity above a 0.75 threshold.
Stage II: Five feature-selection techniques were applied—Sequential Forward Floating Selection (SFFS), Linear SVM (LSVM), Variance Threshold (threshold 0.1), Recursive Feature Elimination with Random Forest (RFE-RF) and RFE with Logistic Regression (RFE-LR). Feature importance ranking used Extra Trees and Random Forest; the top 10 features were shortlisted.
Exploratory analysis incorporated SHapley Additive exPlanations (SHAP) to quantify feature contributions to both classification and regression tasks. SHAP plots guided final selection with clinician input: a final set of 8 features was chosen for the classification model and 9 features for the regression model.
Standardization using scikit-learn’s StandardScaler was applied to the final features. For regression, a Yeo-Johnson power transform was further used to reduce skewness in predictor and response variables.
The classification dataset (final features) was split with a 75:25 hold-out for training and testing. Given the small minority class (only 20 samples labeled osteoporosis), class imbalance was managed by applying class weights to penalize misclassification of minority samples rather than using synthetic oversampling (SMOTE, ADASYN or GAN-based methods), which the authors judged likely to produce noisy or overlapping examples with this sample size.
Hyper-parameter tuning used exhaustive Grid Search across manually selected parameter ranges suitable for small datasets. The authors evaluated a collection of classifiers and regressors and trained them on various biomarker combinations to identify feature-efficient models for the two simultaneous tasks.
For osteoporosis severity classification, an ensemble voting classifier trained primarily on Weight, Potassium, Calcium and Total Vitamin D was reported to achieve an accuracy of 90% and an AU-ROC of 0.93. For lumbar spine BMD estimation (regression), an Extreme Gradient Boosting (XGBoost) Regressor trained on Age, Weight, ABO group and Total Vitamin D achieved an R2 value of 0.536. These outcomes indicate the feasibility of predicting both categorical severity and continuous BMD outcomes using a limited, clinically accessible feature set.
The framework demonstrates that a feature-efficient machine learning approach built on inexpensive laboratory markers and basic clinical data can provide non-imaging-based pre-screening for osteoporosis and BMD estimation in settings where DXA is unavailable. The authors argue this can lower financial and technical barriers to early detection and fracture risk stratification in remote or underfunded clinics.
Limitations explicitly reported in the source include the modest sample size (N = 159), class imbalance favoring normal and osteopenia labels, and restricted public access to the complete dataset due to confidentiality and institutional ownership. The authors also note broader challenges for AI-based osteoporosis detection such as the need for multimodal data integration, model explainability, finer-grained severity classification, and real-world deployment optimization—issues that apply to their work and the field generally.
A fully de-identified sample dataset (N = 50) preserving the original features and accompanying code are available via Zenodo per the article’s data statement; full access to the N = 159 dataset requires contacting institutional review boards and hospital registries (NORI and CDA) because of ethical restrictions. Ethical approval and participant informed consent were obtained for the study. The authors propose the presented framework as a complementary, radiation-free pre-screening tool and indicate avenues for future work including external validation, expansion of sample size, and integration with multimodal clinical data to improve generalizability and explainability.