# A Predictive Method for Temperature Based on Ensemble EMD with Linear Regression
## 2 Ensemble EMD with LR Related Works
### Linear Regression  
The linear regression (LR) model [42], a statistical tool, is utilized to establish linear connections between variables. By capturing the linear correlation between the independent variables (features) and the dependent variable, this model enables the prediction of unknown observations. When applied to temperature prediction, the LR model can be used to scrutinize the correlation between the temperature and various influencing factors such as the season, geographic location, altitude, and more. By gathering historical temperature data and data associated with these factors as independent variables, the LR model can formulate the mathematical relationship between the temperature and these factors. Subsequently, leveraging this relationship, the LR model can make forecasts about future temperatures. This methodology can benefit meteorologists, agricultural specialists, urban planners, and others by leveraging past data to forecast upcoming temperature changes, and thereby facilitates informed decision-making and planning [43]. Below is a concise overview of the procedure involved in decomposing data using the LR technique. Figure 2: Sin EEMD decomposition chart. The simplest and most straightforward relationship between feature \(x\) and target \(y\) is a linear relationship. Each feature is associated with a weight that directly influences the expression of the target. Assume that the linear model is constructed with the expression shown in Equation (4). \[Y=\beta_{0}+\beta_{1}x_{1}+\ldots+\beta_{t}x_{t}+\varepsilon \tag{4}\]  
where \(x=(x_{1},x_{2},x_{3},\ldots,x_{t-1},x_{t})\) represents the input \(t\)-dimensional feature vector, also known as the independent variables. \(Y\) is the target and also the dependent variable. \(\beta_{0}\) is termed the intercept; (\(\beta_{1}\), \(\beta_{2}\),..., \(\beta_{t-1}\), \(\beta_{t}\)) are referred to as the slope coefficients; \(\varepsilon\) is the error term, which is independent of the model and follows a normal distribution \(N(0,\,\sigma^{2})\). In a figurative sense, the linear model adheres to the _LINE_ criteria. Here, \(L\) represents linearity, which indicates that the correlation between the target and the independent variables is linear. \(I\) stands for independence, denoting that the error terms are mutually independent. \(N\) signifies normality, which suggests that the error terms follow a normal distribution. \(E\) denotes equal variance, which indicates that error terms have constant variance. Actually, Equation (4) can be simplified into Equation (5). \[Y=X\beta+\varepsilon \tag{5}\]  
Here, \(Y\), \(X\), \(\beta\), and \(\varepsilon\), in Equation (5), respectively, can be substituted for Equations (6)-(9). \[Y=(y_{1},y_{2},y_{3},\ldots,y_{t-1},y_{t})^{T} \tag{6}\]  
\[X=\left[ \begin{array}{cccc}1&x_{11}&\ldots&x_{n1}\\ 1&x_{21}&\ldots&x_{n2}\\ \ldots&\ldots&\ldots&\ldots\\ 1&x_{t1}&\ldots&x_{nt}\end{array} \right] \tag{7}\]  
\[\beta=(\beta_{1},\beta_{2},\beta_{3},\ldots,\beta_{t-1},\beta_{t})^{T} \tag{8}\]  
\[\varepsilon=(\varepsilon_{1},\varepsilon_{2},\varepsilon_{3},\ldots, \varepsilon_{t-1},\varepsilon_{t})^{T} \tag{9}\]  
where the \((\ldots)^{T}\) in the above equations represent the transposition of the matrix. The model's goodness is generally evaluated by the sum of the squared residuals, as shown in Equation (10). Equation (10) is commonly referred to as the residual sum of squares (RSS). \[L=\frac{1}{n}\sum_{i=1}^{n}(\widehat{y_{i}}-y_{i})^{2} \tag{10}\]  
During experiments, the aim is to minimize this loss by adjusting \(\beta\); thus, \(\beta\) becomes the coefficients to be estimated for the model. Linear regression is a convex optimization problem, with its loss function being strictly convex. There must exist an optimal value within the interval; thus, Equation (11) exists. \[\hat{\beta}=\underset{\beta}{\text{\emph{argmin}}}(y-X\beta)^{2}=(X^{T}X)^{-1 }X^{T}Y \tag{11}\]  
This equation requires that \(X^{T}X\) is invertible, which involves linear space theory and requires solving cases accordingly.