Tag Archives: machine learning

Fitbit, Machine Learning, and Sleep Optimization


Photo: Fitbit Blog

My big present for Christmas this year was a Fitbit Charge 2. I’d wanted one for a while, but not for anything Fitness related. While I do like to keep track of my active lifestyle choices, I didn’t desire one with fitness in mind at all. My model Fitbit’s key feature (the reason I ditched my reliable $10 Casio watch for it) is its heart rate monitor. The monitor on my Charge 2 takes the form of two green, rapidly flashing LED lights. Visually and technically, it’s similar to the light you may be familiar with seeing underneath an optical mouse. Instead of tracking motion, though, this light’s reflection keeps track of the subtle changes in my skin’s color as blood pumps in and drains from my capillaries. It sends the data on time between color changes to my phone, which sends the information through a proprietary algorithm to determine my heart rate. Other algorithms take into account my average heart rate and my lowest heart rate to calculate my resting heart rate (55).

But in the end, these are all just numbers. Some people (like me) just like having this data, but what can you actually do with it? Well, the Fitbit has another interesting feature. It uses your heart rate and motion information to determine when you’ve fallen asleep, when you’ve woken up, and whether you’re sleeping deeply or restlessly. I can check my phone every morning for a graphical representation of my sleep from the previous night, and determine how well I slept, how long I slept, and how my sleep fits in with my desired regular schedule (11:45 to 7:45). Kind of cool, right?

With a new market emphasis on machine learning, and sleep researchers making strides in answering fundamental questions, things are about to get a lot cooler.

Everybody has experienced miraculous three-hour slumbers that leave them feeling like they slept a full night, and heartbreaking ten-hour naps that make them question whether they slept at all. Although most of us consider those simple anomalies, scientists have caught on, and are actively studying this phenomenon. From what I’ve gleaned online, scientists that study sleep find that allowing a sleeping subject to complete REM cycles (lasting about 90 minutes, with variation) results in fuller and more restoring sleep. In other words, 7 hours and 30 minutes can result in a better sleep than a full 8 hours. It sounds like quackery, but the evidence is widely available, peer-reviewed, and convincing to the layperson.

Machine learning has been a buzzword for at least the past year. The concept itself is worthy of an entire post, but to summarize it for my purposes, it’s a broad term that refers to programming algorithms that adjust their behavior based on data input. For example, programs that predict what a customer wants to buy will show ads to that customer on a variety of platforms and decide where to show those ads more often, based on how much time the customer spends on each platform. Machine learning is essentially automating programs to use big data to improve their predictive or deductive capabilities.

Let’s bring this all together for a look into the future: If my Fitbit can keep track of my heartbeat to a precise enough degree to determine when I am in REM sleep — or can use an intelligent, learning-capable algorithm to set alarms that give me an optimal amount of sleep — I can have a personalized, automatic alarm that adapts to my habits and improves my quality of rest. Would that convince you to buy one?