*2.2. Spatiotemporal Beamforming*

LCMV-beamforming was initially introduced to EEG analysis as a filter for source localization [26] to enhance the signal-to-noise ratio (SNR). Van Vliet et al. [20] first applied the spatiotemporal LCMV-beamformer as a method for the analysis of ERPs. The extension of this method to the combined spatiotemporal domain [20] and the data-driven approaches proposed by Treder et al. [27] and Wittevrongel et al. [21] allow for its application to classification problems.

For the following analyses, we assume that all EEG channels are normalized with zero mean and unit variance without loss of generality. Solving Equation (1) under the linear constraint given by Equation (2) returns the filter weights **w** defining the spatiotemporal LCMV-beamformer.

$$\arg\min \mathbf{w}^{\mathsf{T}} \mathsf{C} \mathbf{w}^{\mathsf{T}} \tag{1}$$

$$\mathbf{a}^{\mathsf{T}}\mathbf{w} = 1 \tag{2}$$

These weights minimize the variance of the output of the filter while enhancing the signal characterized by the constraint. **a** = vec(*A*) is the data-driven activation pattern,

**w**

a template of the signal of interest maximizing the difference between two classes of epochs, determined as follows:

$$\mathbf{a} = \frac{1}{|\text{class } 1|} \sum\_{\text{class } 1} \mathbf{x\_i} - \frac{1}{|\text{class } 2|} \sum\_{\text{class } 2} \mathbf{x\_i} \tag{3}$$

The method of Lagrange multipliers then gives the closed-form solution to the minimization problem posed by Equations (1) and (2) as:

$$\mathbf{w} = \frac{\mathbb{C}^{-1}\mathbf{a}^{\mathsf{T}}}{\mathbf{a}\mathbb{C}^{-1}\mathbf{a}^{\mathsf{T}}} \tag{4}$$

The beamformer can be applied to epochs (unseen or not) as:

$$y\_i = \mathbf{w} \mathbf{x}\_i \tag{5}$$

resulting in a scalar output *yi* per epoch. The linear constraint in Equation (2) ensures that the beamformer maps epochs containing a target response to a score close to one and, conversely, epochs not containing a target response to a score close to zero.
