首页|基于MLP和Transformer模型的大气温度预测

基于MLP和Transformer模型的大气温度预测

扫码查看
文章以运城市2015年1月1日至2020年12月21日期间监测的大气温度数据作为研究的基础资料,运用MLP模型和Transformer模型,预测了运城市大气温度。由于温度数据具有很强的时序性,对 MLP模型与Transformer 模型,各选取了两层、四层(MLP-2、MLP-4、Transformer-2、Transformer-4),进行了3 天、5 天、7天多组试验对比。结果显示:MLP-4 模型 7 天的均方误差为 3。2649,Transformer-4 模型 3 天的均方误差为5。3767,预测精度都比较高,且MLP模型预测温度的精度高于Transformer模型预测温度的精度;MLP-2 模型的均方误差分别为3。2662、3。2996、3。3579,MLP-4 模型的均方误差分别为3。2674、3。2996、3。2649,均方误差有变化,但比较平稳;Transformer-2 模型的均方误差分别为5。6225、5。9491、5。3892,Transformer-4 模型的均方误差分别为5。3767、6。3787、6。1108,增加模型层数和参数量,均方误差增大,存在过拟合现象。运用Transformer模型进行预测,出现过拟合现象,原因是Transformer 模型太过庞大(接近四百万个参数),而研究数据只有 1531 组,即使使用Weight decay和Dropout正则化的方法,仍然过拟合文章中提供的1531 组研究数据,使其预测精度出现一定程度的下降。
Atmospheric Temperature Prediction Based on MLP and Transformer Models
Based on the atmospheric temperature data from January 1,2015 to December 21,2020 in Yuncheng City,the Multilayer Perceptron(MLP)model and Transformer model are used to forecast the atmos-pheric temperature in Yuncheng City in this paper.Since weather data is highly time-sequential,we used two-layer and four-layer versions of the Transformer and MLP models to conduct multiple comparative experi-ments over 3-day,5-day,and 7-day periods.The results showed that the 7-day mean squared error(MSE)of the MLP-4 model was 3.2649,and the 3-day MSE of the Transformer-4 model was 5.3767,both demonstrating relatively high prediction accuracy.Moreover,the MLP model's accuracy in predicting tempera-ture was higher than that of the Transformer model.The MLP-2 model's MSEs were 3.2662,3.2996,and 3.3579,while the MLP-4 model's MSEs were 3.2674,3.2996,and 3.2649,showing minor fluctuations but re-maining stable.In contrast,the MSEs of the Transformer-2 model were 5.6225,5.9491,and 5.3892,and the Transformer-4 model's MSEs were 5.3767,6.3787,and 6.1108.Increasing the model layers and parame-ter count led to larger MSEs and overfitting.The overfitting phenomenon seen in the Transformer model was due to its excessive size(close to 4 million parameters),while the study datas only included 1,531 sets.Despite u-sing regularization methods like weight decay and dropout,the model still overfitted the 1,531 data sets,resul-ting in a decline in prediction accuracy.

temperature predictionMLP modelTransformer modelneural networks

吕亚妮

展开 >

运城师范高等专科学校,山西 运城 044000

温度预测 MLP模型 Transformer模型 神经网络

2024

运城学院学报
运城学院

运城学院学报

CHSSCD
影响因子:0.178
ISSN:1008-8008
年,卷(期):2024.42(3)