Skip to content


Folders and files

Last commit message
Last commit date

Latest commit


Repository files navigation

NeVRo – Neuro Virtual Reality Rollercoasters


Decoding subjective emotional arousal from EEG during an immersive Virtual Reality experience

Code base of: Hofmann*, Klotzsche*, Mariola*, Nikulin, Villringer, & Gaebler. eLife, 2021
* : equal contribution version


We used virtual reality (VR) to investigate emotional arousal under naturalistic conditions. 45 subjects experienced virtual roller coaster rides while their neural (EEG) and peripheral physiological (ECG, GSR) responses were recorded. Afterwards, they rated their subject levels of arousal retrospectively on a continuous scale while viewing a recording of their experience.


We tackled the data with three model approaches. The corresponding code can be found in the respective folders.

SPoC Model

Source Power Comodulation (SPoC) decomposes the EEG signal such that it maximizes the covariance between the power-band of the frequency of interest (here alpha, 8-12Hz) and the target variable (ratings).

CSP Model

Common Spatial Pattern (CSP) algorithm derives a set of spatial filters to project the EEG data onto components whose band-power maximally relates to the prevalence of specified classes (here low and high arousal).

LSTM Model

Long Short-Term Memory (LSTM) recurrent neural networks (RNNs) were trained on alpha-frequency components of the recorded EEG signal to predict subjective reports of arousal (ratings).


version 2.1+

2021: additional linear model, new cross-validation regime, and further sub-analyses. Encouraged by valuable feedback via this peer-review. This version is the basis of the eLife publication.

version 2.0

2018-2020: preprocessing for models (SPoC, CSP, LSTM) was harmonized, and their evaluation and metrics were adapted accordingly. Plus, a more detailed documentation is available. Code for extended & harmonized version of the study (see bioRxiv preprint).

version 1.x

2017-2018: Code of two IEEE conference publications:


Simon M. Hofmann
Felix Klotzsche
Alberto Mariola