How the algorithm works

Jonathan
Written by Jonathan
Last update

Every 30 seconds, Dreem’s machine-learning algorithms determine what sleep stage you’re in. The hypnogram that you see every morning in the app is an overview of a full night of sleep stages.

Data extraction

100 values are extracted every 30 seconds from the Dreem Band’s different sensors (the electroencephalogram, accelerometer and pulse oximeter). These values include:

  • The number of movements
  • Slow oscillations
  • Sleep spindles- small bursts of fast rhythms whose amplitude increases and decreases.
  • K complexes- waves that are characteristic of the transition from light to deep sleep
  • Heartbeat
  • Etc…

Sleep stage interpretation

In order to define your sleep stages more accurately, our algorithm compares 30-second epochs of your sleep to a base of several hundred “scored” records by sleep specialists.

We use the long short term memory (or LSTM) model  which analyzes each current epoch against the last 20 epochs analyzed. Let’s say you’ve been in deep sleep for a few minutes, the LSTM model will take that into account when analyzing your current 30 second epoch.

Discover more about how sleep stages are defined