GithubHelp home page GithubHelp logo

wadpac / sundararajan-sleepclassification-2021 Goto Github PK

View Code? Open in Web Editor NEW
41.0 3.0 16.0 8.63 MB

Classification of sleep stages using accelerometer data

License: Apache License 2.0

R 4.49% Python 95.51%

sundararajan-sleepclassification-2021's Introduction

This repository includes the code corresponding to the various experiments and plots from the paper Sundararajan et al. 2021 Sleep classification from wrist-worn accelerometer data using random forests published in Nature Scientific Reports: https://www.nature.com/articles/s41598-020-79217-x.

How to apply the open access model to your data?

For instructions on how to use the trained sleep/wake/non-wear classification model see: https://github.com/wadpac/SleepStageClassification/blob/master/ggir_ext

sundararajan-sleepclassification-2021's People

Contributors

kalaivani-s avatar vincentvanhees avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

sundararajan-sleepclassification-2021's Issues

how to run it

Is there a "quickstart" document anywhere, otherwise I'll study the code.

I have XYZ binary raw accel sleep data and want to classify sleep stages (light, deep.., REM).

Results not being written to csv output

Thanks for sharing this great package!

When I run the package in 'binary' mode, I can see the 'wake_sleep' results when I load the RData file out of the 'basic' folder:
image

However, I do not see the 'wake_sleep' results in the csv file in the 'csv' folder:
image

Also, when I try to run the package in 'multiclass' mode I get a TypeError: unsupported operand type(s) for /: 'NoneType' and 'float' on line 54 from get_sleep_stage.py ( y_pred = y_pred/float(nfolds) )

Here is the way I am calling 'multiclass', do I need to change the input for 'colnames'?
image

BUG finding sleep states

There seems to be a bug in how sleeps states are found:
https://github.com/wadpac/SleepStageClassification/blob/5b288995e62bbd66faa66bd932b06af8a65f8445/preprocessing/preproc_psgnewcastle.py#L71

Below is a plot, on the top raw the sleep states derived from get_sleep_states and on the bottom the psg file sleep states. See the red circles, in the get_sleep_states are labeled as NaN, whereas in the original psg they are labeled:
image

In the middle of a psg recording period there should not be any NaNs as the psg data is always labeled.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.