Skip to main content

Package for fitting Hidden Multivariate pattern model to time-series

Project description

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.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

hmp-1.0.0b3.tar.gz (63.0 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

hmp-1.0.0b3-py3-none-any.whl (50.0 MB view details)

Uploaded Python 3

File details

Details for the file hmp-1.0.0b3.tar.gz.

File metadata

  • Download URL: hmp-1.0.0b3.tar.gz
  • Upload date:
  • Size: 63.0 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for hmp-1.0.0b3.tar.gz
Algorithm Hash digest
SHA256 384c327c3f85d308e93d4f37930945a99e82056244f47c5ee8dc09d24c82085b
MD5 2a3f863f6c01f077da71c6fb331fc5db
BLAKE2b-256 8b40cef769947ca00d93882a5e915356c4df302fb4ef2930614de64b4beba5e4

See more details on using hashes here.

File details

Details for the file hmp-1.0.0b3-py3-none-any.whl.

File metadata

  • Download URL: hmp-1.0.0b3-py3-none-any.whl
  • Upload date:
  • Size: 50.0 MB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for hmp-1.0.0b3-py3-none-any.whl
Algorithm Hash digest
SHA256 e1e4c8487f7e119683e2003cb12ed667f86b09735f4be75d98618c5d044e457d
MD5 326018af094db71c4f96e982fe7277a2
BLAKE2b-256 ca70c4b03ee57ac3b4b8d62cba8652dd6fd331548f1765b435afeb5265167654

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page