mTRFpy: A Python package for temporal response functionanalysis
Ole Bialas, Jin Dou, Edmund C. Lalor
Abstract
Traditionally, studies on the neural processing of speech involved the repetitive display of isolated tokens (e.g., phonemes, words, sentences) where the properties of interest were carefully controlled.Recently, researchers have increasingly focused on investigating brain responses to more naturalistic speech like audiobooks (Hamilton & Huth, 2020).However, this approach demands statistical tools to account for the different sources of variance that naturally occur in speech.Among the most popular tools to model neural responses to naturalistic speech are multivariate temporal response functions (mTRFs).One of the most commonly used packages for computing mTRFs with regularized regression is the mTRF-toolbox (Crosse et al., 2016).However, this toolbox is implemented in the proprietary MATLAB language, restricting accessibility for parts of the scientific community.To overcome this constraint, we present mTRFpy, a Python package which replicates and advances the functionality of the original mTRF-toolbox.