This code uses scikit-learn to classify sleep based on acceleration and photoplethymography-derived heart rate from the Apple Watch.
This code uses Python 3.7.
Data collected using the Apple Watch is available on PhysioNet: link
The MESA dataset is available for download at the National Sleep Research Resource
Features + figures
All raw data are cleaned and features are generated in
analysis_runner.py can be used to generate figures showing classifier performance.
This software is open source and under an MIT license.