# A Predictive Method for Temperature Based on Ensemble EMD with Linear Regression
## 3 Methodology
The data of each sub-sequence are partitioned into training and test sets. The training data are utilized for machine learning model training, while the testing data evaluate the trained model's performance;
3. Each sub-sequence's training data are implemented to sequentially train the corresponding model. For instance, the LSTM model is trained in the EEMD-LSTM and the LR in the EEMD-LR. These training processes are independent of each other. Following model training, we form the models LSTM\({}_{i}\), and LR\({}_{i}\) (\(i=1\), \(2\), \(3\), \(\ldots\), \(n-1\), \(n\)). We then employ these trained models to forecast the respective test data of the sub-sequences, generating prediction results \(TP_{i}\) (\(i=1\), \(2\), \(3\), \(\ldots\), \(n-1\), \(n\));
4. Various fusion techniques are available for combining the prediction outcomes from numerous sub-sequences to derive the ultimate temperature prediction result. In this study, the chosen fusion technique is summation. This method entails aggregating the prediction outcomes of each individual sub-sequence test dataset and culminates in the final result of temperature prediction;
5. In conclusion, the forecasted outcomes are contrasted with the actual results from the test data utilizing three assessment standards (RMSE, MAE, and R\({}^{2}\)) to compute forecasting errors and assess the model's strengths and weaknesses. EEMD (ensemble empirical mode decomposition) is a data-driven decomposition method that is particularly effective in analyzing non-linear and non-stationary time-series data. Here are the reasons for using EEMD in our study:  
1. Capturing intrinsic data characteristics: EEMD decomposes a time series into a set of intrinsic mode functions (IMFs) and a residual trend. This allows for a more flexible and detailed analysis of the data compared to traditional decomposition methods, which might not capture the inherent characteristics of non-stationary signals as effectively;
2. Noise reduction: EEMD enhances the ability to distinguish between noise and meaningful signals. By adding white noise to the data and averaging the results across multiple realizations, EEMD reduces the impact of noise and provides a clearer separation of signal components;
3. Improving analysis accuracy: The ability of EEMD to adapt to the data's intrinsic properties helps in better capturing subtle patterns and features that might be missed by other methods. This is especially useful in complex datasets where traditional methods may not perform optimally. In short, EEMD enhances the clarity of data by effectively separating noise from the signal, demonstrating robustness and revealing detailed insights through its decomposition of the data into IMFs and a residual trend. The pseudocode for the EEMD-LR algorithm of our proposed model is shown in Algorithms 1-3. ```
1:Time-series data x(t), number of ensembles N; Output: Set of IMFs and residual trend (\(\mathbb{S}_{R}\));
2:Initialize:-Set number of ensembles N, -Set noise amplitude A;
3:For each ensemble i from 1 to N do:
4:Add white noise to the original signal: \(\text{x\_i}(\text{t})=\text{x}(\text{t})+\text{A * noise}(\text{t})\)
5:Decompose x_i(t) into a set of IMFs and a residual trend: \(\text{IMF\_i, res\_i}=\text{EMD(x\_i(t))}\)
6:Store the IMFs and residuals from this ensemble: \(S_{N\_i}=\text{IMF\_i}\); \(S_{R\_i}=\text{res\_i}\)
7:Average the IMFs and residuals over all ensembles: \(S_{N}=\text{Average(}S_{N\_i}\text{j}\text{)}\); \(S_{R}=\text{Average(}S_{R\_i}\text{)}\)
8:Return:(\(S_{1}\), \(S_{2}\), \(\ldots\), \(S_{N-1}\), \(S_{R}\)).