Here, you’ll find more information about the paper, models, and equipment. Detailed information about the code and how to use it is in the repository.

Paper’s Results


Meta-analysis comparison of PSG- and CSG-based sleep staging

The main takeaway from the paper is that our model performs equivalently to human-scored PSG. To make this comparison, we performed a meta-analysis using the data from 11 human-to-human studies to get the overall and stage-specific kappas that can be expected for humans. Then, we compared our results against the human performance.

Forest plots for overall and stage-specific kappas and our model’s performance. At the top are the forest plots for the random-effects estimates for overall and each stage-specific Cohen’s kappa (κ) for human-to-human inter-rater agreement on PSG. We list the source inputs chronologically, with each mean kappa and CI to the right. Per convention, the gray square for each represents their weight. The unfilled black diamonds represent the random-effects estimates (width representing each estimate’s 95% CI), and the whiskers extending from the diamonds represent the 95% PIs. The black vertical dotted lines also indicate the random-effects estimates. At the bottom are the overall and five-stage kappas of our primary model based on single-lead ECG evaluated on our testing set. All non-inferior comparisons using a t-test are significant (i.e., noninferior; *p < 0.025)—except for N3 (not non-inferior).

alter-text

Available Models

There are currently three models in the repository that anyone can use to score their own ECG data:

  1. Primary model
    • This model is designed to take an entire night’s worth of sleep and score it all at once.
  2. Real-time model
    • This model is designed to take just the data that has been recorded up till “now” and score it all at once. As each new 30-second epoch of data is recorded, the model can be run again.
  3. NEW Primary model without demographics
    • This model was not in the paper, having been trained just recently.
    • The model works the same way as the primary model, except you do not need to provide the demographics (age and sex) of the subject.
    • There is a slight (<1%) performance impact, as measured with Cohen’s kappa, compared to the original primary model.

ECG Equipment

Unfortunately, there are few commercial ECG recording devices on the market right now. I am only aware of two devices that could possibly work and be worn comfortably while asleep. However, I have not personally tried either yet, so I cannot vouch for them. (Blog update: I’ve begun testing them.)

However, if you are using clinical or research equipment to record ECG there are a few important details to keep in mind:

  • The recording should be of Lead I (limb lead across the heart). See ECG Lead positioning for the proper locations of the “RA” and “LA” electrodes.
  • The sampling rate should be a minimum of 125 Hz. Higher is better, with the “optimal” rate for the network’s input being 256 Hz.
  • The sampling resolution should be a minimum of 16 bits. Higher is better.

References

Our paper

If you find this repository helpful, please cite the paper:

Additional works cited

Readers and Mentions

Expert-level sleep staging using an electrocardiography-only feed-forward neural network