Machine Learning Approaches for Chronic Pain Classification and Management: A Comparative Analysis Using the NHANES Dataset
DOI:
https://doi.org/10.56979/1102/2026/1425Keywords:
Chronic Pain, Machine Learning, NHANES, Classification, Random Forest, XGBoost, Artificial Neural Network, Support Vector Machine, Explainable AI, Feature ImportanceAbstract
Chronic pain affects over 30% of the global population, representing a major socio-economic and clinical burden. Current pain assessment is largely subjective, and machine learning (ML) offers a data-driven alternative for classifying chronic pain severity. This study evaluated five supervised ML algorithms (Logistic Regression, Random Forest, Support Vector Machine, XGBoost, and an Artificial Neural Network) for classifying chronic musculoskeletal pain severity (mild, moderate, severe) using pooled NHANES data (2015–2016 and 2017–2018), yielding an analytic sample of 9,971 adults, of whom 2,890 met a physician-diagnosed case definition based on arthritis and/or gout. Eight clinically relevant features spanning physiological, psychological, and behavioral domains were engineered, and models were evaluated using accuracy, AUC-ROC, macro F1-score, and Matthews correlation coefficient (MCC). XGBoost and Random Forest achieved the highest cross-validation accuracy (47.9% and 46.9%), significantly outperforming the ANN and simpler baselines, though the ANN achieved the highest macro F1-score and MCC on the held-out test set. Additional gradient-boosting variants, a deep neural network, and an explainability analysis were also evaluated as robustness checks, with LightGBM achieving the best overall held-out performance and the deep neural network underperforming the tree-based ensembles. Sleep disturbance, age, depression severity, and BMI emerged as the most consistently informative predictors, though all effect sizes were modest. These findings indicate that routinely collected demographic and clinical covariates provide limited discriminative power for fine-grained chronic pain severity classification, underscoring the need for richer feature sets in future ML-based pain assessment tools.
Downloads
Published
How to Cite
Issue
Section
License
This is an open Access Article published by Research Center of Computing & Biomedical Informatics (RCBI), Lahore, Pakistan under CCBY 4.0 International License




