Skip to content

GWeindel/hmp

Repository files navigation

HMP

Warning

We are transitionning to a stable version of HMP 1.0.0 by spring 2026. There will be some bumps on the road sorry for that. The stable version 0.5.0 is usable but we recommend new users to start with the development branch as this will be closer to the future stable version (and is also the one presented on readthedocs: https://hmp.readthedocs.io/en/latest/welcome.html). In case of problem or questions because of the transition period don't hesitate to open issues, threads in the discussion section or drop an email to one of the contributor (e.g. see https://github.com/GWeindel).

HMP is an open-source Python package to analyze neural time-series (e.g. EEG) to estimate Hidden Multivariate Patterns. HMP is described in Weindel, van Maanen & Borst (2024, paper ) and is a generalized and simplified version of the HsMM-MVPA method developed by Anderson, Zhang, Borst, & Walsh (2016).

As a summary of the method, an HMP model parses the reaction time into a number of successive events determined based on patterns in a neural time-serie (e.g. EEG, MEG). Hence any reaction time (or any other relevant behavioral duration) can then be described by a number of cognitive events and the duration between them estimated using HMP. The important aspect of HMP is that it is a whole-brain analysis (or whole scalp analysis) that estimates the peak of trial-recurrent multivariate events on a single-trial basis. These by-trial estimates allow you then to further dig into any aspect you are interested in a signal:

  • Describing an experiment or a clinical sample in terms of events detected in the EEG signal
  • Describing experimental effects based on the time onset of a particular event
  • Estimating the effect of trial-wise manipulations on the identified event presence and time occurrence (e.g. the by-trial variation of stimulus strength or the effect of time-on-task)
  • Time-lock EEG signal to the onset of a given event and perform classical ERPs or time-frequency analysis based on the onset of a new event
  • And many more (e.g. evidence accumulation models, classification based on the number of events in the signal,...)

Documentation

The documentation for the latest version is available on readthedocs: https://hmp.readthedocs.io/en/latest/welcome.html

To get started

To get started with the code you can run the different tutorials in docs/source/notebooks after having installed HMP (see documentation)

Citation:

To cite the HMP method you can use the following paper:

Weindel, G., van Maanen, L., & Borst, J. P. (2024). Trial-by-trial detection of cognitive events in neural time-series. Imaging Neuroscience, 2, 1-28.

About

Repository for the hmp python package

Topics

Resources

License

Stars

Watchers

Forks

Contributors

Languages