CN115526413A - A Forecasting Method of Daily Maximum Air Temperature Based on Fully Connected Neural Network - Google Patents
A Forecasting Method of Daily Maximum Air Temperature Based on Fully Connected Neural Network Download PDFInfo
- Publication number
- CN115526413A CN115526413A CN202211248299.3A CN202211248299A CN115526413A CN 115526413 A CN115526413 A CN 115526413A CN 202211248299 A CN202211248299 A CN 202211248299A CN 115526413 A CN115526413 A CN 115526413A
- Authority
- CN
- China
- Prior art keywords
- model
- data
- layer
- training
- neural network
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
- 238000013528 artificial neural network Methods 0.000 title claims abstract description 21
- 238000013277 forecasting method Methods 0.000 title claims abstract description 13
- 238000012549 training Methods 0.000 claims abstract description 32
- 238000012360 testing method Methods 0.000 claims abstract description 13
- 238000012795 verification Methods 0.000 claims abstract description 13
- 238000003062 neural network model Methods 0.000 claims abstract description 10
- 238000010606 normalization Methods 0.000 claims abstract description 5
- 238000007781 pre-processing Methods 0.000 claims abstract description 5
- 238000012545 processing Methods 0.000 claims abstract description 5
- 238000000034 method Methods 0.000 claims description 48
- 238000009826 distribution Methods 0.000 claims description 12
- 230000006870 function Effects 0.000 claims description 12
- 230000008569 process Effects 0.000 claims description 10
- 238000010200 validation analysis Methods 0.000 claims description 10
- 238000004364 calculation method Methods 0.000 claims description 9
- 238000010219 correlation analysis Methods 0.000 claims description 9
- 210000002569 neuron Anatomy 0.000 claims description 9
- 230000004913 activation Effects 0.000 claims description 7
- 238000011156 evaluation Methods 0.000 claims description 4
- 238000004140 cleaning Methods 0.000 claims description 3
- 238000000605 extraction Methods 0.000 claims description 3
- 238000010276 construction Methods 0.000 claims 1
- 230000001932 seasonal effect Effects 0.000 abstract description 2
- 238000010586 diagram Methods 0.000 description 4
- 230000000694 effects Effects 0.000 description 2
- 238000012986 modification Methods 0.000 description 2
- 230000004048 modification Effects 0.000 description 2
- 238000012544 monitoring process Methods 0.000 description 2
- 238000007619 statistical method Methods 0.000 description 2
- 238000012271 agricultural production Methods 0.000 description 1
- 230000007613 environmental effect Effects 0.000 description 1
- 230000003993 interaction Effects 0.000 description 1
- 238000013507 mapping Methods 0.000 description 1
- 238000010998 test method Methods 0.000 description 1
- 238000012876 topography Methods 0.000 description 1
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06Q—INFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
- G06Q10/00—Administration; Management
- G06Q10/04—Forecasting or optimisation specially adapted for administrative or management purposes, e.g. linear programming or "cutting stock problem"
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06N—COMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
- G06N3/00—Computing arrangements based on biological models
- G06N3/02—Neural networks
- G06N3/08—Learning methods
- G06N3/082—Learning methods modifying the architecture, e.g. adding, deleting or silencing nodes or connections
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06Q—INFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
- G06Q50/00—Information and communication technology [ICT] specially adapted for implementation of business processes of specific business sectors, e.g. utilities or tourism
- G06Q50/10—Services
- G06Q50/26—Government or public services
-
- Y—GENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
- Y02—TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
- Y02A—TECHNOLOGIES FOR ADAPTATION TO CLIMATE CHANGE
- Y02A90/00—Technologies having an indirect contribution to adaptation to climate change
- Y02A90/10—Information and communication technologies [ICT] supporting adaptation to climate change, e.g. for weather forecasting or climate simulation
Landscapes
- Business, Economics & Management (AREA)
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- Tourism & Hospitality (AREA)
- Economics (AREA)
- Human Resources & Organizations (AREA)
- Strategic Management (AREA)
- General Physics & Mathematics (AREA)
- General Health & Medical Sciences (AREA)
- Marketing (AREA)
- Health & Medical Sciences (AREA)
- Development Economics (AREA)
- General Business, Economics & Management (AREA)
- Life Sciences & Earth Sciences (AREA)
- Molecular Biology (AREA)
- Educational Administration (AREA)
- Artificial Intelligence (AREA)
- Biomedical Technology (AREA)
- Biophysics (AREA)
- Computational Linguistics (AREA)
- Data Mining & Analysis (AREA)
- Evolutionary Computation (AREA)
- Primary Health Care (AREA)
- Computing Systems (AREA)
- General Engineering & Computer Science (AREA)
- Mathematical Physics (AREA)
- Software Systems (AREA)
- Game Theory and Decision Science (AREA)
- Entrepreneurship & Innovation (AREA)
- Operations Research (AREA)
- Quality & Reliability (AREA)
- Management, Administration, Business Operations System, And Electronic Commerce (AREA)
Abstract
Description
技术领域technical field
本发明涉及气象监测技术领域,尤其涉及一种基于全连接神经网络日最高气温的预报方法。The invention relates to the technical field of meteorological monitoring, in particular to a method for forecasting daily maximum temperature based on a fully connected neural network.
背景技术Background technique
最高气温客观预报是天气预报中一项重要内容,有着重要的实际应用意义,如交通管控、天气预报、农业生产和环境监测等各方面。通常预报日最高气温的预报方法一般采用大气数值模式的预报方式。如欧洲中期天气预报中心的集成预报系统模式(简称IFS模式,下同),中国气象局区域数值预报模式等等。受大气动力过程、物理过程和局地地形地貌等的复杂因素的影响,利用大气数值模式预报的近地面要素预报(包括最高气温)常存在偏差,特别是转折性天气发生时日最高气温预报与实际观测值之间误差更大,因此实现日最高气温预报精细化和精准化仍然面临挑战。虽然利用传统统计方法对数值模式预报误差订正可以一定程度上改善预报效果,但存在局限性,如普遍针对单一空间点进行建模,不但计算量大,而且无法考虑气象站点之间气象要素的相互影响。因此,如何解决利用传统统计方法对数值模式预报存在的问题,是现阶段需要考虑的。Objective forecasting of maximum temperature is an important content of weather forecasting, which has important practical application significance, such as traffic control, weather forecasting, agricultural production and environmental monitoring, etc. Usually, the forecasting method of forecasting the daily maximum temperature generally adopts the forecasting method of the atmospheric numerical model. For example, the Integrated Forecast System model of the European Center for Medium-Range Weather Forecasting (referred to as the IFS model, the same below), the regional numerical forecast model of the China Meteorological Administration, and so on. Affected by complex factors such as atmospheric dynamic processes, physical processes, and local terrain and landforms, there are often deviations in the forecast of near-surface elements (including maximum air temperature) forecasted by atmospheric numerical models, especially when turning weather occurs. The error between the actual observations is larger, so it is still a challenge to achieve the refinement and accuracy of the daily maximum temperature forecast. Although using traditional statistical methods to correct the forecast error of the numerical model can improve the forecast effect to a certain extent, there are limitations, such as modeling for a single spatial point, which not only requires a large amount of calculation, but also cannot consider the interaction of meteorological elements between meteorological stations. influences. Therefore, how to solve the existing problems in numerical model forecasting using traditional statistical methods needs to be considered at this stage.
需要说明的是,在上述背景技术部分公开的信息只用于加强对本公开的背景的理解,因此可以包括不构成对本领域普通技术人员已知的现有技术的信息。It should be noted that the information disclosed in the background section above is only used to enhance the understanding of the background of the present disclosure, and therefore may include information that does not constitute the prior art known to those of ordinary skill in the art.
发明内容Contents of the invention
本发明的目的在于克服现有技术的缺点,提供了一种基于全连接神经网络日最高气温的预报方法,解决了现有利用大气数值模式预报日最高气温的方法受大气动力过程、物理过程和局地地形地貌等的复杂影响,导致大气数值模式的近地面要素预报包括最高气温常有偏差的问题。The purpose of the present invention is to overcome the shortcoming of prior art, provide a kind of forecasting method based on fully connected neural network daily maximum temperature, solve the existing method of utilizing atmospheric numerical model to forecast daily maximum temperature to be affected by atmospheric dynamic process, physical process and The complex influence of local topography and geomorphology leads to the problem that the forecast of near-surface elements of the atmospheric numerical model, including the maximum temperature, often has deviations.
本发明的目的通过以下技术方案来实现:一种基于全连接神经网络日最高气温的预报方法,所述预报方法包括:The object of the present invention is achieved through the following technical solutions: a method for forecasting the daily maximum temperature based on a fully connected neural network, the forecast method comprising:
步骤1、对观测资料数据和数值预报数据进行预处理;
步骤2、将完成预处理的数据划分为训练集、验证集和测试集,并分别对训练集、验证集和测试集上的特征和目标执行数据进行归一化处理;
步骤3、构建结合嵌入层的全连接神经网络模型,并对模型的超参数进行设置以及对模型进行训练;Step 3. Construct a fully connected neural network model combined with an embedding layer, and set the hyperparameters of the model and train the model;
步骤4、对训练结束的模型进行评估,并通过模型对最高气温进行预测。Step 4. Evaluate the model after training, and predict the maximum temperature through the model.
所述对观测资料数据和数值预报数据进行预处理包括以下内容:The preprocessing of the observation data and numerical forecast data includes the following:
S11、对观测数据进行数据清洗并生成目标文件:剔除错误或者缺测的站点,挑选出具有完整时间序列的站点最高气温观测资料,创建目标数据集;S11. Perform data cleaning on the observation data and generate the target file: eliminate the wrong or missing sites, select the maximum temperature observation data of the site with a complete time series, and create the target data set;
S12、读取并转换历史数值模式数据格式:读取数值预报模式GRIB格式数据,将地面层预报数据和高空层预报数据统一水平分辨率,对时间维度上少量的预报缺失值通过线性插补的方法进行插补,将历史数值预报数据以nc格式输出;S12. Read and convert the data format of the historical numerical model: read the GRIB format data of the numerical forecast model, unify the horizontal resolution of the ground layer forecast data and the upper-altitude layer forecast data, and linearly interpolate a small number of missing forecast values in the time dimension The method performs interpolation, and outputs the historical numerical forecast data in nc format;
S13、计算数值模式高空组合数据:基于数值模式高空层数据,通过计算公式计算涡度平流,通过计算公式计算温度平流,其中,v代表风速,是等压面上的拉普拉斯算子,ζ是相对涡度,f是行星涡度,T为温度;S13. Calculate the upper-altitude combination data of the numerical model: based on the upper-altitude layer data of the numerical model, through the calculation formula Calculate the eddy advection, through the calculation formula Calculate the temperature advection, where v represents the wind speed, is the Laplace operator on the isobaric surface, ζ is the relative vorticity, f is the planetary vorticity, T is the temperature;
S14、将数值模式网格点上的数据插值到气象站站点上:采用双线性插值法将数值模式格点上的地面数据、高空数据和高空组合数据插值到地面气象站站点上,将插值后的数值模式数据与目标数据以一个文件输出;S14, interpolating the data on the numerical model grid point to the weather station site: adopting the bilinear interpolation method to interpolate the ground data, high-altitude data and high-altitude combined data on the numerical model grid point to the ground weather station site, and interpolating The final numerical model data and target data are output in one file;
S15、构建模型输入特征:根据预报经验,选出地面层及高空层与日最高气温预报相关的预报因子,并通过相关分析法和互信息值法挑选出与预报量相关的预报因子作为模型特征。S15. Build model input features: According to the forecast experience, select the predictors related to the daily maximum temperature forecast on the ground layer and the upper layer, and select the predictors related to the forecast quantity as the model features through the correlation analysis method and the mutual information value method .
所述通过相关分析法和互信息值法挑选出与预报量相关的预报因子作为模型特征包括:The selection of the predictors related to the predictor as model features through the correlation analysis method and the mutual information value method includes:
相关分析法:通过相关系数公式选择出与目标相关系数大于0.3,且达到0.05显著性水平的因子,其中,X是观测值,代表目标,Y是预报值,代表特征,cov(X,Y)为X,Y的协方差,σX是X的标准差,μX是X的期望E(X);Correlation analysis method: through the correlation coefficient formula Select a factor with a correlation coefficient greater than 0.3 and reach a significance level of 0.05, where X is the observed value representing the target, Y is the predicted value representing the feature, and cov(X,Y) is the covariance of X and Y, σ X is the standard deviation of X, μ X is the expected E(X) of X;
互信息值法:通过计算目标与特征间的互信息值,度量特征与目标间的非线性相关性,设置两个随机变量(X,Y)的联合分布为p(x,y),边缘分布分别为p(x),p(y),互信息I(X;Y)是联合分布p(x,y)与边缘分布p(x),p(y)的相对熵,互信息值表示为 Mutual information value method: By calculating the mutual information value between the target and the feature, the nonlinear correlation between the feature and the target is measured, and the joint distribution of two random variables (X, Y) is set to p(x, y), and the marginal distribution They are respectively p(x), p(y), mutual information I(X; Y) is the relative entropy of the joint distribution p(x, y) and the marginal distribution p(x), p(y), and the mutual information value is expressed as
选择时间滞后变量为滞后N天与N+1天的最高气温观测数据,并选择辅助变量以在数据集中标识不同站点以及样本的时间信息,完成创建特征数据集。The time lag variable is selected as the maximum temperature observation data with a lag of N days and N+1 days, and an auxiliary variable is selected to identify the time information of different stations and samples in the data set to complete the creation of the feature data set.
所述辅助变量包括季节、月份、气象站站点编号、站点经度、站点纬度和站点海拔;并且将辅助变量中的站点经度、站点纬度和站点海拔作为数值型变量,将辅助变量中的气象站站点编号、季节和月份作为分类变量。Described auxiliary variable comprises season, month, weather station number, station longitude, station latitude and station altitude; Number, season and month are used as categorical variables.
构建的结合嵌入层的全连接神经网络模型包括输入层、嵌入层、连接层、隐藏层和输出层;所述输入层中包括标签编码和独热编码,分类变量中的气象站站点编号和月份输入到标签编码中,分类变量中的季节输入到独热编码中;所述嵌入层用于处理由输入层中标签编码传递的分类变量;连接层用于连接经由嵌入层处理后的特征、独热编码处理后的特征和其它特征;隐藏层由多个神经元组成,以进行特征提取和学习;最后经由输出层输出。The constructed fully connected neural network model combined with embedding layers includes an input layer, an embedding layer, a connection layer, a hidden layer and an output layer; the input layer includes label encoding and one-hot encoding, and the station number and month of the weather station in the classification variable Input into the label encoding, the season in the categorical variable is input into the one-hot encoding; the embedding layer is used to process the categorical variable passed by the label encoding in the input layer; the connection layer is used to connect the features processed by the embedding layer, the independent Hot-encoded processed features and other features; the hidden layer consists of multiple neurons for feature extraction and learning; finally output through the output layer.
所述对模型的超参数进行设置以及对模型进行训练包括:The hyperparameters of the model are set and the model is trained including:
将嵌入层中的嵌入向量维度设置为8,隐藏层层数设置为1层,隐藏层中的神经元个数为64,激活函数设置为ReLU,输出层神经元个数为1个,激活函数为Linear;Set the embedding vector dimension in the embedding layer to 8, the number of hidden layers to 1, the number of neurons in the hidden layer to 64, the activation function to ReLU, the number of neurons in the output layer to 1, and the activation function is Linear;
设置损失函数为平均绝对误差,通过该正则化方法以防止模型过拟合,设定模型迭代时期数为50次,如果训练中验证误差连续3次不降反增,则停止训练,模型训练完,然后将模型应用至验证集,计算验证集上的模型误差,通过比较验证集来进行超参数选择,以获得最佳模型,并保存验证集上表现效果最佳的模型。Set the loss function to mean absolute error, use this regularization method to prevent the model from overfitting, set the number of model iterations to 50 times, if the verification error does not decrease but increases for 3 consecutive times during training, stop training, and the model training is complete , then apply the model to the validation set, calculate the model error on the validation set, perform hyperparameter selection by comparing the validation set to obtain the best model, and save the model with the best performance on the validation set.
所述对训练结束的模型进行评估,并通过模型对最高气温进行预测包括:The evaluation of the model at the end of the training and the prediction of the maximum temperature through the model include:
加载已经保存好的训练结束的模型,将步骤S2中的测试集中特征数据输入到模型中输出日最高气温预测值,通过对比模型输出的预测值与实际观测值对模型独立于训练集外的预报性能进行评估;Load the model that has been saved after training, input the characteristic data in the test set in step S2 into the model to output the predicted value of daily maximum temperature, and compare the predicted value output by the model with the actual observed value to make the model independent of the forecast outside the training set performance evaluation;
当有新的数据样本进行日最高气温预测时,将新的数据样本根据步骤S1进行数据预处理后将处理好的数据输入模型中即可得到最高气温的预测值。When there is a new data sample to predict the daily maximum temperature, the new data sample is preprocessed according to step S1, and then the processed data is input into the model to obtain the predicted value of the maximum temperature.
本发明具有以下优点:一种基于全连接神经网络日最高气温的预报方法,能够识别样本的时空间信息、处理多类别变量,带有嵌入层的全连接神经网络模型能够实现更为准确的日最高气温预报;选择了时间滞后变量,同时为了能在数据集中标识不同站点以及样本的时间信息,设计了辅助变量,并针对站点编号和月份这两个分类,设计了嵌入层,避免了分季节和分区域建模。The present invention has the following advantages: a method for forecasting the daily maximum temperature based on a fully connected neural network, which can identify the time and space information of samples and process multi-category variables, and the fully connected neural network model with an embedded layer can realize more accurate daily temperature prediction. Forecasting the maximum temperature; the time lag variable is selected, and auxiliary variables are designed to identify the time information of different stations and samples in the data set, and an embedding layer is designed for the two classifications of station number and month to avoid seasons and regional modeling.
附图说明Description of drawings
图1为本发明的流程示意图;Fig. 1 is a schematic flow sheet of the present invention;
图2为双线性插值原理示意图;Fig. 2 is a schematic diagram of the principle of bilinear interpolation;
图3为本发明的全连接神经网络模型结构图;Fig. 3 is a structural diagram of a fully connected neural network model of the present invention;
图4为本发明方法预报日最高气温的示意图;Fig. 4 is the schematic diagram that the present invention method forecasts maximum air temperature;
图5为现有数值预报IFS模式方法预报日最高气温的示意图。Figure 5 is a schematic diagram of the daily maximum temperature forecast by the existing numerical forecast IFS model method.
具体实施方式detailed description
为使本申请实施例的目的、技术方案和优点更加清楚,下面将结合本申请实施例中附图,对本申请实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例仅仅是本申请一部分实施例,而不是全部的实施例。通常在此处附图中描述和示出的本申请实施例的组件可以以各种不同的配置来布置和设计。因此,以下结合附图中提供的本申请的实施例的详细描述并非旨在限制要求保护的本申请的保护范围,而是仅仅表示本申请的选定实施例。基于本申请的实施例,本领域技术人员在没有做出创造性劳动的前提下所获得的所有其他实施例,都属于本申请保护的范围。下面结合附图对本发明做进一步的描述。In order to make the purpose, technical solutions and advantages of the embodiments of the present application clearer, the technical solutions in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only It is a part of the embodiments of this application, not all of them. The components of the embodiments of the application generally described and illustrated in the figures herein may be arranged and designed in a variety of different configurations. Therefore, the following detailed description of the embodiments of the application provided in conjunction with the accompanying drawings is not intended to limit the scope of the claimed application, but merely represents selected embodiments of the application. Based on the embodiments of the present application, all other embodiments obtained by those skilled in the art without making creative efforts belong to the scope of protection of the present application. The present invention will be further described below in conjunction with the accompanying drawings.
如图1所示,本发明涉及一种基于全连接神经网络日最高气温的预报方法,能够识别样本的时空间信息、处理多类别变量,通过带有嵌入层的全连接神经网络模型,旨在解决对中国范围内气象站日最高气温预报的目的,且比欧洲中期天气预报中心的集成预报系统的日最高气温预报更为准确的技术问题;具体包括以下步骤:As shown in Figure 1, the present invention relates to a method for forecasting the daily maximum temperature based on a fully connected neural network, which can identify the spatiotemporal information of samples and process multi-category variables. Through a fully connected neural network model with an embedded layer, it aims at To solve the technical problem of forecasting the daily maximum temperature of meteorological stations in China, which is more accurate than the daily maximum temperature forecast of the integrated forecasting system of the European Center for Medium-Range Weather Forecasting; specifically, the following steps are included:
S1、对观测资料和数值预报数据进行预处理;S1. Preprocessing the observation data and numerical forecast data;
S11、对观测数据进行数据清洗并生成目标文件:S11. Perform data cleaning on the observation data and generate target files:
剔除错误或者缺测的气象站站点,挑选出具有完整时间序列的站点最高气温观测资料,创建目标数据集(日期数*站点数,1)。Eliminate erroneous or missing meteorological station sites, select the maximum temperature observation data with a complete time series, and create a target data set (number of dates * number of stations, 1).
S12、读取转换历史数值模式数据格式:S12. Read and convert historical numerical mode data format:
读取数值预报模式GRIB格式数据,将地面层预报数据和高空层预报数据统一水平分辨率。对时间维度上少量的预报缺失值,采用线性插补方式进行插补,将历史数值预报数据输出为nc格式。Read the data in the GRIB format of the numerical prediction model, and unify the horizontal resolution of the ground-level forecast data and the upper-air layer forecast data. For a small number of missing forecast values in the time dimension, the linear interpolation method is used to interpolate, and the historical numerical forecast data is output in nc format.
S13、计算数值模式高空组合数据:S13. Calculate the high-altitude combination data of the numerical model:
基于数值模式高空层数据,计算涡度平流和温度平流。计算公式为:其中,v代表风速,是等压面上的拉普拉斯算子,ζ是相对涡度,f是行星涡度(科里奥利参数)。温度平流公式为:其中,v代表风速,T为温度。Based on the upper-air layer data of the numerical model, the eddy advection and temperature advection are calculated. The calculation formula is: Among them, v represents the wind speed, is the Laplace operator on the isobaric surface, ζ is the relative vorticity, and f is the planetary vorticity (Coriolis parameter). The temperature advection formula is: Among them, v represents the wind speed, and T is the temperature.
S14、将数值模式网格点上的数据插值到气象站站点上:S14, interpolating the data on the grid points of the numerical model to the weather station site:
采用双线性插值方法将数值模式格点上的地面数据、高空数据和高空组合数据插值到地面国家气象站站点上,将插值后的数值模式数据与目标数据输出为一个文件。其中,双线性插值原理如下:Using the bilinear interpolation method, the ground data, upper-air data and upper-air combination data on the numerical model grid points are interpolated to the ground national weather station site, and the interpolated numerical model data and target data are output as a file. Among them, the principle of bilinear interpolation is as follows:
如图2所示,如,需要得到的目标是未知函数f在点P=(x,y)的值,已知函数f在Q11=(x1,y1)、Q12=(x1,y2)、Q21=(x2,y1)以及Q22=(x2,y2)四个点的值。As shown in Figure 2, for example, the target to be obtained is the value of the unknown function f at point P=(x,y), and the known function f is at Q 11 =(x 1 ,y 1 ), Q 12 =(x 1 ,y 2 ), Q 21 =(x 2 ,y 1 ) and Q 22 =(x 2 ,y 2 ) four points.
首先在X方向进行线性插值,得到R1和R2,具体计算公式如下:First perform linear interpolation in the X direction to obtain R 1 and R 2 , the specific calculation formula is as follows:
其中,R1=(x,y1)R2=(x,y2)。然后在y方向的线性插值,计算出P点的值,计算公式如下:Wherein, R 1 =(x,y 1 )R 2 =(x,y 2 ). Then linear interpolation in the y direction to calculate the value of point P, the calculation formula is as follows:
S15、构建模型输入特征:S15. Build model input features:
根据预报经验,选出地面层及高空层与日最高气温预报相关的预报因子。用相关分析法以及互信息值法,挑选出与预报量相关的预报因子作为模型特征;相关分析法以及互信息值法说明如下:According to the forecast experience, the predictors related to the daily maximum air temperature forecast are selected for the ground layer and the upper layer. Using the correlation analysis method and the mutual information value method, the predictors related to the forecast quantity are selected as the model features; the correlation analysis method and the mutual information value method are explained as follows:
(1)相关分析法:可以挑选出与目标具有一定线性关系的特征。方法选择出的是与目标相关系数大于0.3,且达到0.05显著性水平的因子。其中,相关系数公式为:(1) Correlation analysis method: the features that have a certain linear relationship with the target can be selected. The method selects the factors whose correlation coefficient with the target is greater than 0.3 and reaches the significance level of 0.05. Among them, the correlation coefficient formula is:
X是观测值(目标),Y是预报值(特征),cov(X,Y)为X,Y的协方差,σX是X的标准差,μX是X的期望E(X)。X is the observed value (target), Y is the predicted value (feature), cov(X,Y) is the covariance of X and Y, σ X is the standard deviation of X, and μ X is the expected E(X) of X.
(2)互信息值法:通过计算目标与特征间的互信息值,度量特征与目标间的非线性相关性。设两个随机变量(X,Y)的联合分布为p(x,y),边缘分布分别为p(x),p(y),互信息I(X;Y)是联合分布p(x,y)与边缘分布p(x),p(y)的相对熵。互信息值表示为I(X;Y),其公式如下:(2) Mutual information value method: By calculating the mutual information value between the target and the feature, the non-linear correlation between the feature and the target is measured. Let the joint distribution of two random variables (X, Y) be p(x, y), the marginal distributions are respectively p(x), p(y), and the mutual information I(X; Y) is the joint distribution p(x, y) and the relative entropy of the marginal distributions p(x), p(y). The mutual information value is expressed as I(X; Y), and its formula is as follows:
为了避免模型依赖于数值模式预报,本发明选择的时间滞后变量为滞后1天与滞后2天的最高气温观测数据。同时为了能在数据集中标识不同站点以及样本的时间信息,设计了辅助变量,选择的辅助变量包括季节、月份、气象站站点编号、站点经度、站点纬度、站点海拔。本发明将站点经度、站点纬度与站点海拔视作数值型变量,站点编号、季节和月份视作分类变量。完成创建特征数据集(日期数*站点数,特征数)。In order to avoid the model from relying on the numerical model forecast, the time lag variable selected in the present invention is the observed data of maximum temperature with a lag of 1 day and a lag of 2 days. At the same time, in order to identify the time information of different stations and samples in the data set, auxiliary variables are designed. The selected auxiliary variables include season, month, weather station number, station longitude, station latitude, and station altitude. The present invention regards the station longitude, station latitude and station altitude as numerical variables, and station number, season and month as classification variables. Finish creating feature data set (number of dates * number of sites, number of features).
对季节变量使用独热编码方法处理。对站点编号和月份,先使用标签编码进行数值映射,然后送进嵌入层。One-hot encoding is used for seasonal variables. For station number and month, first use label encoding for numerical mapping, and then feed into the embedding layer.
S2、划分数据集;S2, dividing the data set;
将步骤S1完成的数据集划分为训练集、验证集和测试集,然后分别对训练集、验证集和测试集上的特征和目标执行数据进行归一化处理,其中归一化处理的公式如下:Divide the data set completed in step S1 into training set, verification set and test set, and then perform normalization processing on the features and target execution data on the training set, verification set and test set respectively, wherein the formula of normalization processing is as follows :
S3、构建结合了嵌入层的全连接神经网络模型;S3. Constructing a fully connected neural network model combined with an embedding layer;
神经网络结构包含输入层、嵌入层、连接层、隐藏层和输出层,输入层用来连接输入变量,嵌入层用来处理由输入层传递过来的分类变量,连接层负责连接经由嵌入层处理后的特征和其它特征,隐藏层是由多个神经元组成,以进行特征提取和学习,神经网络的最后一层为输出层。其中,嵌入层、隐藏层和输出层均包含需要学习的参数。如图3中所示的标签编码和独热编码为处理分类变量的传统方法,在本结构中,将一般全连接神经网络与嵌入层进行了结合,以便更有效地处理分类变量。如果仅仅使用一般形式的全连接神经网络框架,这类结构不能有效处理特征中的分类变量和数值型变量,将把所有特征全部视作数值型变量,这必然将影响模型效果。而通过连接标签编码、独热编码嵌入层和一般形式的全连接神经网络,可以帮助神经网络更好学习到气象站站点编号、月份和季节这三个分类变量所传递的信息,也克服了仅仅使用独热编码或者标签编码来处理分类变量这种传统方式的缺陷。The neural network structure includes an input layer, an embedding layer, a connection layer, a hidden layer, and an output layer. The input layer is used to connect input variables, the embedding layer is used to process the classification variables passed from the input layer, and the connection layer is responsible for connecting the variables processed by the embedding layer. features and other features, the hidden layer is composed of multiple neurons for feature extraction and learning, and the last layer of the neural network is the output layer. Among them, the embedding layer, hidden layer and output layer all contain parameters that need to be learned. Label encoding and one-hot encoding as shown in Figure 3 are traditional methods for dealing with categorical variables. In this structure, a general fully connected neural network is combined with an embedding layer to process categorical variables more effectively. If only a general form of fully connected neural network framework is used, this type of structure cannot effectively handle categorical variables and numerical variables in features, and all features will be regarded as numerical variables, which will inevitably affect the model effect. By connecting the label encoding, one-hot encoding embedding layer and the general form of fully connected neural network, it can help the neural network to better learn the information transmitted by the three categorical variables of weather station number, month and season, and also overcome the problem of only The disadvantages of the traditional way of using one-hot encoding or label encoding to deal with categorical variables.
S4、模型超参数设置和模型训练;S4. Model hyperparameter setting and model training;
S41、模型超参数设置:S41. Model hyperparameter setting:
模型超参数是模型外部的配置,其值无法从数据中估计。根据具体情况,本发明的神经网络模型超参数设置如下:1)嵌入层中的嵌入向量维度为8;2)隐藏层层数为1层,隐藏层中的神经元个数为64,激活函数为ReLU;3)输出层神经元个数为1个,激活函数为Linear;其中,激活函数ReLU的计算公式如下:Model hyperparameters are configurations external to the model whose values cannot be estimated from the data. According to specific circumstances, the hyperparameters of the neural network model of the present invention are set as follows: 1) the embedded vector dimension in the embedding layer is 8; 2) the number of hidden layers is 1 layer, and the number of neurons in the hidden layer is 64, and the activation function 3) The number of neurons in the output layer is 1, and the activation function is Linear; the calculation formula of the activation function ReLU is as follows:
其中x是变量。where x is a variable.
S42、模型训练:S42. Model training:
在训练神经网络时,设置损失函数为平均绝对误差(Mean Absolute Error,MAE)为了防止模型过拟合,采用了早期停止的正则化方法。设定模型迭代时期数为50次,如果训练中验证误差连续3次不降反增,则停止训练,模型训练完,然后将模型应用至验证集,计算验证集上的模型误差,通过比较验证集来进行超参数选择,以获得最佳模型,并保存验证集上表现效果最佳的模型。When training the neural network, the loss function is set to mean absolute error (Mean Absolute Error, MAE). In order to prevent the model from overfitting, the regularization method of early stopping is adopted. Set the number of model iterations to 50 times. If the verification error does not decrease but increases for 3 consecutive times during training, stop the training. After the model is trained, then apply the model to the verification set, calculate the model error on the verification set, and verify by comparison Set for hyperparameter selection to obtain the best model, and save the best-performing model on the validation set.
S5、模型评估和日最高气温预测;S5. Model evaluation and daily maximum temperature forecast;
为了评估模型好坏,在测试集上进行评估。测试集是独立于训练集和验证集的数据样本。具体步骤是:加载已经保存好的训练完毕的模型,将步骤S2的测试集中特征数据输入模型,模型即可输出日最高气温预测值,通过对比模型输出的预测值与实际观测值,采用各种检验方法,可以评估模型在独立于训练集外的预报性能。To evaluate how good the model is, it is evaluated on the test set. The test set is a sample of data separate from the training and validation sets. The specific steps are: load the saved and trained model, input the characteristic data of the test set in step S2 into the model, and the model can output the predicted value of the daily maximum temperature. By comparing the predicted value output by the model with the actual observed value, various Test method, which can evaluate the forecasting performance of the model independently of the training set.
如果要利用本发明模型应用于新的样本进行日最高气温预测,只要将新的样本数据根据步骤S1进行数据预处理,然后将处理好的数据输入本模型即可得到最高气温的预测值。If the model of the present invention is to be applied to a new sample for daily maximum temperature prediction, the new sample data should be preprocessed according to step S1, and then the processed data can be input into the model to obtain the predicted value of the maximum temperature.
本发明预报的2020年1月1日至12月31日逐日的日最高气温与欧洲中期预报中心的集成预报系统IFS的日最高气温预报对比见图4和图5。图中实现为对角线,虚线为拟合线,阴影部分表示核密度估计值,从图中可以看出本发明的预报与IFS模式的预报相比,本发明预报更接近观测值(更靠近对角线)。本发明2020年全年逐日最高气温预报的平均均方根误差(1.433)与IFS模式预报的均方根误差(2.746)相比,降低了47.82%,绝对平均误差降低了46.5%。The daily maximum temperature forecast by the present invention from January 1 to December 31, 2020 is compared with the daily maximum temperature forecast of the integrated forecast system IFS of the European Center for Medium-Range Forecasting, as shown in Figure 4 and Figure 5. In the figure, it is realized as a diagonal line, the dotted line is a fitting line, and the shaded part represents the estimated value of the kernel density. It can be seen from the figure that the forecast of the present invention is closer to the observed value (closer to the forecast of the IFS model) than the forecast of the IFS model. diagonal). Compared with the root mean square error (2.746) of the IFS model forecast, the average root mean square error (1.433) of the daily maximum temperature forecast of the present invention in 2020 is reduced by 47.82%, and the absolute average error is reduced by 46.5%.
以上所述仅是本发明的优选实施方式,应当理解本发明并非局限于本文所披露的形式,不应看作是对其他实施例的排除,而可用于各种其他组合、修改和环境,并能够在本文所述构想范围内,通过上述教导或相关领域的技术或知识进行改动。而本领域人员所进行的改动和变化不脱离本发明的精神和范围,则都应在本发明所附权利要求的保护范围内。The above descriptions are only preferred embodiments of the present invention, and it should be understood that the present invention is not limited to the forms disclosed herein, and should not be regarded as excluding other embodiments, but can be used in various other combinations, modifications and environments, and Modifications can be made within the scope of the ideas described herein, by virtue of the above teachings or skill or knowledge in the relevant art. However, changes and changes made by those skilled in the art do not depart from the spirit and scope of the present invention, and should all be within the protection scope of the appended claims of the present invention.
Claims (7)
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202211248299.3A CN115526413A (en) | 2022-10-12 | 2022-10-12 | A Forecasting Method of Daily Maximum Air Temperature Based on Fully Connected Neural Network |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202211248299.3A CN115526413A (en) | 2022-10-12 | 2022-10-12 | A Forecasting Method of Daily Maximum Air Temperature Based on Fully Connected Neural Network |
Publications (1)
Publication Number | Publication Date |
---|---|
CN115526413A true CN115526413A (en) | 2022-12-27 |
Family
ID=84701946
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202211248299.3A Pending CN115526413A (en) | 2022-10-12 | 2022-10-12 | A Forecasting Method of Daily Maximum Air Temperature Based on Fully Connected Neural Network |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN115526413A (en) |
Cited By (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN116055273A (en) * | 2023-01-19 | 2023-05-02 | 浙江工业大学 | QPSK receiver cascaded by neural network and auxiliary model training method thereof |
CN117034780A (en) * | 2023-08-31 | 2023-11-10 | 江苏省气候中心 | Multi-scale sub-season precipitation prediction method based on deep learning |
CN117272182A (en) * | 2023-08-16 | 2023-12-22 | 南京信息工程大学 | A daily temperature prediction method, device, medium and equipment |
CN118915192A (en) * | 2024-07-18 | 2024-11-08 | 华南理工大学 | Meteorological data downscaling method and device based on space-time diagram neural network |
-
2022
- 2022-10-12 CN CN202211248299.3A patent/CN115526413A/en active Pending
Cited By (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN116055273A (en) * | 2023-01-19 | 2023-05-02 | 浙江工业大学 | QPSK receiver cascaded by neural network and auxiliary model training method thereof |
CN117272182A (en) * | 2023-08-16 | 2023-12-22 | 南京信息工程大学 | A daily temperature prediction method, device, medium and equipment |
CN117272182B (en) * | 2023-08-16 | 2024-03-15 | 南京信息工程大学 | Daily air temperature prediction method, device, medium and equipment |
CN117034780A (en) * | 2023-08-31 | 2023-11-10 | 江苏省气候中心 | Multi-scale sub-season precipitation prediction method based on deep learning |
CN117034780B (en) * | 2023-08-31 | 2024-04-19 | 江苏省气候中心 | Multi-scale sub-season precipitation prediction method based on deep learning |
CN118915192A (en) * | 2024-07-18 | 2024-11-08 | 华南理工大学 | Meteorological data downscaling method and device based on space-time diagram neural network |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN111639748B (en) | Watershed pollutant flux prediction method based on LSTM-BP space-time combination model | |
CN115526413A (en) | A Forecasting Method of Daily Maximum Air Temperature Based on Fully Connected Neural Network | |
CN110555561B (en) | Medium-and-long-term runoff ensemble forecasting method | |
CN111126704B (en) | Multi-region precipitation prediction model construction method based on multi-graph convolution and memory network | |
CN111665575B (en) | Medium-and-long-term rainfall grading coupling forecasting method and system based on statistical power | |
CN101480143B (en) | Method for predicating single yield of crops in irrigated area | |
CN113705877B (en) | Real-time monthly runoff forecast method based on deep learning model | |
CN107292098A (en) | Medium-and Long-Term Runoff Forecasting method based on early stage meteorological factor and data mining technology | |
CN112288164A (en) | Wind power combined prediction method considering spatial correlation and correcting numerical weather forecast | |
CN107563554A (en) | A kind of screening technique for counting the NO emissions reduction model prediction factor | |
CN113255972A (en) | Short-term rainfall prediction method based on Attention mechanism | |
CN107274030A (en) | Runoff Forecast method and system based on hydrology variable year border and monthly variation characteristic | |
CN105184388A (en) | Non-linear regression method for urban power load short-period prediction | |
CN105974495A (en) | Method for pre-judging future average cloud amount of target area by using classification fitting method | |
CN117526274A (en) | New energy power prediction method, electronic equipment and storage medium in extreme climate | |
CN114004152A (en) | Multi-wind-field wind speed space-time prediction method based on graph convolution and recurrent neural network | |
Hennayake et al. | Machine learning based weather prediction model for short term weather prediction in Sri Lanka | |
CN115600498A (en) | A Wind Speed Forecast Correction Method Based on Artificial Neural Network | |
CN117909888A (en) | Intelligent artificial intelligence climate prediction method | |
CN112561133A (en) | Water flow prediction system and method based on neural network | |
CN115049013A (en) | Short-term rainfall early warning model fusion method combining linearity and SVM | |
Liu et al. | Gridded statistical downscaling based on interpolation of parameters and predictor locations for summer daily precipitation in North China | |
CN114004405A (en) | Photovoltaic power prediction method and system based on Elman neural network and satellite cloud picture | |
CN116611588B (en) | Precipitation multi-driving factor segmented calibrated optimization forecast method and system | |
CN116960962A (en) | Mid-long term area load prediction method for cross-area data fusion |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination |