Doctors tell patients that a healthy lifestyle requires a nutritious diet, exercise, and adequate sleep. And they can give you lots of tips on the right food and activity level. But they understand much less about the causes of insomnia, how it affects individuals, and how to help those suffering from poor sleep.
The Woolcock Institute of Medical Research in Sydney is using data science to discover how treatment can be tailored to a patient's insomnia characteristics. Specifically, Woolcock researchers are studying the brain signals of sleeping patients to understand the physiology of insomnia in greater depth.
Using Oracle Autonomous Data Warehouse, Woolcock researchers can build a data model in as little as an hour versus the weeks or more it used to take using shared high-performance computer resources. By using machine learning to automate many of the steps in the data science process, Woolcock researchers can dive into problem-solving sooner.
"With Oracle, we don't have to focus so much on the technical part, we can focus on what's needed to sleep,” says Dr. Tancy Kao, a data scientist at the Woolcock Institute. The institute is a network of more than 200 researchers and clinicians working to improve sleep and respiratory health globally through research, clinical care, and education.
Types of Insomnia
At some point in their lives, most adults will complain of trouble sleeping. Acute insomnia tends to be circumstantial, such as the lack of sleep one gets when they're nervous about giving a speech or upset about losing a job. Chronic insomnia, which tends to affect adults age 40 to 60, is the inability to sleep well for three or more nights per week for at least a month, according to Kao.
One form of chronic insomnia is the "wired and tired" brain that suffers from a less-than-normal sleep duration. These individuals have trouble falling asleep or staying asleep, so their total sleep time is about three to four hours per night versus healthier individuals who sleep seven to eight hours.
"Paradoxical insomniacs" sleep for the same duration as healthy patients, but their EEG slow wave activity—deep sleep—is comparatively weak.
Sleep duration and sleep quality are both important, although sleep quality matters more. When a person doesn't sleep well for prolonged periods, they are at a higher risk of anxiety, depression, high blood pressure, and heart disease.
One-third of Australians will experience insomnia at some point in their lives, the Woolcock estimates.
"There are all these people with insomnia that aren't treated effectively, so the data science is going to let us understand the condition better and look for new treatments that are going to be targeted based on our understanding of the condition," says Christopher Gordon, associate professor at the University of Sydney, and a contributor to the Woolcock's research.
Right now, the two most typical treatments are pills to temporarily relieve symptoms, and cognitive behavior therapy (CBT) which identifies and treats the root causes of insomnia. Both treatments have limitations because people tend to take sleep aids for too long and not everyone is willing to go to or stay in therapy.
"It really is a 24-hour condition, not just something associated with sleep," Gordon says.
Data Science Helps Provide Answers
The Woolcock Institute collects a lot of data about individual patients, including a detailed questionnaire about patients' perceived sleep patterns, medical history, work environment, and home environment. They collect two weeks of data from a wearable activity monitor, observations from a sleep lab, and diary entries that track behavioral factors, such as caffeine and alcohol intake.
Data science is used to connect habits to sleep changes to identify which activities and the activity duration help or hurt their sleep.
“For example, is it an indoor or outdoor activity? Are they spending more time chatting with friends and family, or did they consume more drinks?" says the Woolcock Institute's Kao. "This helps us understand who can get the most benefits from the activities and who cannot."
A major source of data comes from patients spending a night in the institute’s sleep lab, hooked up to a high-density electroencephalogram (EEG) device. The device records brain activity from 256 electrodes every 2 milliseconds at a sample rate of 500 hertz. The result is millions and sometimes billions of data points per patient.
The Woolcock uses Oracle Autonomous Data Warehouse, running on Oracle Cloud Infrastructure for data collection, preparation, and analysis. The team can then separate the different types of data, helping researchers understand the relationships among variables.
Before using Oracle Autonomous Data Warehouse, Kao had to manually clean the data and study individual variables and their relationships. Only after that could she prepare the data for analysis, build models, and do the actual analysis. If there was data missing from a variable, she would have to determine what to do next.
Kao likes how the Oracle Autonomous Data Warehouse offers suggestions for doing analysis and using machine learning, and she can decide whether a suggestion is helpful.
"You can follow the suggestions to clean your data, explore the data plot of all the variables, and understand what the chain looks like,” Kao says. “It also gives you simple classifications, and you can decide whether the classification is reasonable or not and whether we should use it in machine learning."
Previously, the Woolcock was storing data on servers and using a high-performance computer for analysis, and the process for using it was technical and time-consuming. With that previous system, "you have to use Linux commands to assign a task like modeling or machine training. If you want to visualize the result, you have to go back to the computer," Kao says. "When you submit one modeling task, it may take two or three days to come back with the results. It depends on how heavy, how demanding your machine learning is to do that."
Building an entire model used to take one or two months, assuming it proved accurate. If the model wasn't accurate, it meant starting over. Now, Kao can build a model in as little as an hour without coding or having to understand mathematical modeling. Kao does know how to do all of that—she can work in R and Python, use Linux commands, and she understands mathematical modeling well—but Oracle Autonomous Data Warehouse saves her time by automating a lot of the manual work she and Gordon had to do previously.
"We have tremendous amounts of data on [each] individual patient, and we need to be able to process that data quickly," Gordon says. "I can look at it through various mechanisms, different ways of visualizing it, come up with different ideas and then we can just literally click buttons to do the machine learning, and we can explore the models that we think are going on, and it gives us the answers right away."
Data Visualizations Will Get More Sophisticated
So far, the Woolcock has built a 2D visualization that shows the location in the brain of each of the 256 channels and the importance of individual variables as they relate to a specific patient’s insomnia.
The goal is to build 3D visualizations, so the researchers can understand the path of individual signals as they travel from one part of the brain to another. Doing so could let them not only understand what’s happening in one part of the brain, but also how it might affect other areas, and whether it’s related to a given symptom.
"Oracle can show you how the brain wave changed or moved across the brain overnight,” Kao says. “It helps us not only identify the parts of that brain that play a role in insomnia but how these areas talk to each other."
Author: Lisa Morgan | Brand Contributor, Oracle