## 2 Materials and Methods
### Logistic Regression with Gaussian Kernel and Laplacian Prior  
Logistic regression (LR) has been a common statistical learning model in pattern recognition and machine learning [38]. Strictly speaking, the applications of LR in EEG signal analysis is not new, as illustrated in the above introduction [39; 40; 41; 42; 43]. Despite this, the potential of the LR model for EEG-based emotion recognition has not been fully exploited. In this paper, we systematically introduced the logistic regression (LR) algorithm with Gaussian kernel and Laplacian prior [44; 45; 46] for emotion recognition with EEG signals. The goal of a supervised learning algorithm is to train a classifier using training samples in order to recognize the label of an input feature vector from different classes. In EEG-based emotion recognition, the major task is to assign the input EEG signals to one of the given classes. Especially in this study, two binary classification problems were posed for subject-dependent emotion recognition: The classification of LV/HV emotions, and LA/HA emotions. Using a multinomial LR (MLR) model [38; 44], the probability that the input feature \(\mathbf{x}_{i}\) belongs to emotion class \(k\) is written as  
\[p(y_{i}=k|\mathbf{x}_{i},\mathbf{w})=\frac{\exp(\mathbf{w}^{(k)}\mathbf{h}(\mathbf{x}_ {i}))}{\sum_{k=1}^{K}\exp(\mathbf{w}^{(k)}\mathbf{h}(\mathbf{x}_{i}))}, \tag{6}\]  
where \(\mathbf{x}_{i}\) is the feature vector extracted from the original EEG sequences, and \(\mathbf{h}(\mathbf{x}_{i})\) indicates a vector of functions of the input feature vector \(\mathbf{x}_{i}\), and \(\mathbf{w}\equiv\left[\mathbf{w}^{(1)^{\text{T}}},\dots,\mathbf{w}^{(K)^{\text{T}}}\right] ^{\text{T}}\) is the logistic regressors. For binary classification tasks (\(K=2\)), this is known as LR model, for \(K>2\), the usual designation is MLR [44]. Although emotion recognition in this paper is binary classification, the formula of MLR is presented here for completeness. On one hand, this does not affect the understanding of the model, on the other hand, this makes it easy to extend to the cases when handling multiple emotion classes. Note that the function \(\mathbf{h}(\mathbf{x}_{i})\) can be linear or nonlinear. For the latter case, kernel functions can be selected to further enhance the separability of extracted features in the transformed space. In this study, the Gaussian kernel is utilized, given by  
\[K(\mathbf{x}_{i},\mathbf{x}_{j})=\exp(-\parallel\mathbf{x}_{i}-\mathbf{x}_{j} \parallel/(2\rho^{2})), \tag{7}\]  
In this paper, the training of the LR classifier using labeled EEG epochs amounts to estimate the class densities and learn the logistic regressor \(\mathbf{w}\). Following the formulation of the sparse MLR (SMLR) algorithm in [44], the solution of \(\mathbf{w}\) is given by the maximum a posteriori (MAP) estimate  
\[\hat{\mathbf{w}}=\text{argmax}_{\mathbf{w}}\ell(\mathbf{w})+\log p(\mathbf{w}), \tag{8}\]  
where \(\ell(\mathbf{w})\) indicates the log-likelihood function given as following:  
\[\ell(\mathbf{w})=\log\prod_{i=1}^{L}p(y_{i}|\mathbf{x}_{i},\mathbf{w})\,, \tag{9}\]where \(L\) denotes the number of training samples, and  
\[p(\mathbf{w})\propto\exp(-\lambda\parallel\mathbf{w}\parallel_{1}), \tag{10}\]  
denotes the Laplacian prior, where \(\parallel\mathbf{w}\parallel_{1}\) indicates the L1 norm of \(\mathbf{w}\), and l is the regularization parameter. The Laplacian prior forces the sparsity on the logistic regressors \(\mathbf{w}\), and promote many components of \(\mathbf{w}\) equal to zero [45, 46]. The obtained sparse regressor reduces the complexity of the LR classifier and, therefore, avoids over-specification in EEG-based emotion classification. The convex problem in Equation (8) is difficult to optimize for the nonquadratic property of the term \(\ell(\mathbf{w})\) and the non-smoothness of the term \(\log p(\mathbf{w})\). The studies in [44, 60] decomposed the problem in Equation (8) into a sequence of quadratic problems using a majorization-minimization scheme [61].