A soil bulk density missing data imputation method and device based on forward iteration variable screening

CN118551166BActive Publication Date: 2026-09-11ZJU HANGZHOU GLOBAL SCI & TECH INNOVATION CENT
View PDF 5 Cites 0 Cited by

Patent Information

Application Number
CN202410481900.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-04-22
Publication Date
2026-09-11
Estimated Expiration
2044-04-22

AI Technical Summary

Technical Problem

[0007]然而,上述专利提供的的土壤传递函数方法存在全局模型难以适应不同区域环境差异的问题

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118551166B_ABST
    Figure CN118551166B_ABST
Patent Text Reader

Abstract

The application discloses a soil bulk density missing data imputation method based on forward iterative variable screening, and relates to the technical field of soil bulk density missing data imputation. The method comprises the following steps: obtaining soil bulk density of measured soil samples and an environmental variable set related to the soil bulk density; screening important environmental variables from the environmental variable set by using a forward iterative variable screening method; calculating Mahalanobis distance of important environmental variables of each measured soil sample in a soil database and a to-be-measured soil sample in a local region; obtaining a plurality of measured soil samples with the nearest neighborhood of the to-be-measured soil sample based on the Mahalanobis distance; constructing a model sample set based on the plurality of measured soil samples; training a random forest model by using a training set of the model sample set to obtain a local random forest model; and inputting the important environmental variables of the to-be-measured soil sample into the local random forest model to obtain predicted soil bulk density for the local region. The method can accurately obtain to-be-measured soil bulk density in different regions. The application further discloses a soil bulk density missing data imputation device based on forward iterative variable screening.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of soil physicochemical analysis technology, specifically relating to a method and apparatus for interpolating missing soil bulk density data based on positive iterative variable screening. Background Technology

[0002] In the field of soil science, soil bulk density is an important physical indicator for measuring soil health, structure, and water-holding capacity. Accurate acquisition of soil bulk density data is crucial for agricultural management, environmental assessment, and land planning.

[0003] However, in practical applications, due to sampling difficulties, high costs, and the complexity of environmental conditions, soil bulk density data are often missing or insufficient. This greatly limits the accuracy of soil bulk density applications and research in related fields. To address the problem of missing soil bulk density data, traditional data interpolation methods, while able to fill data gaps to some extent, often suffer from low accuracy and poor generalization ability. Therefore, developing an efficient and accurate soil bulk density data interpolation method has become a current research hotspot.

[0004] In recent years, with the continuous development of machine learning technology, its application in the field of soil bulk density prediction has gradually attracted attention. The soil transfer function, as a machine learning-based prediction model, utilizes existing and easily measurable soil information to estimate soil bulk density, exhibiting high prediction accuracy and practicality.

[0005] Patent application CN117216643A discloses a method for interpolating missing soil bulk density values ​​through regional modeling, comprising the following steps: S1, constructing a watershed-specific soil bulk density prediction model using an RBF neural network model; selecting a radial basis function neural network (RBFNN) model to construct the soil bulk density prediction model; S2, analyzing the influencing factors of the soil bulk density prediction model parameters, using correlation and regression analysis methods to analyze the relationship between soil bulk density and geological strata, soil type, cultivated land use type, texture type, soil pH, organic matter, topographic factors, and climatic factors, and using an RF model to reveal the relative importance of different influencing factors on soil bulk density, thereby determining the influencing factors required to establish the model; S3, constructing and calculating the soil bulk density prediction model; This invention, based on the regional modeling method, solves the nonlinear relationship between soil bulk density and various influencing factors and the spatial nonstationarity of this relationship, effectively improving the accuracy of filling missing soil bulk density values.

[0006] The invention patent application with publication number CN113221430A discloses a method for predicting soil phosphorus content based on an improved PSO-LSTM algorithm, including the following steps: (1) The collected environmental parameters, including temperature, humidity, light intensity, soil moisture, soil temperature, conductivity, and pH value, are used as input; (2) Initialize parameters to establish a model. This includes the number of iterations, initial position and velocity, spatial dimension, and population size of the PSO algorithm. The hidden layers, number of neurons, learning rate, and number of iterations of the LSTM algorithm are also included; (3) Adjust the particles as needed. The structure of the particles is (h, a), where h represents the number of hidden neurons and a represents the learning rate. Establish the LSTM model based on the initialization. Use the mean absolute error as the fitness value. (4) Determine the initial position of the particles and obtain the initial fitness value, thereby finding the positions of the PBest and GBest of the particles. Iterate and update the PBest and GBest of the particles, calculate the new fitness value, and update the PBest and GBest of the particles. (5) If the fitness value tends to stabilize or the iteration reaches the maximum value, obtain the optimal learning rate and number of iterations. Otherwise, return to step 3; (6) Establish a model based on the optimal parameters, process the prediction dataset, improve the prediction accuracy of soil phosphorus content, and ensure the normal growth of crops.

[0007] However, the soil transfer function method provided by the aforementioned patent has the problem that the global model is difficult to adapt to the environmental differences in different regions. Summary of the Invention

[0008] This invention provides a method for imputing missing soil bulk density data based on positive iterative variable screening, which can accurately obtain the soil bulk density of different regions.

[0009] This invention provides a method for imputing missing soil bulk density data based on forward iterative variable screening, comprising:

[0010] Obtain the soil bulk density of the measured soil samples and the set of environmental variables related to the soil bulk density;

[0011] An iterative forward variable selection method is used to identify important environmental variables from the set of environmental variables. Based on these important environmental variables, a local follow-forest model is obtained through a memory learning strategy, including:

[0012] The Mahalanobis distance between the important environmental variables of the soil sample to be tested and each measured soil sample in the soil database in the local area is calculated. Based on the Mahalanobis distance, multiple measured soil samples that are nearest neighbors to the soil sample to be tested are obtained. A model sample set is constructed based on the multiple measured soil samples. A local random forest model is obtained by training a random forest model through the training set of the model sample set.

[0013] The key environmental variables of the soil sample to be tested are input into a local random forest model to obtain the predicted soil bulk density for the local area.

[0014] Preferably, the method for determining the model sample set includes:

[0015] Multiple sets of measured soil samples are selected within the Mahalanobis distance range of the key environmental variables. A corresponding random forest model is obtained by fitting each set of measured soil samples. The measured soil sample set corresponding to the random forest model with the highest accuracy is used as the model sample set.

[0016] Preferably, the model sample set also includes a validation set, which is used to validate the trained random forest model. If the prediction results do not meet the set criteria, the distance range of important environmental variables is reset, and the measured soil sample set is reselected as the model sample set within the reset distance range of important environmental variables.

[0017] Preferably, the important environmental variables are obtained by screening the environmental variable set using a forward iterative variable screening method, including:

[0018] S1. Remove different environmental variables sequentially from the set of environmental variables to obtain multiple sets of first environmental variable subsets. Take the absolute value of the difference between the accuracy of the random forest fitted to each set of first environmental variable subsets and the accuracy of the random forest fitted to the set of environmental variables as the importance of the corresponding removed environmental variable. Mark the removed environmental variable with the highest importance as the selected environmental variable.

[0019] S2. An initial random forest model is obtained by fitting the selected environmental variables, and the accuracy of the initial random forest model is obtained by the ten-fold cross-validation method.

[0020] S3. Combine the selected environmental variables with each environmental variable in the set of environmental variables other than the selected environmental variables to obtain multiple sets of second environmental variable subsets, and compare the accuracy of the random forest model fitted to each set of second environmental variable subsets.

[0021] S4. Mark the second subset of environmental variables corresponding to the random forest model with the highest accuracy in the accuracy comparison in step S3 as the selected environmental variables;

[0022] S5. Iterate through steps S3-S4 until all environmental variables in the environmental variable set are marked as selected environmental variables, then stop iterating and obtain the random forest model with the highest accuracy in each iteration.

[0023] S6. Compare the accuracy of the initial random forest model with the accuracy of the highest-accuracy random forest model in each iteration, and take the environmental variable corresponding to the random forest model with the highest accuracy in the comparison results as the important environmental variable.

[0024] Preferably, the accuracy evaluation index of the random forest model is the coefficient of determination R. 2Or the root mean square error (RMSE), the coefficient of determination R 2 for:

[0025]

[0026] The root mean square error (RMSE) is:

[0027]

[0028] Where n is the number of samples, y i Let represent the soil bulk density content of the i-th sample data. For the i-th sample, the predicted soil bulk density is generated by the random forest model. Each sample data corresponds to a set of environmental variables.

[0029] Preferably, obtaining the soil bulk density of the measured soil sample includes:

[0030] The bulk density of soil samples is measured by the ring cutter method. The ring cutter is pressed vertically into the soil until the ring cutter tube is full of soil sample. The measured soil bulk density = measured soil mass / ring cutter volume.

[0031] Preferably, the set of environmental variables related to the soil bulk density includes climate variables and topographic variables;

[0032] The climate variables include average precipitation, average annual temperature, drought index, and potential evaporation.

[0033] The terrain variables include elevation.

[0034] On the other hand, the present invention also provides a soil bulk density missing data interpolation device based on forward iterative variable screening, comprising: a computer memory, a computer processor, and a computer program stored in the computer memory and executable on the computer processor. The computer memory further stores a parameter-optimized local random forest model, which is constructed using the aforementioned soil bulk density missing data interpolation method based on forward iterative variable screening. When the computer processor executes the computer program, it performs the following steps:

[0035] The key environmental variables of the soil sample to be tested are input into a local random forest model to obtain the predicted soil bulk density for the local area.

[0036] Compared with the prior art, the beneficial effects of the present invention are as follows:

[0037] This invention first uses positive iterative variables to screen out important environmental variables that are strongly correlated with soil bulk density. Then, it uses Mahalanobis distance to obtain the nearest neighbor of the tested soil sample in the local area through the important environmental variables. Based on the nearest neighbor of the tested soil sample, a sample set is constructed. Since the constructed sample set is closer to the important environmental variables of the tested soil sample, and the important environmental variables are strongly correlated with the soil volume to be obtained, the environmental differences of different regions can be fully considered during the training process, and thus a random forest model that can accurately predict the soil volume of different regions can be trained. Attached Figure Description

[0038] Figure 1 A flowchart of a method for imputing missing soil bulk density data based on positive iterative variable screening, provided for a specific embodiment of the present invention;

[0039] Figure 2 A scatter plot of measured and predicted values ​​of soil bulk density content in a verification set provided for a specific embodiment of the present invention. Detailed Implementation

[0040] The present invention will be further described and illustrated below with reference to the accompanying drawings and specific embodiments.

[0041] This invention uses a forward iterative variable screening method to screen out important environmental variables that are strongly correlated with soil capacity from environmental variables, and selects multiple measured soil samples from a soil sample library that are the nearest neighbors of the important environmental variables of the test samples in a local area to construct a model sample set. The local random forest model trained by the model sample set can accurately obtain the soil capacity of a local area, thereby solving the problem of not being able to accurately obtain the soil content of different areas in the whole space.

[0042] Specific embodiments of the present invention provide a method for imputing missing soil bulk density data based on forward iterative variable screening, such as... Figure 1 As shown, it includes:

[0043] (1) Obtain the soil bulk density of the measured soil samples and the set of environmental variables related to the soil bulk density, as detailed below:

[0044] This invention specifically involves collecting topsoil samples from the 0-20cm layer. The spatial location of soil sampling points is generally determined through random stratified sampling that considers both land cover and topography. At each sampling point, five sub-samples are typically collected using a diagonal method to form the final soil sample, and the latitude and longitude of the sampling point's center are recorded. The bulk density of the soil samples is measured using the ring cutter method (the ring cutter is vertically pressed into the soil until the ring tube is full of soil sample. The ring cutter is then removed, excess soil is removed from both ends, and the outside of the ring cutter is wiped clean. The sample is then taken back to the laboratory for measurement; the soil bulk density can be calculated using the formula: Soil Bulk Density = Soil Sample Mass / Ring Cutter Volume), thus forming a soil dataset.

[0045] In a specific embodiment of the present invention, climate and topographic variables derived from satellite remote sensing images are collected based on the latitude and longitude of soil samples. The climate variables include average annual precipitation, average annual temperature, drought index and potential evaporation, and the topographic variables include elevation.

[0046] In the specific embodiments of this invention, the annual average precipitation and annual average temperature in the climate variables are derived from the WorldClimVersion 2 global 1km climate data product (http: / / www.worldclim.com / version2), and the drought index potential evaporation is derived from the Global-AI-PET_v3 data (https: / / figshare.com / articles / dataset / Global_Aridity_Index_and_Potential_Evapotranspiration_ET0_Climate_Database_v2 / 7504448 / 5), with a spatial resolution of 1 km. The elevation data in the topographic variables are derived from the SRTM 1000m digital elevation data (https: / / catalog.data.gov / dataset / srtm30-global-1-km-digital-elevation-model-de m-version-11-land-surface#sec-dates).

[0047] (2) In specific embodiments of the present invention, a forward iterative variable screening method is used to screen out important environmental variables that are strongly correlated with soil capacity from the set of environmental variables, including

[0048] (21) Different environmental variables are removed sequentially from the environmental variable set to obtain multiple sets of first environmental variable subsets. The absolute value of the difference between the accuracy of the random forest fitted to each set of first environmental variable subsets and the accuracy of the random forest fitted to the environmental variable set is taken as the importance of the removed environmental variable corresponding to the set of first environmental variable subsets. The removed environmental variable with the highest importance is marked as the selected environmental variable.

[0049] (22) The initial random forest model is obtained by fitting the selected environmental variables, and the accuracy of the initial random forest model is obtained by the ten-fold cross method;

[0050] (23) Combine the selected environmental variables with each environmental variable in the set of environmental variables other than the selected environmental variables to obtain multiple sets of second environmental variable subsets, and compare the accuracy of the random forest model fitted to each set of second environmental variable subsets.

[0051] (24) Mark the second subset of environmental variables corresponding to the random forest model with the highest accuracy in the accuracy comparison in step (23) as the selected environmental variables;

[0052] (25) Iterate through steps (23)-(24) until all environmental variables in the environmental variable set are marked as selected environmental variables, then stop iterating and obtain the random forest model with the highest accuracy in each iteration;

[0053] (26) Compare the accuracy of the initial random forest model with the accuracy of the highest-accuracy random forest model in each iteration, and take the environmental variable corresponding to the random forest model with the highest accuracy in the comparison results as the important environmental variable.

[0054] (3) Based on important environmental variables, a local random forest model is obtained through a memory learning strategy, including: constructing the nearest neighbor of the soil sample to be tested based on the important environmental variables obtained in step (2), and using the measured soil sample as the model sample set to train the random forest model to obtain the local random forest model.

[0055] (4) Input the important environmental variables of the soil sample to be tested into the local random forest model to obtain the predicted soil bulk density for the local area.

[0056] In a specific embodiment of the present invention, the Mahalanobis distance between the important environmental variables of the soil sample to be tested in a local area and each measured soil sample in the soil database is calculated. Based on the Mahalanobis distance, multiple measured soil samples that are nearest neighbors to the soil sample to be tested are selected. These multiple measured soil samples are used as a model sample set. Since the important environmental variables of the measured soil samples in this model sample set are similar to those of the soil sample to be tested, the local random forest model trained through this model sample set can accurately derive the mapping relationship between the important environmental variables of the soil sample to be tested and the soil capacity, thereby accurately obtaining the soil capacity of the soil sample to be tested.

[0057] In one specific embodiment, the method for determining a model sample set provided by this invention includes:

[0058] Multiple sets of measured soil samples are selected within the Mahalanobis distance range of key environmental variables. A corresponding random forest model is obtained by fitting each set of measured soil samples. The measured soil sample set corresponding to the random forest model with the highest accuracy is used as the model sample set. This method can obtain a suitable accuracy for the random forest model and avoid adding too many measured soil samples to the model sample set, which would affect training efficiency.

[0059] Furthermore, methods for selecting the measured soil sample set within the Mahalanobis distance range of the defined important environmental variables include:

[0060] First, select the N nearest neighbor soil samples and measure the accuracy of the random forest fitted from these N samples. Then, expand the number of soil samples within the Mahalanobis distance range of key environmental variables, while simultaneously measuring the accuracy of the random forest fitted to the expanded soil sample set. Continue expanding the soil sample set until a first accuracy is achieved. If further expansion does not result in a significant improvement in accuracy (i.e., the improvement is not substantial), the soil sample set corresponding to the first accuracy is selected as the model sample set. This method selects a model sample set that can fit a random forest with higher accuracy, making it more suitable for training the model. It also avoids including too many samples in the sample set, which would increase training computation time.

[0061] The model sample set provided in the specific embodiments of the present invention also includes a validation set. The trained random forest model is validated through the validation set. If the prediction results do not meet the set standards, the distance range of important environmental variables is reset, and the measured soil sample set is reselected within the reset distance range of important environmental variables.

[0062] In one specific embodiment, the accuracy evaluation metric for the random forest model provided in this embodiment is the coefficient of determination R. 2 Or the root mean square error (RMSE), the coefficient of determination R 2 for:

[0063]

[0064] The root mean square error (RMSE) is:

[0065]

[0066] Where n is the number of samples, y i Let represent the soil bulk density content of the i-th sample data. For the i-th sample, the predicted soil bulk density is generated by the random forest model. Each sample data corresponds to a set of environmental variables.

[0067] A specific embodiment of the present invention also provides a soil bulk density missing data interpolation device based on forward iterative variable screening, comprising: a computer memory, a computer processor, and a computer program stored in the computer memory and executable on the computer processor. The computer memory further stores a parameter-optimized local random forest model, which is constructed using the aforementioned soil bulk density missing data interpolation method based on forward iterative variable screening. When the computer processor executes the computer program, it performs the following steps:

[0068] The key environmental variables of the soil sample to be tested are input into a local random forest model to obtain the predicted soil bulk density for the local area.

[0069] This invention relates to a soil bulk density missing data interpolation device based on coupled memory learning and feature selection, comprising:

[0070] The dataset module uses soil bulk density content and corresponding important environmental variables as sample data. Multiple sample datasets are used to construct a sample dataset, which is then divided into a modeling set and a validation set. Through random sampling, 80% of the data in the soil dataset is assigned to the modeling set, and the remaining 20% ​​is assigned to the validation set. These sample datasets all include soil bulk density content and important environmental variables selected using a positive iterative variable selection method.

[0071] The training module incorporates a memory learning algorithm combined with a random forest model based on local similarity to learn from the modeling dataset. By continuously optimizing model parameters, the model's imputation accuracy and stability are improved. Simultaneously, it fully utilizes local structure and similarity information within the data to achieve accurate imputation of missing soil bulk density data.

[0072] The validation module uses validation set data to evaluate the model's interpolation performance. By comparing the difference between the model's predicted soil bulk density content and the actual content, the accuracy and reliability of the model are verified. Once the prediction accuracy meets the standard, the corresponding final model is obtained.

[0073] The output module is used to input the soil sample data to be tested into the corresponding final model to obtain the predicted value of soil bulk density.

[0074] In summary, this invention presents a soil bulk density missing data interpolation device based on coupled memory learning and feature selection. By combining a forward iterative variable selection method with a random forest model based on coupled memory learning algorithm, it achieves accurate interpolation of missing soil bulk density data. This device not only improves interpolation accuracy and efficiency but also reduces the difficulty and cost of data collection, providing a more reliable and effective technical means for research and applications in related fields.

[0075] Example 1

[0076] In this embodiment, Europe was selected as the study area. Data from 5163 surface soil samples collected in 2018 were used. A forward iterative variable selection algorithm was employed to optimize other soil properties and environmental variables obtained through remote sensing. A local random forest model was constructed using memory learning, ultimately predicting the bulk density of 15389 surface soil samples in Europe. The basic steps of this method are as described in steps (1) to (6) of the aforementioned embodiment, and will not be repeated here. The specific data and implementation details are presented below:

[0077] Step (1): Before collection, remove stones, vegetation residue, etc. The bulk density of the soil sample is measured using the ring cutter method (press the ring cutter vertically into the soil until the ring cutter tube is full of soil sample. Remove the ring cutter, cut off the excess soil at both ends, and wipe the soil off the outside of the ring cutter. Take it back to the laboratory for measurement. The soil bulk density can be calculated using the formula: Soil bulk density = Soil sample mass / Ring cutter volume).

[0078] Step (2): WorldClim Version 2, a climate environmental variable, uses data from 60,000 global climate stations. Combined with elevation, distance from coastline, maximum / minimum surface temperature, and cloud cover data, thin-plate spline interpolation yields global annual average precipitation, annual average temperature, wind speed, vapor pressure, and solar radiation at 1 km resolution for the period 1970-2000. The cross-validation correlation of these products is between 0.76 and 0.99. The official download link for this data is http: / / www.worldclim.com / version2. The third version (Global-AI_PET_v3) of the Global Aridity Index and Potential Evapo-Transpiration (ET0) Database provides a high-resolution (30 arcseconds) global raster dataset for global users. The official download link for this data is https: / / figshare.com / articles / dataset / Global_Aridity_Index_and_Potential_Evapo-Transpiration_ET0_Climate_Database_v2 / 7504448 / 5. Regarding the selection of terrain variables, the SRTM database in the terrain data utilizes radar interferometry (InSAR) technology. By finely processing the data acquired by the Space Shuttle Radar Terrain Mapping Mission (SRTM), a high-precision digital elevation model with global coverage is generated. The official download link for this data is https: / / catalog.data.gov / dataset / srtm30-global-1-km-digital-elevation-model-de m-version-11-land-surface#sec-dates.

[0079] Step (3): The extraction of environmental variables at soil sampling points was implemented in R using the `extract` function of the `raster` package. Factor importance in the forward iterative variable selection algorithm was evaluated using `%IncMSE`. `%IncMSE` was calculated by adding the mean squared error (MSE) of the fitted model after removing each variable and the percentage increase in the mean squared error of the fitted model for all variables. A larger `%IncMSE` indicates a more important variable. This step was implemented in R using the `importance` function of the `randomForest` package, with the method chosen to reduce the mean error in accuracy. The 10-fold cross-validation in the forward iterative variable selection algorithm was implemented in R using the `train` function of the `caret` package.

[0080] Step (4): Constructing a Local Random Forest Model using a Memory Learning Strategy. In R, the `dist` function from the `proxy` package is used to calculate the environmental variable similarity between each test sample and samples in the database, based on the selected important environmental variables. Then, based on the similarity metric, a certain number of nearest neighbor samples are selected as a local dataset to construct a local random forest model for each unknown sample. Subsequently, the `randomForest` package is used to construct the local random forest model in R to predict the soil bulk density content of each test sample. By traversing different numbers of nearest neighbor samples and combining them with ten-fold cross-validation, the optimal number of nearest neighbor samples `k` is obtained to ensure that the model's predictive performance reaches its best.

[0081] Step (5): When constructing the random forest model, the number of trees is set to the default value of 500 to ensure the stability and generalization ability of the model. At the same time, in order to optimize the performance of the model, the number of predictive variables in the decision tree node partition is optimized to 5.

[0082] Step (6): Input the important environmental variables of the unknown sample points into the final prediction model to obtain their soil bulk density content.

[0083] In this embodiment, the data is divided into a modeling set (4130 variables) and a validation set (1033 variables), used for fitting the prediction model and objectively evaluating the model accuracy, respectively. Through forward iterative variable selection, we successfully simplified the number of environmental variables from 15 to 12, thus simplifying the model structure. Global modeling is then performed using the selected environmental variables, and the R-value of the validation set is [value missing]. 2 The concentration reached 0.58, and the RMSE was 0.19 g / cm³. -3 It exhibits higher predictive accuracy compared to the global model using all 15 environmental variables (R²). 2 This represents an improvement of 0.57. Figure 2 As shown, after further employing the filtered local modeling strategy, the R-value of the prediction model is... 2 The performance was improved to 0.59, which is the best among all test models, demonstrating the effectiveness and superiority of the method in this embodiment.

[0084] The embodiments described above are merely preferred embodiments of the present invention and are not intended to limit the invention. Those skilled in the art can make various changes and modifications without departing from the spirit and scope of the invention. Therefore, all technical solutions obtained through equivalent substitution or transformation fall within the protection scope of the present invention.

Claims

1. A method for imputing missing soil bulk density data based on positive iterative variable screening, characterized in that, include: Obtain the soil bulk density of the measured soil samples and the set of environmental variables related to the soil bulk density; An iterative forward variable selection method is used to identify important environmental variables from the set of environmental variables. Based on these important environmental variables, a local follow-forest model is obtained through a memory learning strategy, including: The Mahalanobis distance between the important environmental variables of the soil sample to be tested and each measured soil sample in the soil database in the local area is calculated. Based on the Mahalanobis distance, multiple measured soil samples that are nearest neighbors to the soil sample to be tested are obtained. A model sample set is constructed based on the multiple measured soil samples. A local random forest model is obtained by training a random forest model through the training set of the model sample set. Key environmental variables of the soil sample to be tested are input into a local random forest model to obtain the predicted soil bulk density for a local area. Methods for determining the model sample set include: Within the Mahalanobis distance range of the set important environmental variables, multiple sets of measured soil samples are selected. The corresponding random forest model is obtained by fitting each set of measured soil samples. The measured soil sample set corresponding to the random forest model with the highest accuracy is used as the model sample set. The model sample set also includes a validation set, which is used to validate the trained random forest model. If the prediction results do not meet the set criteria, the distance range of important environmental variables is reset, and the measured soil sample set is reselected as the model sample set within the reset distance range of important environmental variables. The environmental variable set was filtered using a forward iterative variable screening method to obtain important environmental variables, including: S1. Remove different environmental variables sequentially from the set of environmental variables to obtain multiple sets of first environmental variable subsets. Take the absolute value of the difference between the accuracy of the random forest fitted to each set of first environmental variable subsets and the accuracy of the random forest fitted to the set of environmental variables as the importance of the corresponding removed environmental variable. Mark the removed environmental variable with the highest importance as the selected environmental variable. S2. An initial random forest model is obtained by fitting the selected environmental variables, and the accuracy of the initial random forest model is obtained by the ten-fold cross-validation method. S3. Combine the selected environmental variables with each environmental variable in the set of environmental variables other than the selected environmental variables to obtain multiple sets of second environmental variable subsets, and compare the accuracy of the random forest model fitted to each set of second environmental variable subsets. S4. Mark the second subset of environmental variables corresponding to the random forest model with the highest accuracy in the accuracy comparison in step S3 as the selected environmental variables; S5. Iterate through steps S3-S4 until all environmental variables in the environmental variable set are marked as selected environmental variables, then stop iterating and obtain the random forest model with the highest accuracy in each iteration. S6. Compare the accuracy of the initial random forest model with the accuracy of the highest-accuracy random forest model in each iteration, and take the environmental variable corresponding to the random forest model with the highest accuracy in the comparison results as the important environmental variable.

2. The method for imputing missing soil bulk density data based on forward iterative variable screening according to claim 1, characterized in that, The accuracy of the random forest model is evaluated using the coefficient of determination R. 2 Or the root mean square error (RMSE), the coefficient of determination R 2 for: The root mean square error (RMSE) is: in, n For the number of samples, For the first i Soil bulk density content of each sample data For the first i The predicted soil bulk density content of each sample is generated by a random forest model, with each sample data corresponding to a set of environmental variables.

3. The method for imputing missing soil bulk density data based on forward iterative variable screening according to claim 1, characterized in that, Obtain the soil bulk density of the tested soil sample, including: The bulk density of soil samples is measured by the ring cutter method. The ring cutter is pressed vertically into the soil until the ring cutter tube is full of soil sample. The measured soil bulk density = measured soil mass / ring cutter volume.

4. The method for imputing missing soil bulk density data based on forward iterative variable screening according to claim 1, characterized in that, The set of environmental variables related to the soil bulk density includes climate variables and topographic variables; The climate variables include average precipitation, average annual temperature, drought index, and potential evaporation. The terrain variables include elevation.

5. A device for soil bulk density missing data imputation based on forward iterative variable screening, characterized in that, include: A computer memory, a computer processor, and a computer program stored in the computer memory and executable on the computer processor, characterized in that the computer memory further stores a parameter-optimized local random forest model, the local random forest model being constructed using the soil bulk density missing data imputation method based on forward iterative variable screening as described in any one of claims 1 to 4, and the computer processor executing the computer program performing the following steps: The key environmental variables of the soil sample to be tested are input into a local random forest model to obtain the predicted soil bulk density for the local area.

Citation Information

Patent Citations

  • Soil phosphorus content prediction method based on PSO-LSTM algorithm

    CN113221430A

  • Soil bulk density missing value interpolation method through partition modeling

    CN117216643A

  • Miniature relay fitted in a case

    EP0015389A1

  • A method for predicting concrete durability based on data mining and artificial intelligence algorithm

    AU2020101854A4

  • System and method for measuring soil infiltration capability

    CN101221117A