Logistic Regression and Elastic Net Regularization for the Diagnosis of Fibromyalgia: A Quantitative Approach Using B-Mode Ultrasound
Conditions: Fibromyalgia
Sponsor: Toronto Rehabilitation Institute

Logistic Regression and Elastic Net Regularization for the Diagnosis of Fibromyalgia: A 
Quantitative approach using B-mode Ultrasound  
 
 
Authors: 
Michael Behr1,3, MASc, B.Eng; Saba Saiel1,3BSc.; Valerie Evans1,2, MASc (C), B.Eng; Dinesh 
Kumbhare1,2,3 MD, PhD, FRCPC, FAAPMR 
1University Health Network – Toronto Rehabilitation Institute, Toronto, Ontario, Canada 
2Institute of Biomaterials and Biomedical Engineering (IBBME), University of Toronto, 
Toronto, Ontario, Canada 
3Department of Medicine, Division of Physical Medicine and Rehabilitation, University of 
Toronto, Toronto, Ontario, Canada  
 
Date: September 9th, 2019 
 
Corresponding Authour: 
Dinesh Kumbhare, MD, PhD, FRCPC, FRCPC, FAAPMR 
Associate Professor, Department of Medicine 
Division of Physical Medicine and Rehabiliation 
University of Toronto 
Toronto Rehabiliation Institute 
550 University Ave. 
Toronto, ON M5G 2A2 
P: 416-597-3422 x 4612 
Email: dinesh.kumbhare@uhn.ca 

Abstract 
 
Background: Fibromyalgia (FM) is a chronic widespread pain disorder characterized by 
widespread tenderness, psychological distress, fatigue, and sleep disturbance. The cause of FM 
continues to be unknown. Current methods of fibromyalgia (FM) diagnosis remains a challenge 
for clinicians due to a lack of objective diagnostic tools. One proposed solution is the use of 
quantitative ultrasound (US) techniques, such as image texture analysis, which has demonstrated 
discriminatory capabilities with other chronic pain conditions like Myofascial Pain Syndrome 
(MPS). We propose the use of US image texture variables to construct an elastic net regularized, 
logistic regression model, for differentiating between the trapezius muscle in the healthy and FM 
patients.  
Methods: Ethical approval has been obtained from the University Health Network (UHN) 
Research Ethics Board. This proposed study is a diagnostic case-control study with one major 
independent binary outcome measure (FM present or Healthy), to create 2 patient cohort groups.  
Ultrasound imaging data will be collected from both cohorts and the image texture variables will 
be used to construct predictive logistic regression models. 
Discussion: This will be the first study that assesses the discriminative capabilities of B-mode 
ultrasound image texture of healthy muscles and muscles with FM present. Findings from this 
study will allow further research into diagnostic modelling for FM. 
 
 
 
 
 
 
 
Keywords: Ultrasound, Imaging, Logistic, Regression, Fibromyalgia, Regularization 

List of Abbreviations: 
US: Ultrasound 
FM: Fibromyalgia 
MPS: Myofascial pain syndrome 
MTrP: Myofascial trigger points 
LASSO: Least absolute shrinkage and selection operator 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Background 
Fibromyalgia (FM) is a chronic widespread pain disorder characterized by widespread 
tenderness, psychological distress, fatigue, and sleep disturbance1. It has an estimated prevalence 
of 1.1-6.4% of the general population2. In the United States, greater disease burden has been 
reported in FM patients which involve poorer health status, function, sleep, lower productivity, 
pain-related medications, increased comorbidities and higher costs3. The cause of FM continues 
to be unknown. The current clinical method of diagnosis of FM is by applying the 2016 FM 
criteria4,5. These are subjective and do not require a physical examination. Therefore, subjectivity 
is present when diagnosing FM.  
Another method to diagnose FM could be to create a diagnostic biomarker that is 
objective, reliable and based on the underlying pathophysiology. A biomarker is a characteristic 
that can be measured objectively to indicate the underlying pathophysiological process6. The 
FDA has identified that qualified biomarkers are one of the following: diagnostic, prognostic, 
predictive, and pharmacodynamic. “A diagnostic biomarker is a disease characteristic that 
categorizes a person by the presence or absence of a specific physiological or pathophysiological 
state or disease”. Our study was designed to create a diagnostic biomarker that could be feasible 
for clinical utilization and assist in reducing subjectivity and heterogeneity when combined with 
the current clinical criteria4. 
From an imaging perspective, there is very little literature available.  Magnetic resonance 
imaging of the muscles in FM patients have been studied in the past which did not show any 
significant abnormality7. Ultrasonography (US) has also been used to study the trigger points 
found on the outer aspect of the greater trochanter in FM patients8. Similarly, this study did not 
show any significant abnormalities in FM patients. However, the study was limited due to a 

small sample size and the absence of a healthy control group. Currently, no study exists to 
compare FM patients and healthy controls using clinical findings and quantitative US.  
Rationale for Utilization of Quantitative Ultrasound 
There is evidence in the literature for altered nociception in patients with FM9. FM is also 
characterized by heightened pain sensitivity to sensory stimuli, possibly as a result of the 
changes in the central processing in the brain, referred to as central sensitization1. From a 
mechanistic perspective, the abnormal efferent activity could be reflected in the affected skeletal 
muscle. Our study objective is to explore this possibility using image texture feature analysis in 
B-mode US imaging. We believe that this may be possible since we have previously shown that 
texture features can not only discriminate between healthy controls and patients with neck pain 
but also between the two clinical phenotypes of Myofascial Pain Syndrome (MPS), namely 
groups that contain latent and active myofascial trigger points (MTrPs)10. Towards this, we 
propose to use the image texture features to construct a regularized logistic regression model in 
order to predict and discriminate between healthy controls and fibromyalgia affected muscle. 
To summarize, our specific research questions are as follows: 
a. Can a regularized logistic regression model, built on texture variables extracted from B-
mode ultrasound images of the upper trapezius discriminate between healthy, and FM 
subjects? Our hypothesis is that the model should effectively differentiate the two cohorts 
due to our previous work/success with other chronic pain disorders (MPS). 
b. How does regularization impact the overall performance of the trained model? Our 
hypothesis is that it should improve its generalizability. 
c. Does the holdout, test data validate the predicted performance of the logistic regression 
model? Our hypothesis is that it will be within 1 standard error of the prediction mean. 

Methods & Design  
Study Design: 
The study conforms to the Consolidated Standards of Reporting Trials recommendations. 
Ethical approval is approved by the University Health Network (UHN) Research Ethics Board. 
This study is registered under the National Institutes of Health ClinicalTrials.gov. This proposed 
study is a diagnostic case-control study with one major independent binary outcome measure 
(FM present or Healthy), to create 2 patient cohort groups.   
Participants: 
Recruitment 
Study participants will be recruited from the MSK/pain specialty outpatient clinic at the 
Toronto Rehabilitation Institute. Toronto Rehabilitation institute is the largest rehabilitation 
hospital in Canada, owned and operated by the University Health Network (UHN). The 
recruitment procedures will run in line with the approved guidelines from the UHN research 
ethics boards. Informed consent was obtained from each participant. Participants will not be 
coerced into participating and will be informed that they have the right to withdraw at any time 
during the experimental procedures. They will also be informed they have the right to withdraw 
their data prior to publication. Participants will be briefed and consented on recruitment prior to 
commencing the study procedures.  
Eligibility Criteria 
A specialist in physical medicine and rehabilitation with 25 years of experience (Dinesh 
Kumbhare) will perform the standardized physical assessment on consecutive patients referred to 
the clinic. Female or male participants who meet the following inclusion criteria will be included 
in the study as FM participants: (1) chronic widespread pain, (2) fitting the 2016 FM criteria, (3) 

absence of myofascial pain syndrome trigger points, (4) participants agree to sign a consent to 
volunteer for the research, and (5) between the ages of 20 and 65 years (44.3 ± 13.9 years). Age 
matched healthy controls with no past medical history were also collected. 
Exclusion Criteria 
Participants were excluded if they demonstrated clinical evidence of another cause for 
widespread pain, such as: (1) polymyositis, (2) dermatomyositis, (3) endocrine disorders, etc. 
Additionally, no participants will be recruited that have performed any physical exercise up to 
three days prior to entry into the study. 
Experimental Protocol 
Data Acquisition 
The experimental protocol will be carried out in the MSK/pain specialty outpatient clinic 
at Toronto Rehabilitation Institute. Following the completion of the preliminary intake forms and 
participant debriefing, informed consent will be obtained. Each participant will be seated upright 
with their hands comfortably on their thighs in a chair that has a high supportive back. They will 
be asked to relax their neck and shoulder muscles. Dr. Kumbhare will then apply the inclusion 
and exclusion criteria to the patient and assess entry into the study. A research associate, blinded 
to the clinical status of the study participant, will collect the ultrasound images using a Sonosite 
X-porte ultrasound system (SonoSite Canada Inc. c/o Visualsonics, 3080 Yonge Street, Suite 
6100, Toronto, Ontario M4N 3N1, Canada) at a depth of 3.0 cm or less and with a linear 
ultrasonic transducer of 6-15 MHz. The image settings such as depth, sector size, and time gain 
compensation (TGC), will be kept constant for all participants. The transducer will then be 
placed perpendicular on the upper trapezius muscle on each side, and its angle was adjusted to 
acquire the highest quality image. Ultrasound Gel will be used to coat the entire surface of the 

transducer before it touched the skin surface. The location on the muscle will be standardized 
across study participants by being at the midpoint of the muscle belly between the C7 spinous 
process and the acromioclavicular joint. From that position, the transducer will be moved at a 
speed of approximately 1 cm/sec toward the acromioclavicular joint to obtain a 10-sec video. 
One video will be acquired from each side of the muscle group per participant. 
Image Pre-processing 
All images pre- and post-processing will be performed with MATLAB and the image 
processing toolbox11. Images will be visually and statistically inspected for quality based on 
image intensity, contrast, and ability to discriminate muscle fibers. This is necessary to maintain 
a high standard of imaging data quality, and suspect no more than 15% of the data should be 
removed due to constraints. Next, since we are analyzing ROI’s in the muscle we must extract 
only a certain number of frames from each video series. We will achieve this using an image 
filtering method that has been previously used by our group called the CW-SSIM12 filtering 
method13. It will be used to objectively calculate and extract image frames from each video series 
in order to obtain the maximal number of images, while still maintaining uniqueness (minimal 
image overlap). After this procedure is finished we will extract a rectangular ROI estimation of 
the upper trapezius muscle excluding the upper and lower fascial borders. Lastly, the images will 
be labelled and organized for further processing. 
Feature Extraction 
Texture variables will then be extracted from the image ROI’s using MATLAB and the image 
processing toolbox. The features to be extracted are as follows: 
1. First order histogram parameters associated with image grayscale. These include mean, 
standard deviation, skewness, and kurtosis. 

2. Gray level co-occurrence matrices (GLCM)14 will be calculated utilizing 4 directions 
(0,45,90,135 degrees). 76 variables are then created. 
3. Lastly run-length parameters15 will be determined by gray level run-length matrices 
based upon the four given directions. Averaging the directions together gives seven 
features. 
In total 88 feature variables will be extracted from each ROI, providing a feature descriptor 
dataset. 
Elastic Net Regularized Logistic Regression 
 
We will then construct and train an elastic net regularized logistic regression model on 
the dataset using the binary class labels constructed earlier16. This will be done using MATLAB 
and the Statistics and Machine Learning Toolbox17 and performed on a train/test split (80/20) of 
the original training data. The model will be regularized using the elastic net, which will improve 
the generalizability of the classification model on unseen data (avoid overfitting problems). The 
elastic net penalization method also provides a form of variable selection helping to minimize the 
effect of rank deficiency. 
Model Validation 
 
The model will be validated using 10-fold nested cross validation on the training data due 
to the fact the model needs hyper-parameter tuning alongside the validation process. This 
requires a nested procedure where the hyper-parameter tuning is done in an inner loop and the 
validation of the model is in an outer loop. This will allow for an optimized, trained model that 
should generalize well to unseen data. This generalization will be tested using the final holdout 
set and will either confirm or deny whether the constructed model is a good classifier for this 
task. 

Results 
 
After the methodology is applied to all training data, performance metrics can be 
extracted from the results to demonstrate the model efficacy. Performance metrics like 
sensitivity, specificity, area under the curve (AUC) and accuracy will be extracted in order to 
characterize the model performance. These metrics will be averaged across the 10-folds (mean + 
stdev), and these values will be compared to the final metrics extracted from the holdout test set. 
If the test set values fall within 1 stdev, it will confirm the accuracy of the performance 
estimation during the training. 
Primary Outcome 
The primary outcome measures: 
1. Binary classifier discriminates effectively (>70 % accuracy) between the healthy and 
muscle with FM. 
2. Impact of regularization on the model performance. 
3. Holdout test validation of the predicted performance. 
 
Discussion 
 
The overarching goal of our research utilizing image texture features is to eventually 
provide diagnostic aid to clinicians through the usage of clinically feasible, objective and reliable 
quantitative ultrasound techniques. While computer aided diagnosis research in ultrasound has 
been heavily explored in areas such as cancer and liver diseases18-20, there has been little to no 
work in chronic pain13. This is the basis for this project proposal utilizing logistic regression 
modeling with elastic net regularization; the objective is to develop a statistical model with good 
predictive and diagnostic capabilities. 

 
We are using logistic regression as our classification model due to its efficiency, 
computational resource requirement, interpretability, input feature scaling invariance, and ease of 
regularization21. The fact that logistic regression intrinsically calculates the predictive probability 
is a major strength of the model, as other classification techniques require further 
computationally intensive cross-validation to achieve this.  
 
Regularization is a specific technique that is often used as a remedy to solve overfitting in 
classification models for machine learning22. In a general sense, regularization techniques are 
used to reduce a model’s predictive error on unseen data by minimizing model variance with a 
given training set by smoothing the predictions. This is done by constraining (regularizing) the 
regression coefficients towards zero which discourage overly complex (flexible) models. What 
must be noted is that regularization does not improve the performance of the model on the data it 
was trained on. More intuitively, regularization acts as a penalty against complexity and steers 
the model away from memorizing (overfitting) the dataset. For this protocol we are utilizing 
elastic net regularization (a well-known technique) to improve the performance against the 
unseen data.  
 
Until now, the literature shows that the diagnosis of FM remains challenging, in part due 
to its non-specific symptoms, which overlap with many other disorders such as myofascial pain 
syndrome. Even though patients who present symptoms such as chronic widespread pain, 
emotional distress, cognitive and sleep disturbances may be formally diagnosed with FM, it is 
possible that their primary disorder is not FM and has an entirely different pathophysiological 
mechanism. This protocol should demonstrate the effectiveness of texture analysis techniques 
when differentiating between FM patients and healthy individuals. Post-image acquisition 
texture analyses may provide some insight into the pathophysiology underlying FM.  

Limitations and Conclusions 
 
Our study has limitations and one of them concerns the generalizability of our findings, 
since we are evaluating images of the upper trapezius for patients and healthy participants. The 
upper trapezius muscles may not be representative of the whole patient or the differences 
between patients who have varying symptomatology and areas of pain. Further research is 
needed to replicate our findings using muscle groups other than the upper trapezius. We plan to 
conduct these studies and to correlate our findings with the extent of central sensitization. 
Another potential limitation is the amount of healthy control recruits available. It is difficult to 
find participants that do not possess stiffness and myofascial trigger points in their upper 
trapezius muscle, even among seemingly healthy populations. We suspect this may limit our 
numbers for this group and fully expect to deal with an unbalanced dataset. There are many 
methods of compensating for this discrepancy during model construction, training and statistical 
analysis and will employ them as needed. 
 
In conclusion this study should provide an effective, discriminatory classifier trained on 
B-mode ultrasound images that can differentiate between healthy muscle and muscle with FM in 
the upper trapezius. This is one more step in our overarching goal of providing increasingly 
objective diagnostic tools for clinicians when diagnosing chronic pain disorders. 
 
Acknowledgements: N/A 
Declarations 
Ethics approval and consent to participate: 
Informed consent will be obtained from all subjects participating in this study. Ethical approval 
was approved by the University Health Network (UHN) Research Ethics Board (Approval 

Number: 15-9488.8). The approval form is included in the supplementary files of this 
submission. This study is registered under the National Institutes of Health ClinicalTrials.gov. 
Consent for publication: 
Not applicable. 
Availability of data and material: 
The datasets used and/or analyzed during the study will be available from the corresponding 
author upon reasonable request. 
Data Monitoring Committee  
A DMC is not applicable for this study since it is not a multi-location study.  
Trial Status:  
Protocol version and date: Version 1, Sept. 10, 2019  
Recruitment: Completed Sept. 6, 2019 
Competing interests: 
The authors declare that they have no competing interests. 
Funding: 
This study is being conducted with no external funding and was instead funded from the Toronto 
Rehabilitation Institute. 
Authours’ Contribution: 
All authors (MB, SS,VE, DK) contributed to the study design; drafted, reviewed and finalized 
the study protocol; critically revised the manuscript and approved the final manuscript. 
 
 
 

 
References 
 
1. Wolfe, F., Ross, K., Anderson, J., Russell, I. J., & Hebert, L. The prevalence and 
characteristics of fibromyalgia in the general population. Arthritis & Rheumatism 
1995;38(1):19-28. 
2. Gittins, R., Howard, M., Ghodke, A., Ives, T. J., & Chelminski, P. The accuracy of a 
fibromyalgia diagnosis in general practice. Pain Medicine. 2017;19(3):491-498. 
3. Schaefer, C., Mann, R., Masters, E. T., Cappelleri, J. C., Daniel, S. R., Zlateva, G., ... & 
McNett, M. The comparative burden of chronic widespread pain and fibromyalgia in the 
United States. Pain Practice, 2016;16(5):565-579. 
4. Wolfe, F., Clauw, D. J., Fitzcharles, M. A., Goldenberg, D. L., Häuser, W., Katz, R. L., 
Mease, P.J., Russell, A. S., Russell, I. J., Walitt, B. 2016 Revisions to the 2010/2011 
fibromyalgia diagnostic criteria. Seminars in arthritis and rheumatism 2016;46(3):319-
329 
5. Ablin, J. N., & Wolfe, F. A Comparative Evaluation of the 2011 and 2016 Criteria for 
Fibromyalgia. The Journal of rheumatology, 2017;44(8):1271-1276. 
6. U.S. Department of Health and Human Services Food and Drug Administration/Centre 
for Drug Evaluation and Research. Guidance for Industry and FDA Staff Qualification 
Process for Drug Development Tools. Silver Spring, MD: Author; 2014 
7. Kravis, M. M., Munk, P. L., McCain, G. A., Dale Vellet, A., & Levin, M. F. MR imaging 
of muscle and tender points in fibromyalgia. Journal of Magnetic Resonance Imaging. 
1993;3(4):669-670. 

8. Meenagh, G., Sakellariou, G., Iagnocco, A., Delle Sedie, A., Riente, L., Filippucci, E., Di 
Geso,L., Grassi, W., Bombardieri, S., Valesini, G., Montecucco, C. Ultrasound imaging 
for the rheumatologist XXXIX. Sonographic assessment of the hip in fibromyalgia. 
2012;30(3):319-321 
9. Bendtsen, L., Nørregaard, J., Jensen, R., & Olesen, J. Evidence of qualitatively altered 
nociception in patients with fibromyalgia. Arthritis & Rheumatism: Official Journal of 
the American College of Rheumatology. 1997:40(1):98-102. 
10. Kumbhare, D. A., Ahmed, S., Behr, M. G., & Noseworthy, M. D. Quantitative ultrasound 
using texture analysis of myofascial pain syndrome in the trapezius. Critical Reviews™ 
in Biomedical Engineering. 2018;46(1):1-31. 
11. MathWorks. Image Processing Toolbox., Release 2018a, The MathWorks Inc.,Natick, 
Massachusetts, United States  
12. Sampat, M. P., Wang, Z., Gupta, S., Bovik, A. C., & Markey, M. K. Complex wavelet 
structural similarity: A new image similarity index. IEEE transactions on image 
processing. 2009;18(11):2385-2401. 
13. Behr, M., Noseworthy, M., & Kumbhare, D. Feasibility of a Support Vector Machine 
Classifier for Myofascial Pain Syndrome: Diagnostic Case‐Control Study. Journal of 
Ultrasound in Medicine. 2019; 38(8):2119-2132. 
14. Haralick, R. M., & Shanmugam, K. Textural features for image classification. IEEE 
Transactions on systems, man, and cybernetics. 1973;SMC-3(6):610-621. 
15. Galloway, M. M. Texture classification using gray level run length. Computer graphics 
and image processing. 1975;4(2):172-179. 

16. Zou, H., & Hastie, T. Regularization and variable selection via the elastic net. Journal of 
the royal statistical society: series B (statistical methodology) 2005;67(2):301-320. 
17. MathWorks. Statistics and Machine Learning Toolbox., Release 2018a, The MathWorks 
Inc.,Natick, Massachusetts, United States  
18. Jalalian, A., Mashohor, S. B., Mahmud, H. R., Saripan, M. I. B., Ramli, A. R. B., & 
Karasfi, B. Computer-aided detection/diagnosis of breast cancer in mammography and 
ultrasound: a review. Clinical imaging. 2013;37(3):420-426. 
19. Virmani, J., Kumar, V., Kalra, N., & Khandelwal, N. Prediction of liver cirrhosis based 
on multiresolution texture descriptors from B-mode ultrasound. International Journal of 
Convergence Computing 2013;1(1):19-37. 
20. Xian, G. M. An identification method of malignant and benign liver tumors from 
ultrasonography based on GLCM texture features and fuzzy SVM. Expert Systems with 
Applications 2010;37(10):6737-6741. 
21. Bishop, C. M. Pattern recognition and machine learning. New York, NY: Springer-
Verlag: 2006. p. 205-207.   
22. Sarle, W. S. Stopped training and other remedies for overfitting. Computing science and 
statistics, 1996:352-360.