HMM-MNE is a Python module implementing Hidden Markov Modeling (HMM) for electrophysiological data using the methods described in [1].
The HMM inference is preformed using the hmmlearn library.
Notebooks
Simulation of transient high frequency events, adapted from [2] and [3].
Implementation of the Time Delay Embedded HMM (TDE-HMM). Unlike the simple thresholding approach, this model embeds at each time point a lagged representation of the signal [t-n:t+n], and has then access to the whole frequency spectrum, and is able to disambiguate between burst of different frequencies.
The frequency content of the three states show that the model successfully discriminated between the noise, the 40 Hz and the 25 Hz burst.
This repository contains Python adaptation for some of the functionalities proposed by the HMM-MAR toolbox [4]. It was created for educational purpose. You should refer to the original Matlab toolbox if you want to use HMM for research.
[1] | Vidaurre, D., Hunt, L. T., Quinn, A. J., Hunt, B. A. E., Brookes, M. J., Nobre, A. C., & Woolrich, M. W. (2018). Spontaneous cortical activity transiently organises into frequency specific phase-coupling networks. Nature Communications, 9(1). https://doi.org/10.1038/s41467-018-05316-z |
[2] | Quinn, A. J., van Ede, F., Brookes, M. J., Heideman, S. G., Nowak, M., Seedat, Z. A., … Woolrich, M. W. (2019). Unpacking Transient Event Dynamics in Electrophysiological Power Spectra. Brain Topography, 32(6), 1020–1034. https://doi.org/10.1007/s10548-019-00745-5 |
[3] | https://github.com/OHBA-analysis/Quinn2019_BurstHMM |
[4] | The HMM-MAR toolbox: https://github.com/OHBA-analysis/HMM-MAR |