# Long-Term EEG Component Analysis Method Based on Lasso Regression
## 2 Methods
### Lasso Regression  
Regression analysis is a predictive modeling technique that studies the relationship between dependent variables and independent variables. This technique is commonly used for time-series models and discovering causal relationships between variables. Because emotions change over time, an emotional value is not enough to represent the dynamic emotions evoked by music. Therefore, regression analysis is applied to catch the dynamic changes in time.  
Multivariable linear regression is a statistical method used to study the relationship between variables in random phenomena [35], assuming that the dependent variable \(Y\) has a linear relationship with multiple independent variables {\(X_{1}\), \(X_{2}\),..., \(X_{k}\)}. It is a multiple linear function of the independent variables, which is called a multiple linear regression model, defined as:  
\[Y\ =\ \beta_{0}+\beta_{1}X_{1}+\beta_{2}X_{2}+\cdots+\beta_{k}X_{k}+\mu \tag{9}\]  
where \(Y\) is the dependent variable, \(X_{j}\) (\(j\) = 1, 2,..., \(K\)) are the independent variables, \(\beta_{j}\) (\(j\) = 0, 1, 2,..., \(K\)) is \(K+1\) parameters, and \(\mu\) is random errors.  
The linear equation between the expected value of the dependent variable \(Y\) and the independent variables {\(X_{1}\), \(X_{2}\),..., \(X_{k}\)} is:  
\[E(Y)\ =\ \beta_{0}+\beta_{1}X_{1}+\beta_{2}X_{2}+\cdots+\beta_{k}X_{k} \tag{10}\]  
For \(n\) groups of observations \(Y_{i}\), \(X_{1i}\), \(X_{2i}\),..., \(X_{ki}\) (\(i\) = 1, 2,..., \(n\)), the equations are in the form:  
\[Y_{i}\ =\ \beta_{0}+\beta_{1}X_{1i}+\beta_{2}X_{2i}+\cdots+\beta_{k}X_{ki}+ \mu_{i},\ (i\ =\ 1,\ 2,\ \ldots,n) \tag{11}\]  
which is:  
\[\left\{\begin{array}{l}Y_{1}\ =\ \beta_{0}+\beta_{1}X_{11}+\beta_{2}X_{21}+ \cdots+\beta_{k}X_{k1}+\mu_{1}\\ Y_{2}\ =\ \beta_{0}+\beta_{1}X_{12}+\beta_{2}X_{22}+\cdots+\beta_{k}X_{k2}+\mu_{2}\\ \vdots\\ Y_{n}\ =\ \beta_{0}+\beta_{1}X_{1n}+\beta_{2}X_{2n}+\cdots+\beta_{k}X_{kn}+\mu_{n} \end{array}\right. \tag{12}\]  
where its matrix form is defined as:  
\[Y\ =\ X\beta+\mu \tag{13}\]  
In fact, a phenomenon is often related to multiple factors. The optimal combination of multiple independent variables is more effective and more realistic than using only one independent variable. Therefore, multiple linear regression has more practical value.  
Least Absolute Shrinkage and Selection Operator (Lasso) regression is proposed by [PERSON] in 1996 to obtain a better model by constructing a first-order penalty function [36]. It puts particular variables into a model to get better performance parameters, instead of putting all the variables into the model for fitting. The complexity of the model is well controlled by the parameter \(\lambda\), which could be used to avoid over-fitting [37].  
\[\hat{\beta}\ =\ argmin\Big{\{}(Y-X\beta)^{2}+\lambda|\beta|\Big{\}} \tag{14}\]  
where the parameter \(\lambda\) is a penalty factor. The larger the \(\lambda\), the stronger the punishment for the linear model with variables. Therefore, a model with fewer variables is finally obtained.  
The fitting coefficient, the parameter \(\lambda\), is usually defined as the smallest or standard error (SE) value. One has the best fitting effect, and the other is the better value taking into account the calculation. To obtain the best fitting result, the minimum value is considered the constraint condition in this article.