A new machine can detect sleep disorders in your patients

By Lisa Marie Basile | Fact-checked by MDLinx staff
Published April 13, 2023

Key Takeaways

  • A new study in PLOS ONE examined the use of machine learning model XGBoost to determine sleep disorder risk. 

  • The study looked at 7,929 American subjects of different backgrounds. It included 684 variables, including diet, exercise routine, mental health, physical examinations, and demographic.

  • The findings showed that depression, physician recommendation to exercise, weight, age, and waist circumference were the variables most associated with the risk of sleep disorder.

A new study explores the use of machine learning to identify risk factors for sleep disorders like insomnia.[] The study’s findings offer much-needed insight at a time when an estimated 50-70 million Americans have a chronic sleep disorder, according to the National Heart, Lung, and Blood Institute.[] 

Sleep disorders have been linked to health concerns like heart disease, depression, diabetes, and stroke

The study’s researchers, based out of Virginia Commonwealth University School of Medicine as well as Northwestern Feinberg University School of Medicine, used a machine learning model called XGBoost to analyze data from 7,929 American subjects, all of whom had completed the National Health and Nutrition Examination Survey.[]

This survey uses both interviews and physical examinations and is run by the National Center for Health Statistics (NCHS), which is part of the Centers for Disease Control and Prevention (CDC). 

What is XGBoost and how does it help predict sleep disorder? 

According to the Journal of Rock Mechanics and Geotechnical Engineering, XGBoost (short for Extreme Gradient Boosting) is “a powerful, scalable tree boosting machine learning framework and a sparsity-aware algorithm for sparse data.[]

For efficient performance, XGBoost implements the architecture of gradient boosted decision tree which could yield high accuracy in both classification and regression tasks.” In the healthcare field, it has been applied in disease prediction and gene expression prediction.

XGBoost helps researchers actually visualize the contribution of each risk factor in a predictive model. 

It’s worth noting that the researchers utilized four different machine learning methods, but XGBoost was ultimately used due to its “increased predictive accuracy in healthcare prediction,” according to the authors.  

A look at the findings

Of the 7,929 patients included in the study, 51 percent were female, while 49 percent were male. The study included 36 percent white subjects, 27 percent Black subjects, 21 percent Hispanic subjects, and 16 percent other subjects. 

A total of 2,302 patients had a diagnosed sleep disorder. This was determined by patients who answered “yes” to the survey question, “Have you ever told a doctor or other healthcare professional that you have trouble sleeping?”

The findings showed a bevy of health condition associations with sleep disorders like insomnia. For each patient, the data looked at 684 variables; these included diet, exercise routine, mental health, physical examinations, and demographic.  

The variables most strongly associated with sleep disorder include:

  • Depression: Patient health questionnaire depression survey (the higher the score on this survey, the more likely a patient is to have a sleep disorder).

  • Age: Sleep disorder risk increases between the ages of 20 and 60. 

  • Recommendation to exercise more: Patients told by physician to exercise.

  • Weight: Patients weighing more than 176 pounds.

  • Waist circumference: Patients with a waist circumference higher than 39.3 inches. 

The authors also noted that while prior literature has shown a correlation between alcohol and caffeine intake leading to poor sleep latency and difficulty falling asleep, respectively, the machine learning tools echoed this—increasing the confidence around these associations.

Why this study is different: Benefits and limitations

“This study aims to help clinicians and the public unpack the “black box” that is machine learning and give insight into more robust ways of examining risk factors,” author Samuel Y. Huang tells MDLinx

The “black box” Huang speaks of references how, in machine learning, the path to an answer is not always provided. In other words, he hopes the studies provide a glimpse into how machine learning models come to its results.[] 

You may have also seen other studies on insomnia utilizing machine-learning methods. However, the authors note that this study’s best asset comes from its large dataset—including its nearly 8,000 subjects and its diversity of covariates.[]  

The machine learning model also reduces bias on the part of the researcher, the authors add. “The greatest strength of this algorithmic method for identification of the covariates is the ability to search through hundreds of covariates systematically without relying upon judgment from the researcher, which may be muddled by potential personal biases,” the authors write. This is because the method ranks every single covariate in order of risk, allowing the researcher to understand exactly how any given variable affects a patient’s risk of sleep disorder.

The study does have its limitations, however. It utilizes self-reported survey information from volunteers (versus randomly chosen subjects) and requires the retrospective nature of its cohort. It may also be best equipped to predict sleep risk for this cohort—not necessarily others.

What might this mean for physicians?

Samuel Y. Huang, author of the study, tells MDLinx, “The outputs from machine learning methods will be used to aid in physician clinical reasoning to come to more accurate diagnoses that will be more personalized to patients.”

He also adds that machine learning will only get better with time. “These methods will continue to improve as we have higher quality data, more interpretable models, less bias in algorithms, and increased understanding amongst healthcare providers,” Huang says.

Share with emailShare to FacebookShare to LinkedInShare to Twitter
ADVERTISEMENT