Daily meteorological element spatial interpolation method, system and device based on random forest

By adopting the method of fusion of random forests and semivariant functions in meteorological data processing, the shortcomings of traditional interpolation methods in meteorological data processing are solved, the accuracy and detailed information of meteorological data interpolation are improved, and more accurate meteorological data acquisition is achieved .

CN117055136BActive Publication Date: 2024-12-17TIANJIN UNIV
View PDF 10 Cites 0 Cited by

Patent Information

Application Number
CN202310862136.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-07-14
Publication Date
2024-12-17
Estimated Expiration
2043-07-14

AI Technical Summary

Technical Problem

The traditional spatial interpolation method has problems such as large workload, strong subjectivity, low prediction accuracy and inability to fully consider the impact of topography and topography when processing meteorological data, especially inadequate capabilities when processing multivariables.

Method used

The spatial interpolation method of daily meteorological elements based on random forests is adopted, and meteorological data is obtained through the database for preprocessing and hierarchical sampling. A random forest regression model with semivariant functions is constructed, and a Bayesian optimization algorithm is used to select hyperparameters and optimize it. Model to generate spatial interpolation graphs of meteorological features.

Benefits of technology

It improves the accuracy and detailed information of meteorological data interpolation, weakens the impact of spatial heterogeneity, makes up for the shortcomings of traditional methods, and provides more accurate and reliable high-resolution meteorological data.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117055136B_ABST
    Figure CN117055136B_ABST
Patent Text Reader

Abstract

The present invention relates to the fields of machine learning application and meteorological technology, and in particular to a method, system and device for spatial interpolation of daily meteorological elements based on random forests; the method comprises extracting meteorological input data of a study area from a database for preprocessing, and normalizing and scaling the range of characteristic variables; dividing a data set by spatial stratified sampling to obtain more representative meteorological stations as a training set; then constructing a random forest regression model integrating a semivariogram function to reduce the influence of spatial heterogeneity; training the model, and optimizing hyperparameters by a Bayesian optimization algorithm, and finally using the model for spatial interpolation drawing, which greatly improves the interpolation accuracy and enriches the interpolation detail information compared with traditional spatial interpolation methods.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of machine learning applications and meteorology technology, and in particular to a method, system and device for spatial interpolation of daily meteorological elements based on random forests. Background Art

[0002] In meteorology, meteorological factors include temperature, humidity, rainfall, wind speed, etc., which are the basis of research fields such as agriculture, forestry, and environment. Obtaining accurate and reliable high-resolution meteorological data is of great significance to promoting the development of related research; among them, meteorological data mainly comes from meteorological station monitoring, but meteorological stations are distributed discretely, sparsely and unevenly in space. Although the data monitored near the station is accurate, it is impossible to obtain meteorological element data for the entire area outside the station. Using spatial data interpolation methods to deduce other unknown points or unknown area data from a set of known discrete data according to a certain mathematical relationship is a common method.

[0003] At present, the most commonly used spatial interpolation methods are: nearest neighbor method, inverse distance weighted method, spline method and Kriging method, etc. However, these traditional methods are mostly based on statistical methods, limited by the substitution of subjective prior knowledge, do not fully understand the physical process, and have insufficient capabilities when dealing with multiple variables.

[0004] Compared with traditional interpolation methods, machine learning technology is based on an adaptive mechanism and does not rely on assumptions. It can make up for the shortcomings of traditional methods such as heavy workload, strong subjectivity, and low prediction accuracy. Random forest is an integrated learning algorithm designed based on the Bagging framework. Random forest uses decision trees as the base classifier for integration and introduces a method of randomly selecting data features in the decision-making process. It can evaluate the importance of variables and automatically select important variables, and generally does not experience overfitting. Summary of the invention

[0005] The purpose of the present invention is to provide a method, system and device for spatial interpolation of daily meteorological elements based on random forests to solve the problems raised in the above background technology.

[0006] To achieve the above object, the present invention provides the following technical solutions:

[0007] A spatial interpolation method of daily meteorological elements based on random forests includes the following steps:

[0008] Acquire daily meteorological element data of the study area through a database, and pre-process the meteorological element data to establish a data set;

[0009] Sampling and dividing the data set by a spatial stratified sampling method, and obtaining a training set and a test set based on the data set respectively;

[0010] The random forest model was integrated and constructed based on the semi-variogram function to establish a random forest regression model;

[0011] Using Bayesian optimization algorithm and five-fold cross validation to select hyperparameters of the random forest regression model to optimize the training of the random forest regression model;

[0012] The random forest regression model after optimization is selected through server deployment hyperparameters to perform model processing and transformation on the daily meteorological data and characteristic values ​​of the study area, and obtain the spatial interpolation map of meteorological elements of the corresponding study area.

[0013] As a further solution of the present invention, the step of obtaining daily meteorological element data of the study area through a database and preprocessing the meteorological element data to establish a data set specifically includes:

[0014] Respond to the spatial interpolation acquisition request to determine the corresponding study area, and obtain the daily meteorological element data of the study area and the associated meteorological stations based on the database, wherein the meteorological element data includes the longitude, latitude, altitude information, temperature, humidity information, rainfall information and wind speed information of the station;

[0015] Performing outlier checks, location checks, site uniqueness checks, and valid data checks on the daily meteorological element data using a preset quality control procedure;

[0016] The elevation, aspect and slope information of the site are extracted through the digital elevation model (DEM) to establish covariates, which are used to reduce the influence of topography on element interpolation by participating in interpolation operations;

[0017] Based on the longitude, latitude, altitude information, aspect and slope as characteristic variables, the method model is constructed with temperature, humidity, rainfall and wind speed information as target variables, and normalized scaling is performed to obtain the normalized data model:

[0018]

[0019] Among them, x t n is the normalized data, x t is the original data, x avg and x sd are the mean and standard deviation of the original data respectively.

[0020] As a further solution of the present invention: the step of sampling and dividing the data set by a spatial stratified sampling method to obtain a training set and a test set based on the data set specifically includes:

[0021] The K-means clustering algorithm is used to perform feature stratification on all sites based on longitude, latitude, altitude, aspect and slope to obtain multiple feature layers;

[0022] The sample size ratio of each feature layer is set as the layer weight W of the corresponding feature layer and used for random sampling of the corresponding feature layer.

[0023] As a further solution of the present invention: the step of fusing and constructing the random forest model based on the semi-variogram to establish the random forest regression model specifically includes:

[0024] The random forest model is integrated based on the semi-variogram function, which is defined as:

[0025] Y(s)=f(X t ,X v )

[0026] Among them, Y(s) is the target variable value at point s, X t is the feature variable group, X v It is the variable group obtained by the spatial position relationship and the semivariogram;

[0027] Fitting the semivariogram function through a preset spherical model so that the semivariogram function becomes stable;

[0028] Calculate the semivariogram expressions of temperature, humidity, rainfall and wind speed respectively, and further obtain the semivariogram variable group X required by the model. v , and the feature variable group X t and the semivariogram variable group X v Input random forest regression model to train the direct correlation between target variable and feature variable and semivariogram variable;

[0029] The random forest regression model randomly selects samples and features and trains multiple classification regression trees based on the Booststrap idea. The final regression prediction is the average of multiple classification regression trees, expressed as:

[0030]

[0031] Among them, x is the feature variable of regression prediction, M is the number of classification and regression trees, is the mth classification and regression tree.

[0032] As a further solution of the present invention: the step of using the Bayesian optimization algorithm and five-fold cross validation to select hyperparameters of the random forest regression model to optimize the training of the random forest regression model specifically includes:

[0033] The Bayesian optimization algorithm and five-fold cross validation were used to select hyperparameters for the random forest regression model. The hyperparameters selected for optimization included the number of decision trees in the forest (n_estimators), the depth of the decision tree (max_depth), the maximum number of features for decision tree partitioning (max_features), and the minimum number of samples required to split an internal node (min_samples_split).

[0034] The root mean square error RMSE is selected as the objective function of Bayesian optimization, and the calculation method is expressed as:

[0035]

[0036] Among them, n is the number of sample points involved in cross-validation, is the sample point s i The measured value of is the sample point s i Predicted values ​​under the prediction model;

[0037] After obtaining the corresponding optimal values ​​of hyperparameters, the random forest regression model is adjusted, optimized and saved.

[0038] The embodiment of the present invention aims to provide a daily meteorological element spatial interpolation system based on random forest, comprising:

[0039] A data preprocessing module, used to obtain daily meteorological element data of the study area through a database, and preprocess the meteorological element data to establish a data set;

[0040] A stratified sampling module, used to sample and divide the data set by a spatial stratified sampling method, and obtain a training set and a test set based on the data set respectively;

[0041] The fusion construction module is used to fuse and construct the random forest model based on the semi-variogram function to establish a random forest regression model;

[0042] A hyperparameter optimization module, used to select hyperparameters for the random forest regression model using a Bayesian optimization algorithm and five-fold cross validation, so as to optimize the training of the random forest regression model;

[0043] The interpolation acquisition module is used to deploy the random forest regression model after hyperparameter selection optimization through the server, so as to perform model processing and transformation on the daily meteorological data and characteristic values ​​of the study area, and obtain the spatial interpolation map of meteorological elements of the corresponding study area.

[0044] An embodiment of the present invention aims to provide an electronic device, comprising a processor, a memory, a communication interface, and one or more programs, wherein the one or more programs are stored in the memory and can be executed by the processor, and the one or more programs are used to execute instructions for implementing multiple steps of a daily meteorological element spatial interpolation method based on random forest.

[0045] Compared with the prior art, the beneficial effects of the present invention include: through the random forest spatial prediction model, the shortcomings of the traditional spatial interpolation method such as large workload, strong subjectivity and low prediction accuracy are compensated; and altitude, slope aspect and slope are selected as characteristic variables to participate in model training and fitting, which fully considers the influence of topography on spatial interpolation; the semivariogram function is used to integrate the spatial position relationship information into the random forest model, which weakens the influence of spatial heterogeneity and enriches the interpolation detail information and interpolation accuracy. BRIEF DESCRIPTION OF THE DRAWINGS

[0046] Figure 1 This is a flowchart of a spatial interpolation method for daily meteorological elements based on random forest.

[0047] Figure 2 This is a diagram of the variation function model in a daily meteorological element spatial interpolation method based on random forest.

[0048] Figure 3 This is a spatial interpolation map obtained based on data from a certain place in a daily meteorological element spatial interpolation method based on random forest.

[0049] Figure 4 This is a block diagram of a daily meteorological element spatial interpolation system based on random forest. DETAILED DESCRIPTION

[0050] In order to make the purpose, technical solution and advantages of the present invention more clearly understood, the present invention is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not intended to limit the present invention.

[0051] The specific implementation of the present invention is described in detail below in conjunction with specific embodiments.

[0052] like Figure 1 and Figure 3 The present invention provides a method for spatial interpolation of daily meteorological elements based on random forests, which comprises the following steps:

[0053] S10, acquiring daily meteorological element data of the study area through a database, and preprocessing the meteorological element data to establish a data set.

[0054] S20, sampling and dividing the data set by a spatial stratified sampling method, and respectively obtaining a training set and a test set based on the data set.

[0055] S30, based on the semi-variogram function, the random forest model is integrated and constructed to establish a random forest regression model.

[0056] S40, using a Bayesian optimization algorithm and five-fold cross validation to select hyperparameters for the random forest regression model to optimize the training of the random forest regression model.

[0057] S50, deploying the hyperparameters through the server to select the optimized random forest regression model, so as to perform model processing and transformation on the daily meteorological data and characteristic values ​​of the study area, and obtain a spatial interpolation map of meteorological elements corresponding to the study area.

[0058] As another preferred embodiment of the present invention, the step of acquiring daily meteorological element data of the study area through a database and preprocessing the meteorological element data to establish a data set specifically includes:

[0059] Respond to the spatial interpolation acquisition request to determine the corresponding study area, and obtain the daily meteorological element data of the study area and the associated meteorological stations based on the database, wherein the meteorological element data includes the longitude, latitude, altitude information, temperature, humidity information, rainfall information and wind speed information of the station.

[0060] The daily meteorological element data are respectively subjected to an outlier check, a location check, a site uniqueness check and a valid data check using a preset quality control procedure.

[0061] The elevation, aspect and slope information of the site are extracted through the digital elevation model (DEM) to establish covariates, which are used to reduce the influence of topography on element interpolation by participating in interpolation operations.

[0062] Based on the longitude, latitude, altitude information, aspect and slope as characteristic variables, the method model is constructed with temperature, humidity, rainfall and wind speed information as target variables, and normalized scaling is performed to obtain the normalized data model:

[0063]

[0064] Among them, x t n is the normalized data, x t is the original data, x avg and x sd are the mean and standard deviation of the original data respectively.

[0065] In this embodiment, the data processing process first determines the research area that needs spatial interpolation, extracts the daily meteorological element data of all meteorological stations in and near the area from the database, and then performs abnormal data inspection. Specifically, the abnormal value inspection is used to exclude 32766 data missing or no observation task data; the location inspection is used to exclude data with missing site location information; the site uniqueness inspection is used to check and ensure that there are no overlapping sites; the valid data inspection is used to exclude data with less than 80% valid data throughout the year; at the same time, in order to reduce the impact of topography on meteorological element interpolation, the digital elevation model DEM is introduced, and here we choose a spatial resolution of 12.5m; the aspect and slope information are extracted from the DEM through the aspects and slope calculation tools provided by ArcGIS software, saved as raster data, and used as covariates together with the altitude to participate in the interpolation operation. The purpose of the normalization and scaling processing here is to eliminate the problem of too large a range of eigenvalues.

[0066] As another preferred embodiment of the present invention, the step of sampling and dividing the data set by a spatial stratified sampling method to obtain a training set and a test set based on the data set specifically includes:

[0067] The K-means clustering algorithm is used to perform feature stratification on all sites based on longitude, latitude, altitude, aspect and slope to obtain multiple feature layers.

[0068] The sample size ratio of each feature layer is set as the layer weight W of the corresponding feature layer and used for random sampling of the corresponding feature layer.

[0069] In this embodiment, in order to obtain more representative site data as the training set of the model, the spatial stratified sampling method is used to sample and divide the data set. Therefore, the K-means clustering algorithm model provided by the Scikit-learn machine learning library in Python is used to divide multiple feature layers; there is similarity between adjacent sites, and it is expressed as:

[0070]

[0071] Among them, Q il and Q il They represent the standard values ​​of the lth item at the ith site and the jth site, respectively. Specifically, through spatial stratified sampling, 70% of the site data are selected as the training set, and the remaining 30% are used as the test set.

[0072] like Figure 2 As shown, as another preferred embodiment of the present invention, the steps of fusing and constructing the random forest model based on the semi-variogram function to establish the random forest regression model specifically include:

[0073] The random forest model is integrated based on the semi-variogram function, which is defined as:

[0074] Y(s)=f(X t ,X v )

[0075] Among them, Y(s) is the target variable value at point s, X t is the feature variable group, X v It is a variable group obtained from the spatial position relationship and the semivariogram function.

[0076] The semivariogram is fitted by a preset spherical model so that the semivariogram is stable.

[0077] Calculate the semivariogram expressions of temperature, humidity, rainfall and wind speed respectively, and further obtain the semivariogram variable group X required by the model. v , and the feature variable group X t and the semivariogram variable group X v Input random forest regression model to train the correlation between target variable and feature variable and semivariogram variable.

[0078] The random forest regression model randomly selects samples and features and trains multiple classification regression trees based on the Booststrap idea. The final regression prediction is the average of multiple classification regression trees, expressed as:

[0079]

[0080] Among them, x is the feature variable of regression prediction, M is the number of classification and regression trees, is the mth classification and regression tree.

[0081] In this embodiment, the meteorological element data has spatial variability. By introducing the semivariogram function to fuse the spatial position information, the spatial interpolation accuracy can be improved. In the defined fusion model construction formula, X v The value of each variable in the variable group is the square root of the semi-variance value between point s and each sample point. The definition formula is:

[0082]

[0083] Where h si is the Euclidean distance from point s to sample point i, and γ(h) is the semivariogram function.

[0084] The definition formula of γ(h) is:

[0085]

[0086] Where h is the spatial lag step, that is, the distance between two spatial points, N(h) is the number of sample points with a spatial lag step of h, and Z(s i ) and Z(s i +h) distribution represents the value of the target variable at point s and point s+h.

[0087] Since the semivariogram lacks the fitting of theoretical models, it is necessary to select the spherical model that best fits the semivariogram, in which the spatial correlation decreases linearly with the increase of step length. The spherical model formula is defined as:

[0088]

[0089] Where C0 is the nugget value, C0+C is the base value, and a is the range value of spatial dependence. It indicates that the closer the distance is, the smaller the dissimilarity is, which limits the accuracy of spatial interpolation; the sill value is the stable value reached by the semivariogram as h increases; the range value is the range of the variation function curve from change to stability.

[0090] As another preferred embodiment of the present invention, the steps of using the Bayesian optimization algorithm and five-fold cross validation to select hyperparameters of the random forest regression model to optimize the training of the random forest regression model specifically include:

[0091] The Bayesian optimization algorithm and five-fold cross validation were used to select hyperparameters for the random forest regression model. The hyperparameters selected for optimization included the number of decision trees in the forest (n_estimators), the depth of the decision tree (max_depth), the maximum number of features for decision tree partitioning (max_features), and the minimum number of samples required to split internal nodes (min_samples_split).

[0092] The root mean square error RMSE is selected as the objective function of Bayesian optimization, and the calculation method is expressed as:

[0093]

[0094] Among them, n is the number of sample points involved in cross-validation, is the sample point s i The measured value of is the sample point s i The predicted value under the forecast model.

[0095] After obtaining the corresponding optimal values ​​of hyperparameters, the random forest regression model is adjusted, optimized and saved.

[0096] like Figure 4As shown, the embodiment of the present invention aims to provide a daily meteorological element spatial interpolation system based on random forest, comprising:

[0097] The data preprocessing module 10 is used to obtain the daily meteorological element data of the study area through a database, and preprocess the meteorological element data to establish a data set.

[0098] The stratified sampling module 20 is used to perform sampling and partitioning on the data set by a spatial stratified sampling method, and obtain a training set and a test set based on the data set respectively.

[0099] The fusion construction module 30 is used to fuse and construct the random forest model based on the semi-variogram function to establish a random forest regression model.

[0100] The hyperparameter optimization module 40 is used to select hyperparameters for the random forest regression model using a Bayesian optimization algorithm and five-fold cross validation to optimize the training of the random forest regression model.

[0101] The interpolation acquisition module 50 is used to deploy the random forest regression model after hyperparameter selection optimization through the server, so as to perform model processing and transformation on the daily meteorological data and characteristic values ​​of the study area, and obtain the spatial interpolation map of meteorological elements corresponding to the study area.

[0102] An embodiment of the present invention aims to provide an electronic device, comprising a processor, a memory, a communication interface, and one or more programs, wherein the one or more programs are stored in the memory and can be executed by the processor, and the one or more programs are used to execute instructions for implementing multiple steps of a daily meteorological element spatial interpolation method based on random forest.

[0103] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and the program can be stored in a non-volatile computer-readable storage medium. When the program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to memory, storage, database or other media used in the embodiments provided in this application can include non-volatile and / or volatile memory. Non-volatile memory may include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM) or flash memory. Volatile memory may include random access memory (RAM) or external cache memory. As an illustration and not limitation, RAM is available in many forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link (Synchlink) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM).

[0104] Those skilled in the art will readily appreciate other embodiments of the present disclosure after considering the disclosure in the specification and examples. This application is intended to cover any variations, uses or adaptations of the present disclosure, which follow the general principles of the present disclosure and include common knowledge or customary techniques in the art that are not disclosed in the present disclosure. The specification and examples are intended to be exemplary only, and the true scope and spirit of the present disclosure are indicated by the claims.

[0105] It should be understood that the present disclosure is not limited to the exact structures that have been described above and shown in the drawings, and that various modifications and changes may be made without departing from the scope thereof. The scope of the present disclosure is limited only by the appended claims.

Claims

1. A spatial interpolation method of daily meteorological elements based on random forest, It is characterized in that The following steps are involved: Acquire daily meteorological element data of the study area through a database, and pre-process the meteorological element data to establish a data set; Sampling and dividing the data set by a spatial stratified sampling method, respectively obtaining a training set and a test set based on the data set; The random forest model is integrated and constructed based on the semivariogram function to establish a random forest regression model, which includes: The random forest model is integrated based on the semivariogram, which is defined as: Y(s)=f(X t ,X v ) Among them, Y(s) is the target variable value at point s, X t is the feature variable group, X v It is the variable group obtained by the spatial position relationship and the semivariogram; Fitting the semivariogram function through a preset spherical model so that the semivariogram function becomes stable; Calculate the semivariogram expressions of temperature, humidity, rainfall and wind speed respectively, and further obtain the semivariogram variable group X required by the model. v , and the feature variable group X t and the semivariogram variable group X v Input random forest regression model to train the direct correlation between target variable and feature variable and semivariogram variable; The random forest regression model randomly selects samples and features and trains multiple classification regression trees based on the Booststrap idea. The final regression prediction is the average of multiple classification regression trees, expressed as: Among them, x is the feature variable of regression prediction, M is the number of classification and regression trees, is the mth classification and regression tree; Using Bayesian optimization algorithm and five-fold cross validation to select hyperparameters of the random forest regression model to optimize the training of the random forest regression model; The random forest regression model after optimization is selected through server deployment hyperparameters to perform model processing and transformation on the daily meteorological data and characteristic values ​​of the study area, and obtain the spatial interpolation map of meteorological elements of the corresponding study area.

2. The method for spatial interpolation of daily meteorological elements based on random forest according to claim 1, It is characterized in that The step of obtaining daily meteorological element data of the study area through a database and preprocessing the meteorological element data to establish a data set specifically includes: Respond to the spatial interpolation acquisition request to determine the corresponding study area, and obtain the daily meteorological element data of the study area and the associated meteorological stations based on the database, wherein the meteorological element data includes the longitude, latitude, altitude information, temperature, humidity information, rainfall information and wind speed information of the station; Performing outlier checks, location checks, site uniqueness checks, and valid data checks on the daily meteorological element data using a preset quality control procedure; Extracting the elevation, aspect and slope information of the site through the digital elevation model (DEM) to establish covariates, which are used to reduce the influence of topography on element interpolation by participating in interpolation operations; Based on the longitude, latitude, altitude information, aspect and slope as characteristic variables, the method model is constructed with temperature, humidity, rainfall and wind speed information as target variables, and normalized scaling is performed to obtain the normalized data model: Among them, x t n is the normalized data, x t is the original data, x avg and x sd are the mean and standard deviation of the original data respectively.

3. The method for spatial interpolation of daily meteorological elements based on random forest according to claim 2, It is characterized in that The step of sampling and dividing the data set by a spatial stratified sampling method to obtain a training set and a test set based on the data set specifically includes: The K-means clustering algorithm is used to perform feature stratification on all sites based on longitude, latitude, altitude, aspect and slope to obtain multiple feature layers; The sample size ratio of each feature layer is set as the layer weight W of the corresponding feature layer and used for random sampling of the corresponding feature layer.

4. The method for spatial interpolation of daily meteorological elements based on random forest according to claim 1, It is characterized in that The steps of using the Bayesian optimization algorithm and five-fold cross validation to select hyperparameters of the random forest regression model to optimize the training of the random forest regression model specifically include: The Bayesian optimization algorithm and five-fold cross validation are used to select hyperparameters for the random forest regression model. The hyperparameters selected for optimization include the number of decision trees in the forest, the depth of the decision tree, the maximum number of features for decision tree partitioning, and the minimum number of samples required to split internal nodes. The root mean square error RMSE is selected as the objective function of Bayesian optimization, and the calculation method is expressed as: Among them, n is the number of sample points involved in cross-validation, is the sample point S i The measured value of is the sample point s i Predicted values ​​under the prediction model; After obtaining the corresponding optimal values ​​of hyperparameters, the random forest regression model is adjusted, optimized and saved.

5. A spatial interpolation system of daily meteorological elements based on random forests, include: A data preprocessing module, used to obtain daily meteorological element data of the study area through a database, and preprocess the meteorological element data to establish a data set; A stratified sampling module, used to sample and divide the data set by a spatial stratified sampling method, and obtain a training set and a test set based on the data set respectively; The fusion construction module is used to fuse and construct the random forest model based on the semivariogram function to establish a random forest regression model, which includes: The random forest model is integrated based on the semi-variogram function, which is defined as: Y(s)=f(X t ,X v ) Among them, Y(s) is the target variable value at point s, X t is the feature variable group, X v It is the variable group obtained by the spatial position relationship and the semivariogram; Fitting the semivariogram function through a preset spherical model so that the semivariogram function becomes stable; Calculate the semivariogram expressions of temperature, humidity, rainfall and wind speed respectively, and further obtain the semivariogram variable group X required by the model. v , and the feature variable group X t and the semivariogram variable group X v Input random forest regression model to train the direct correlation between target variable and feature variable and semivariogram variable; The random forest regression model randomly selects samples and features and trains multiple classification regression trees based on the Booststrap idea. The final regression prediction is the average of multiple classification regression trees, expressed as: Among them, x is the feature variable of regression prediction, M is the number of classification and regression trees, is the mth classification and regression tree; A hyperparameter optimization module, used to select hyperparameters for the random forest regression model using a Bayesian optimization algorithm and five-fold cross validation, so as to optimize the training of the random forest regression model; The interpolation acquisition module is used to deploy the random forest regression model after hyperparameter selection optimization through the server, so as to perform model processing and transformation on the daily meteorological data and characteristic values ​​of the study area, and obtain the spatial interpolation map of meteorological elements of the corresponding study area.

6. A daily meteorological element spatial interpolation device based on random forest, comprising a processor, a memory, a communication interface and one or more programs, wherein the one or more programs are stored in the memory and can be executed by the processor, and the one or more programs are used to execute instructions for implementing multiple steps of any method based on claims 1-4.

Citation Information

Patent Citations

  • MMP prediction method and device based on random forest algorithm

    CN114399121A

  • Local cloud and fog prediction method and system

    CN114926744A

  • Random forest model training method and device

    CN115082767A

  • Method for predicting performance of talents based on Bayesian optimization model fusion algorithm

    CN115659807A

  • Outdoor environment temperature remote sensing inversion method based on satellite data and random forest model

    CN115690598A