Git Product home page Git Product logo

yasa_classifier's Introduction

yasa_classifiers

This repository contains the notebooks used to generate the pre-trained classifier of YASA sleep staging module. The main GitHub repository of YASA can be found here.

For more details on the algorithm and its validation, please refer to the preprint article.

The datasets can be found on sleepdata.org. You need to request data access to download the datasets. Specifically, training of the sleep staging classifier is done using the following datasets: CCSHS, CFS, CHAT, HomePAP, MESA, MrOS, SHHS.

If you have questions, please contact Dr. Raphael Vallat ([email protected]).

Steps

To reproduce all the results in the preprint article, you need to run the following scripts/notebooks in order:

  1. 00_randomize_train_test.ipynb: randomize NSRR nights to training / testing set. This assumes that you have previously downloaded the NSRR data on your computer (up to 4 TB).
  2. feature_extraction/01_features_*.ipynb: calculate the features for all the training nights.
  3. 02_create_classifiers.ipynb: train and export the sleep staging classifier.
  4. predict/03_predict_*.ipynb: apply the algorithm on testing nights.
  5. 04_validation_*.ipynb: evaluate performance on the testing sets (testing set 1 = NSRR, testing set 2 = DREEM).
  6. 05_SHAP_importance.py: calculate the SHAP features importance on the NSRR training set
  7. 06_nsrr_demographics.ipynb: compare the demographics and health data of the NSRR training / testing set.

In addition, the scripts in the gridsearch folder perform parameter searchs with cross-validation to find the best hyper-parameters, class weights and temporal smoothing windows.

yasa_classifier's People

Contributors

raphaelvallat avatar

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.