项目作者: carlosloza
项目描述 :
A new take on EEG sleep spindles detection exploiting a generative model (dynamic bayesian network) to characterize reoccurring dynamical regimes of single-channel EEG.
高级语言: MATLAB
项目地址: git://github.com/carlosloza/spindles-HMM.git
spindles-HMM
Code to replicate all results, tables, and figures of paper “Robust autoregressive hidden semi–Markov models applied to EEG sleep spindles detection”
Requirements
- MATLAB R2016b or newer (the implemented algorithms require broadcasting capabilities)
- Statistics and Machine Learning Toolbox
- Signal Processing Toolbox
- Parallel Computing Toolbox (optional, but extremely recommended for EM-based learning)
- python 3
- jupyter notebook
- matplotlib
- daft to plot the probabilistic graphical model
Data
- DREAMS sleep spindles dataset
Instructions
- Add “Main_Code” folder to MATLAB path
- Download DREAMS sleep spindles dataset. A reliable source is here (make sure to download the DatabaseSpindles.rar file). Unpack .rar file.
- Run
reformatDREAMS.m
script to reformat and downsample the EEG and expert labels - Algorithms/scripts in the “DREAMS” folder are now ready to be run. These are the scripts that replicate results, tables, and Figure 2
- (Optional) Set up a python environment with matplotlib and daft to run
RARHSMM_GraphicalModel.ipynb
on a jupyter notebook
PS1: All main code is MATLAB, python is only used to render the probabilistic graphical model of Figure 1
PS2: The DREAMS sleep spindles dataset used to be hosted here but that
website has been down for quite some time now