Transfreq: A Python package for computing the theta-to-alpha transition frequency from resting state electroencephalographic data

Hum Brain Mapp. 2022 Dec 1;43(17):5095-5110. doi: 10.1002/hbm.25995. Epub 2022 Jun 30.

Abstract

A classic approach to estimate individual theta-to-alpha transition frequency (TF) requires two electroencephalographic (EEG) recordings, one acquired in a resting state condition and one showing alpha desynchronisation due, for example, to task execution. This translates into long recording sessions that may be cumbersome in studies involving patients. Moreover, an incomplete desynchronisation of the alpha rhythm may compromise TF estimates. Here we present transfreq, a publicly available Python library that allows TF computation from resting state data by clustering the spectral profiles associated to the EEG channels based on their content in alpha and theta bands. A detailed overview of transfreq core algorithm and software architecture is provided. Its effectiveness and robustness across different experimental setups are demonstrated on a publicly available EEG data set and on in-house recordings, including scenarios where the classic approach fails to estimate TF. We conclude with a proof of concept of the predictive power of transfreq TF as a clinical marker. Specifically, we present a scenario where transfreq TF shows a stronger correlation with the mini mental state examination score than other widely used EEG features, including individual alpha peak and median/mean frequency. The documentation of transfreq and the codes for reproducing the analysis of the article with the open-source data set are available online at https://elisabettavallarino.github.io/transfreq/. Motivated by the results showed in this article, we believe our method will provide a robust tool for discovering markers of neurodegenerative diseases.

Keywords: clustering; machine learning; neurodegenerative diseases; power spectrum; quantitative EEG; transition frequency.

Publication types

  • Research Support, Non-U.S. Gov't

MeSH terms

  • Algorithms
  • Alpha Rhythm
  • Electroencephalography* / methods
  • Humans
  • Theta Rhythm*