# TE-LSTM: A Prediction Model for Temperature Based on Multivariate Time Series Data

^{*}

## Abstract

**:**

## 1. Introduction

## 2. Materials and Methods

#### 2.1. Experimental Data

- Total coverage: denotes the fraction of the total celestial dome covered by clouds or other obscuring phenomena.
- Total lowest cloud cover: represents the fraction of the celestial dome covered by all low clouds present. If no low clouds are present, it denotes the fraction covered by all middle-level clouds present.
- Low cloud genus: denotes a type of low cloud.
- Height: lowest cloud base height dimension.
- Mid cloud genus: denotes a type of middle-level cloud.
- High cloud genus: denotes a type of high cloud.
- Atmospheric pressure at the observation point.
- Temperature received from the Automated Weather Observing System (AWOS).
- Dew point received from the Automated Weather Observing System (AWOS).

#### 2.2. TE-LSTM

#### 2.2.1. Temporal Encoder

- (a)
- Temporal Encoder (FFN)

- Standard Time of Each Element (ST): The standard time for each element is a 6-dimensional vector: [yyyy, MM, dd, HH, mm, ss] representing year, month, day, hour, minute, and second, respectively. This information captures the element’s absolute position on the timeline and its global evolutionary patterns, effectively identifying two types of evolutionary patterns. For elements whose evolutionary patterns require a long time span to be captured, the standard time helps in detecting global changes. When the patterns of elements continuously change, the standard time can pinpoint precise positions, allowing for the acquisition of information before and after that time point to capture finer details of the entity’s evolution. This time format is applicable to all types of datasets.
- The Time Interval between Each Element in the Sequence and the Element to Be Predicted (TI): The time interval between each element in the sequence and the element to be predicted is an exact value. This captures the relative position of each element in the sequence relative to the prediction target on the time axis. Additionally, as the model trains on sequences, using time intervals allows it to focus more on the sequence itself, reducing the emphasis on the global time position of elements and focusing more on local patterns. Thus, this method is better suited for capturing periodic patterns.

- (b)
- Temporal Encoder (Time2Vec)

#### 2.2.2. Temporal Weighting Module

#### 2.2.3. Multivariate Encoder

#### 2.2.4. Prediction Module

## 3. Results and Discussion

#### 3.1. Verify the Accuracy of TE-LSTM under Different Temporal Encoders

#### 3.2. Verify the Accuracy of TE-LSTM under Different Time Granularities

#### 3.3. Verify the Performance of TE-LSTM in Predicting Questions with Specific Times

#### 3.4. Comparison of TE-LSTM with State-of-the-Art (SOTA) Methods and Validation of TE-LSTM Performance on LSTM Variant Models

#### 3.5. Discussion

## 4. Conclusions

- (a)
- Multiple encoders were designed to account for both the periodic and non-periodic nature of time, enabling the comprehensive extraction of temporal features. Additionally, the study examines the applicable datasets and optimal time granularity for each encoder.
- (b)
- A novel time weighting strategy based on LSTM was developed, which integrates the weight of each element in the time series relative to the predicted target time at each step. This approach allows the model to focus on features that are temporally closer to the target, transforming the model from sequence-based prediction to time-based prediction, thereby achieving more precise time point forecasting.
- (c)
- TE-LSTM was compared with the base LSTM model and two SOTA methods. The results demonstrate that TE-LSTM outperforms these models in terms of prediction accuracy, particularly for tasks requiring precise time point predictions.
- (d)
- The TE-LSTM method was applied to other LSTM variants, effectively improving their prediction accuracy, thereby validating the robustness and generalization capability of the proposed approach. The study also tested TE-LSTM on more complex GDELT datasets, further confirming the model’s applicability and generalizability.

## Author Contributions

## Funding

## Data Availability Statement

## Acknowledgments

## Conflicts of Interest

## References

- Lv, Z.; Pomeroy, J.W. Detecting intercepted snow on mountain needleleaf forest canopies using satellite remote sensing. Remote Sens. Environ.
**2019**, 231, 111222. [Google Scholar] [CrossRef] - Luo, L.; Sun, S.; Xue, J.; Gao, Z.; Zhao, J.; Yin, Y.; Gao, F.; Luan, X. Crop yield estimation based on assimilation of crop models and remote sensing data: A systematic evaluation. Agric. Syst.
**2023**, 210, 103711. [Google Scholar] [CrossRef] - Chu, Y.; Wang, Y.; Yang, D.; Chen, S.; Li, M. A review of distributed solar forecasting with remote sensing and deep learning. Renew. Sustain. Energy Rev.
**2024**, 198, 114391. [Google Scholar] [CrossRef] - Islam, M.A.; Olm, G. Deep learning techniques to detect rail indications from ultrasonic data for automated rail monitoring and maintenance. Ultrasonics
**2024**, 140, 107314. [Google Scholar] [CrossRef] [PubMed] - Pande, C.B.; Egbueri, J.C.; Costache, R.; Sidek, L.M.; Wang, Q.; Alshehri, F.; Din, N.M.; Gautam, V.K.; Chandra Pal, S. Predictive modeling of land surface temperature (LST) based on Landsat-8 satellite data and machine learning models for sustainable development. J. Clean. Prod.
**2024**, 444, 141035. [Google Scholar] [CrossRef] - Sumner, M.D.; Michael, K.J.; Bradshaw, C.J.A.; Hindell, M.A. Remote sensing of Southern Ocean sea surface temperature: Implications for marine biophysical models. Remote Sens. Environ.
**2003**, 84, 161–173. [Google Scholar] [CrossRef] - Bouali, M.; Sato, O.T.; Polito, P.S. Temporal trends in sea surface temperature gradients in the South Atlantic Ocean. Remote Sens. Environ.
**2017**, 194, 100–114. [Google Scholar] [CrossRef] - Zhu, J.; Fan, C.; Yang, M.; Qian, F.; Mahalec, V. Semi-supervised learning for predicting multivariate attributes of process units from small labeled and large unlabeled data sets with application to detect properties of crude feed distillation unit. Chem. Eng. Sci.
**2024**, 298, 120324. [Google Scholar] [CrossRef] - Xu, J.; Liu, J.; Yu, S.; Xu, K.; Zhang, T. Real-time temperature prediction of lunar regolith drilling based on ATT-Bi-LSTM network. Int. J. Heat Mass Transf.
**2024**, 218, 124783. [Google Scholar] [CrossRef] - van Blitterswijk, R.H.; Botelho, L.A.; Farshidianfar, M.H.; Etman, P.; Khajepour, A. Adaptive thermal model for real-time peak temperature and cooling rate prediction in laser material processing. J. Manuf. Process.
**2023**, 101, 1301–1317. [Google Scholar] [CrossRef] - Breitenbach, T.; Wilkusz, B.; Rasbach, L.; Jahnke, P. On a method for detecting periods and repeating patterns in time series data with autocorrelation and function approximation. Pattern Recognit.
**2023**, 138, 109355. [Google Scholar] [CrossRef] - Huang, Z.; Xu, W.; Yu, K. Bidirectional LSTM-CRF Models for Sequence Tagging. arXiv
**2015**, arXiv:1508.01991. [Google Scholar] - Zhu, Z.; Duan, W.; Zou, S.; Zeng, Z.; Chen, Y.; Feng, M.; Qin, J.; Liu, Y. Spatiotemporal characteristics of meteorological drought events in 34 major global river basins during 1901–2021. Sci. Total Environ.
**2024**, 921, 170913. [Google Scholar] [CrossRef] [PubMed] - Zhang, J.-L.; Huang, X.-M.; Sun, Y.-Z. Multiscale spatiotemporal meteorological drought prediction: A deep learning approach. Adv. Clim. Chang. Res.
**2024**, 15, 211–221. [Google Scholar] [CrossRef] - Reikard, G. Forecasting long-term solar activity with time series models: Some cautionary findings. J. Atmos. Sol.-Terr. Phys.
**2020**, 211, 105465. [Google Scholar] [CrossRef] - Box, G.E.P.; Jenkins, G.M. Time series analysis: Forecasting and control. J. Time Ser. Anal.
**2010**, 31, 303. [Google Scholar] [CrossRef] - Cover, T.; Hart, P. Nearest neighbor pattern classification. IEEE Trans. Inf. Theory
**2003**, 13, 21–27. [Google Scholar] [CrossRef] - Dasgupta, S.; Osogami, T. Nonlinear dynamic boltzmann machines for time-series prediction. In Proceedings of the Thirty-First AAAI Conference on Artificial, San Francisco, CA, USA, 4–9 February 2017; pp. 1833–1839. [Google Scholar]
- Neil, D.; Pfeiffer, M.; Liu, S.C. Phased LSTM: Accelerating Recurrent Network Training for Long or Event-based Sequences. In Proceedings of the Neural Information Processing Systems, Barcelona, Spain, 5–10 December 2016. [Google Scholar]
- Yu, R.; Li, Y.; Shahabi, C.; Demiryurek, U.; Liu, Y. Deep Learning: A Generic Approach for Extreme Condition Traffic Forecasting. In Proceedings of the 2017 SIAM International Conference on Data Mining, Houston, TX, USA, 27–29 April 2017; pp. 777–785. [Google Scholar]
- Zhu, Y.; Li, H.; Liao, Y.; Wang, B.; Cai, D. What to Do Next: Modeling User Behaviors by Time-LSTM. In Proceedings of the Twenty-Sixth International Joint Conference on Artificial Intelligence Main Track, Melbourne, Australia, 19–25 August 2017; pp. 3602–3608. [Google Scholar]
- Elman, J.L. Finding Structure in Time. Cogn. Sci.
**1990**, 14, 179–211. [Google Scholar] [CrossRef] - Pineda, F.J. Generalization of back-propagation to recurrent neural networks. Phys. Rev. Lett.
**1987**, 59, 2229–2232. [Google Scholar] [CrossRef] - Rumelhart, D.E.; Hinton, G.E.; Williams, R.J. Learning Representations by Back Propagating Errors. Nature
**1986**, 323, 533–536. [Google Scholar] [CrossRef] - Chung, J.; Gulcehre, C.; Cho, K.H.; Bengio, Y. Empirical Evaluation of Gated Recurrent Neural Networks on Sequence Modeling. arXiv
**2014**, arXiv:1412.3555. [Google Scholar] - Hochreiter, S.; Schmidhuber, J. Long Short-Term Memory. Neural Comput.
**1997**, 9, 1735–1780. [Google Scholar] [CrossRef] [PubMed] - Lafferty, J.; Mccallum, A.; Pereira, F.C.N. Conditional Random Fields: Probabilistic Models for Segmenting and Labeling Sequence Data. In Proceedings of the Eighteenth International Conference on Machine Learning, Williamstown, MA, USA, 28 June–1 July 2001; pp. 282–289. [Google Scholar]
- Mohammadi, M.; Jamshidi, S.; Rezvanian, A.; Gheisari, M.; Kumar, A. Advanced fusion of MTM-LSTM and MLP models for time series forecasting: An application for forecasting the solar radiation. Meas. Sens.
**2024**, 33, 101179. [Google Scholar] [CrossRef] - Wang, J.; Liu, K.; Li, H. LSTM-based graph attention network for vehicle trajectory prediction. Comput. Netw.
**2024**, 248, 110477. [Google Scholar] [CrossRef] - Ishida, K.; Ercan, A.; Nagasato, T.; Kiyama, M.; Amagasaki, M. Use of one-dimensional CNN for input data size reduction in LSTM for improved computational efficiency and accuracy in hourly rainfall-runoff modeling. J. Environ. Manag.
**2024**, 359, 120931. [Google Scholar] [CrossRef] - Wanigasekara, R.W.W.M.U.P.; Zhang, Z.; Wang, W.; Luo, Y.; Pan, G. Application of Fast MEEMD-ConvLSTM in Sea Surface Temperature Predictions. Remote Sens.
**2024**, 16, 2468. [Google Scholar] [CrossRef] - Huang, N.E.; Shen, Z.; Long, S.R.; Shih, H.H.; Zheng, Q.; Yen, N.-C.; Tung, C.-C.; Liu, H.H. The Empirical Mode Decomposition and the Hilbert Spectrum for Nonlinear and Non-Stationary Time Series Analysis; Royal Society: London, UK, 1998. [Google Scholar]
- Wu, Z.; Huang, N.E. Ensemble empirical mode decomposition: A noise-assisted data analysis method. Adv. Adapt. Data Anal.
**2009**, 1, 1–41. [Google Scholar] [CrossRef] - Xu, X.; Han, W.; Gao, Z.; Li, J.; Yin, R. Retrieval of Atmospheric Temperature Profiles from FY-4A/GIIRS Hyperspectral Data Based on TPE-MLP: Analysis of Retrieval Accuracy and Influencing Factors. Remote Sens.
**2024**, 16, 1976. [Google Scholar] [CrossRef] - Lai, G.; Chang, W.C.; Yang, Y.; Liu, H. Modeling Long- and Short-Term Temporal Patterns with Deep Neural Networks. In Proceedings of the SIGIR ‘18: The 41st International ACM SIGIR Conference on Research & Development in Information Retrieval, Ann Arbor, MI, USA, 8–12 July 2018. [Google Scholar]
- Zhang, X.; Liang, X.; Zhiyuli, A.; Zhang, S.; Xu, R.; Wu, B. AT-LSTM: An Attention-based LSTM Model for Financial Time Series Prediction. IOP Conf. Ser. Mater. Sci. Eng.
**2019**, 569, 052037. [Google Scholar] [CrossRef] - Li, Y.; Zhu, Z.; Kong, D.; Han, H.; Zhao, Y. EA-LSTM: Evolutionary Attention-based LSTM for Time Series Prediction. Knowl.-Based Syst.
**2019**, 181, 104785. [Google Scholar] [CrossRef] - Lim, B.; Arik, S.Ö.; Loeff, N.; Pfister, T. Temporal Fusion Transformers for Interpretable Multi-horizon Time Series Forecasting. arXiv
**2019**, arXiv:1912.09363. [Google Scholar] [CrossRef] - Kazemi, S.M.; Goel, R.; Eghbali, S.; Ramanan, J.; Sahota, J.; Thakur, S.; Wu, S.; Smyth, C.; Poupart, P.; Brubaker, M.A. Time2Vec: Learning a Vector Representation of Time. arXiv
**2019**, arXiv:1907.05321. [Google Scholar] - He, K.; Zhang, X.; Ren, S.; Sun, J. Deep Residual Learning for Image Recognition. In Proceedings of the 2016 IEEE Conference on Computer Vision and Pattern Recognition (CVPR), Las Vegas, NV, USA, 27–30 June 2016; pp. 770–778. [Google Scholar]
- Bahdanau, D.; Cho, K.; Bengio, Y. Neural Machine Translation by Jointly Learning to Align and Translate. arXiv
**2014**, arXiv:1409.0473. [Google Scholar] - Shelhamer, E.; Long, J.; Darrell, T. Fully Convolutional Networks for Semantic Segmentation. IEEE Trans. Pattern Anal. Mach. Intell.
**2017**, 39, 640–651. [Google Scholar] [CrossRef] - Sutskever, I.; Vinyals, O.; Le, Q.V. Sequence to Sequence Learning with Neural Networks. arXiv
**2014**, arXiv:1409.3215. [Google Scholar] - Vaswani, A.; Shazeer, N.M.; Parmar, N.; Uszkoreit, J.; Jones, L.; Gomez, A.N.; Kaiser, L.; Polosukhin, I. Attention is All you Need. In Proceedings of the Neural Information Processing Systems, Long Beach, CA, USA, 4–9 December 2017. [Google Scholar]
- Yu, Q.; Yuan, H.-W.; Liu, Z.-L.; Xu, G.-M. Spatial weighting EMD-LSTM based approach for short-term PM2.5 prediction research. Atmos. Pollut. Res.
**2024**, 15, 102256. [Google Scholar] [CrossRef] - Zhou, H.; Zhang, S.; Peng, J.; Zhang, S.; Li, J.; Xiong, H.; Zhang, W. Informer: Beyond Efficient Transformer for Long Sequence Time-Series Forecasting. arXiv
**2020**, arXiv:2012.07436. [Google Scholar] [CrossRef]

**Figure 3.**TE-LSTM. $C$ represents the cell state, $h$ represents the hidden state, $x$ represents the multivariate vector at the current time step, $w$ represents the temporal weight at the current time step, $\sigma $ represents the sigmoid function, $\otimes $ represents matrix multiplication, $\oplus $ represents matrix addition, fc represents the fully connected layer.

**Figure 4.**Temporal encoder (FFN). T

_{i}represents the time of each element in the time series, and T

_{p}represents the time of the predicted target. N represents N repeated hidden layers.

**Figure 7.**Model results when using data with X = {1, 2, 3} under different temporal encoders. (

**a**) Model results when using the NOAA dataset; (

**b**) Model results when using the GDELT dataset.

**Figure 9.**Statistics of the number of different times in the NOAA dataset under different time granularities. The x-axis represents the number of non-repeating times in the sequence.

**Figure 11.**Statistics of the number of different times in the GDELT dataset under different time granularities. The x-axis represents the number of non-repeating times in the sequence.

**Figure 12.**Comparison of LSTM and ST (FFN) results. (

**a**) Comparison of LSTM and ST (FFN) results when using the NOAA dataset; (

**b**) comparison of LSTM and ST (FFN) results when using the GDELT dataset.

Dataset | NOAA | GDELT |
---|---|---|

Data Volume | 179,111 | 164,255 |

Sequence Length L | 30 | 30 |

Training | 161,199 | 147,802 |

Validation | 16,119 | 14,780 |

Testing | 1793 | 1643 |

Dataset | X | LSTM | ST (FFN) | ST (Time2Vec) | TI (FFN) |
---|---|---|---|---|---|

NOAA | 1 | 0.909423 | 0.919506 | 0.908378 | 0.916457 |

2 | 0.908807 | 0.924220 | 0.913982 | 0.916036 | |

3 | 0.908416 | 0.905575 | 0.907367 | 0.908263 | |

GDELT | 1 | 0.889572 | 0.892315 | 0.888130 | 0.887824 |

2 | 0.889164 | 0.900982 | 0.896460 | 0.900762 | |

3 | 0.897718 | 0.900174 | 0.895819 | 0.889391 |

Dataset | G (0.5 h) | LSTM | ST (FFN) | ST (Time2Vec) | TI (FFN) |
---|---|---|---|---|---|

NOAA | 1 | 0.909423 | 0.919506 | 0.908378 | 0.916457 |

2 | 0.910448 | 0.921464 | 0.905445 | 0.899359 | |

3 | 0.909430 | 0.921477 | 0.907413 | 0.914457 | |

6 | 0.904408 | 0.909433 | 0.910445 | 0.914428 | |

12 | 0.899278 | 0.902479 | 0.902379 | 0.899233 |

Dataset | G (Day) | LSTM | ST (FFN) | ST (Time2Vec) | TI (FFN) |
---|---|---|---|---|---|

GDELT | 1 | 0.889572 | 0.892315 | 0.888130 | 0.887824 |

2 | 0.888756 | 0.889969 | 0.889270 | 0.888060 | |

3 | 0.888272 | 0.889145 | 0.889386 | 0.888957 |

Dataset | X (G = 1) | LSTM | ST (FNN) | ST (Time2Vec) | TI (FNN) |
---|---|---|---|---|---|

NOAA | 1 | 0.909423 | 0.919506 | 0.908378 | 0.916457 |

2 | 0.909221 | 0.919213 | 0.908576 | 0.916178 | |

3 | 0.908810 | 0.917772 | 0.908639 | 0.912760 | |

5 | 0.907842 | 0.917608 | 0.907656 | 0.917809 | |

10 | 0.904270 | 0.913126 | 0.904135 | 0.912310 | |

GDELT | 1 | 0.889572 | 0.892315 | 0.888130 | 0.887824 |

2 | 0.889554 | 0.891979 | 0.888211 | 0.887977 | |

3 | 0.889433 | 0.891608 | 0.887990 | 0.887809 | |

5 | 0.889310 | 0.891640 | 0.887870 | 0.887632 | |

10 | 0.889051 | 0.891354 | 0.887612 | 0.887407 |

Dataset | X | TE_LSTM | TFT | Informer |
---|---|---|---|---|

NOAA | 1 | 0.919506 | 0.910564 | 0.916096 |

2 | 0.924220 | 0.915774 | 0.913519 | |

3 | 0.905575 | 0.909956 | 0.914697 | |

GDELT | 1 | 0.892315 | 0.884865 | 0.895266 |

2 | 0.900982 | 0.885409 | 0.906563 | |

3 | 0.900174 | 0.884908 | 0.893185 |

Dataset | X (G = 1) | TE_LSTM | TFT | Informer |
---|---|---|---|---|

NOAA | 1 | 0.919506 | 0.910564 | 0.916096 |

2 | 0.919213 | 0.908343 | 0.908897 | |

3 | 0.917772 | 0.907987 | 0.908554 | |

5 | 0.917608 | 0.907001 | 0.907603 | |

10 | 0.913126 | 0.903486 | 0.899208 | |

GDELT | 1 | 0.892315 | 0.884865 | 0.895266 |

2 | 0.891979 | 0.884836 | 0.893274 | |

3 | 0.891608 | 0.884774 | 0.892185 | |

5 | 0.891640 | 0.884780 | 0.890133 | |

10 | 0.891354 | 0.884597 | 0.888894 |

Dataset | X | TFT | TFT-TE |
---|---|---|---|

NOAA | 1 | 0.910564 | 0.911570 |

2 | 0.915774 | 0.916166 | |

3 | 0.909956 | 0.910908 | |

GDELT | 1 | 0.884865 | 0.885147 |

2 | 0.885409 | 0.896496 | |

3 | 0.884908 | 0.885809 |

Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content. |

© 2024 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (https://creativecommons.org/licenses/by/4.0/).

## Share and Cite

**MDPI and ACS Style**

Zhou, K.; Zhang, C.; Xu, B.; Huang, J.; Li, C.; Pei, Y.
TE-LSTM: A Prediction Model for Temperature Based on Multivariate Time Series Data. *Remote Sens.* **2024**, *16*, 3666.
https://doi.org/10.3390/rs16193666

**AMA Style**

Zhou K, Zhang C, Xu B, Huang J, Li C, Pei Y.
TE-LSTM: A Prediction Model for Temperature Based on Multivariate Time Series Data. *Remote Sensing*. 2024; 16(19):3666.
https://doi.org/10.3390/rs16193666

**Chicago/Turabian Style**

Zhou, Kang, Chunju Zhang, Bing Xu, Jianwei Huang, Chenxi Li, and Yifan Pei.
2024. "TE-LSTM: A Prediction Model for Temperature Based on Multivariate Time Series Data" *Remote Sensing* 16, no. 19: 3666.
https://doi.org/10.3390/rs16193666