A method for predicting solute transport capacity based on machine learning
By constructing a multi-model prediction of soil solute migration capacity using machine learning-based methods, the complexities of soil solute migration research due to multiple factors were solved, enabling precise regulation and management under different soil conditions.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- AGRO ENVIRONMENTAL PROTECTION INST OF MIN OF AGRI
- Filing Date
- 2023-12-25
- Publication Date
- 2026-04-10
AI Technical Summary
Existing technologies are insufficient to systematically discuss multi-factor data on the solute migration capacity, physicochemical properties, material composition, and elemental forms of different types of soil, leading to oversimplification in soil solute migration studies and affecting the effectiveness of management measures.
Using machine learning-based methods, we constructed Adaboost, GBR, XGB, knn, support vector machine, neural network, and random forest models through soil feature extraction, parameterization, and model fitting. We then used five-fold cross-validation and the coefficient of determination r² to select feature vectors and predict the solute migration capacity of soil.
It enables precise regulation of soil solute migration under different soil conditions, solves the multi-factor complexity of soil solute migration research, and improves prediction accuracy and management efficiency.
Smart Images

Figure CN118225633B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The application belongs to the technical field of soil nutrients in environmental science and soil science, and particularly relates to a solute transport capacity prediction method based on machine learning. BACKGROUND
[0002] Solute in soil refers to chemical substances or pollutants existing in dissolved state in soil. They are divided into inorganic substances such as mineral dissolved ions in nature, and organic substances and chemical substances introduced by human activities, such as pesticides, heavy metals, organic pollutants, etc. The migration of soil solute refers to the movement process of these solutes in the soil interior and the soil-water interface. It is affected by various factors, including soil properties, chemical reactions, etc.
[0003] Excessive migration of soil solute can lead to groundwater pollution, ecological system destruction, soil quality decline and other problems, which harm the ecological system and human health. In order to effectively respond to these problems, it is necessary to clarify the migration potential of soil solute and the main driving factors. The soil column experiment can determine the solute transport capacity, but it is time-consuming and inefficient, and the cost of instruments and equipment used is high, and the related researches are mostly concentrated on single factor or their simple set. This kind of research on oversimplified model ignores the complex interaction of multiple factors, which may lead to blind implementation of management measures.
[0004] There is no systematic discussion on the solute transport capacity of different types of soil and the multi-factor data of soil physical and chemical properties, material composition and element form, so new technology is needed to at least solve the above limitations in the field of soil nutrients. SUMMARY
[0005] The purpose of the present application is to overcome the shortcomings of the prior art and provide a solute transport capacity prediction method based on machine learning, which can evaluate the solute transport capacity of different soils.
[0006] The technical problem of the present application is solved by the following technical solution:
[0007] A solute transport capacity prediction method based on machine learning, comprising the following steps:
[0008] Step 1, according to the change of latitude and longitude, select farmland soil in different regions as sample soil, at the same time, obtain the soil physical and chemical properties, material composition and element content data of the sample soil, extract and parameterize the soil characteristics to form a vector set A1;
[0009] Step 2, obtain the solute transport capacity evaluation index R in the sample soil through the migration experiment device and the convection-dispersion model and STANMOD software fitting, and parameterize the evaluation index R;
[0010] Step 3, generate a soil sample set from the parameterized evaluation index R in step 2 and the step 1 vector collection A1, randomly select n samples from the soil sample set as a validation set, and the remaining N-n samples as a training set;
[0011] Step 4, use five-fold cross-validation to build Adaboost, GBR, XGB, knn, support vector machine, neural network and random forest model for the training set in step 3, and establish a 2-dimensional space MSE-MAE coordinate system with MSE as the horizontal coordinate and MAE as the vertical coordinate to evaluate the error of the above seven models and perform fitting learning calculation;
[0012] Step 5, use the determination coefficient r 2 and the MSE-MAE coordinate system to select the three models with the smallest error value, and select the top 9 feature vectors with high correlation to the solute migration ability in soil according to the three models;
[0013] Step 6, generate a feature sample collection from the top 9 feature vectors and the soil solute migration ability characteristic label vector R in step 2, and retrain the selected three models to obtain the solute migration ability in soil.
[0014] Moreover, the soil characteristics in step 1 include soil pH, TOC, CEC, soil organic matter composition, soil calcium carbonate content, soil element content, different form iron content, and soil clay mineral and non-clay mineral content.
[0015] Moreover, the seven models constructed in step 4 are constructed using decision trees as basic learners.
[0016] Moreover, the specific implementation method for error evaluation fitting learning calculation of the above seven models in step 4 is to judge according to Euclidean distance:
[0017]
[0018] Where (x ij , y ij ) is the point constructed in the 2-dimensional space of the seven models, d(x, y) is the distance from each point to the origin, and the smaller the value, the better the error evaluation of the objective function MSE-MAE. Continue five-fold cross-validation until the error evaluation of MSE-MAE is the minimum accuracy, and then train to obtain the best state of each model, and save the corresponding optimal model parameters.
[0019] Moreover, the specific implementation method of step 5 is to use the determination coefficient r 2 Randomly select 50% of the data in the soil sample collection in step 3 from the seven trained models in step 4 to test and evaluate, and comprehensively use the MSE-MAE coordinate system and the determination coefficient r 2The three models in the top three are obtained, and the errors of the predicted soil solute migration capacity R values after deleting different soil characteristic vectors in step 1 are compared with the true values by calling the three models respectively, and the correlation degree between different characteristic vectors and the soil solute migration capacity is judged according to the error size, and the top 9 characteristic vectors with high correlation degree with the soil solute migration capacity are obtained according to the rule that the smaller the error is, the greater the correlation degree is.
[0020] Moreover, the specific implementation method of the step 6 is that a feature sample set is generated according to the top 9 characteristic vector sets obtained in step 5 and the soil solute migration capacity characteristic label vector R obtained in step 2, the three models obtained in step 5 are re-optimized and trained through the feature sample set, and the migration capacity of solute in different soil conditions is predicted by using the three models after optimization and training.
[0021] Moreover, the migration capacity is the top 9 characteristic vectors obtained in step 5 as the training data of the three models respectively, and the migration capacity of the soil solute under the algorithm is obtained by running the corresponding model.
[0022] The advantages and positive effects of the present application are:
[0023] The present application obtains the soil solute migration capacity through the advection-diffusion model analysis, establishes the correlation between the migration capacity of solute in different soil conditions based on the soil characteristics and the solute migration capacity, generates sample data based on the soil characteristics and the soil solute migration capacity, and then drives the model according to the sample data set to realize the prediction of the soil solute migration capacity through the high correlation soil characteristics. The present application can apply the digital driving model to the solute migration prediction in the area where the solute migration experimental data is lacking or the soil type is lacking, so as to accurately control the soil solute migration and enrichment. BRIEF DESCRIPTION OF DRAWINGS
[0024] Figure 1 It is a solute migration experimental device diagram;
[0025] Figure 2 It is an invention machine learning process diagram;
[0026] Figure 3 It is an ammonia nitrogen penetration curve in different soils;
[0027] Figure 4 It is an invention parameter optimized AdaBoost model training set and test set data fitting diagram;
[0028] Figure 5 It is an invention parameter optimized GBR model training set and test set data fitting diagram;
[0029] Figure 6 It is an invention parameter optimized Knn model training set and test set data fitting diagram;
[0030] Figure 7 Fitting plot of training set and test set data for the MLP model after invention parameter optimization;
[0031] Figure 8 Fitting plot of training set and test set data for the RF model after invention parameter optimization;
[0032] Figure 9 Fitting plot of training set and test set data for the XGBoost model after invention parameter optimization;
[0033] Figure 10 Fitting plot of training set and test set data for the support vector machine model after invention parameter optimization;
[0034] Figure 11 Comparison chart of the MSE-MAE and the determination coefficient r 2 of each model in the invention. DETAILED DESCRIPTION
[0035] The invention will be further described in detail below with reference to the accompanying drawings.
[0036] A solute migration ability prediction method based on machine learning, as shown in Figure 2 , comprises the following steps:
[0037] Step 1: According to the change of latitude and longitude, select farmland soil in different regions as sample soil, and obtain soil physical and chemical properties, material composition and element content data of the sample soil, extract and parameterize soil characteristics to form vector collection A1.
[0038] The soil characteristic data includes soil pH value, TOC, CEC, soil organic matter composition, soil calcium carbonate content, soil element content (Al, Mg, Mn, Ca, P, S, Zn, As), different forms of iron content (carbonate-bound iron, reducible iron, magnetite iron, silicate iron, residual iron) and soil clay mineral and non-clay mineral content (quartz, potassium feldspar, plagioclase, calcite, ankerite, hematite, anhydrite, siderite, halite, illite, kaolinite, chlorite, illite-smectite interlayer), which constitutes the characteristic vector of each sample.
[0039] Step 2: Through Figure 1The column experimental device shown simulates the process of solute migration in soil pore medium under the driving of hydraulic action, measures the concentration change of solute in water body, obtains a breakthrough curve, then calculates by using STANMOD software based on the theory of convection-dispersion model (CDE), and finally obtains the retention coefficient R. In actual experiments, when the R value is close to 1, it indicates that the solute has the same migration speed as the water flow, and the larger the R value is, the weaker the solute migration ability is, so the patent uses R as the evaluation index of soil solute migration ability, and parameterizes the evaluation index R.
[0040] The convection-dispersion model (CDE) is a one-dimensional equation, which is as follows when the flow is stable and the adsorption is linear:
[0041]
[0042] Wherein, C (g·cm -3 ) is the concentration of solute in the liquid phase, z (cm) is the spatial coordinate, t (min) is the time, v
[0043] (cm·min -1 ) is the Darcy flow, θ (cm 3 ·cm -3 ) is the volume water content, R is the retention coefficient, which is expressed by the following formula:
[0044]
[0045] Wherein, ρ (g·m -3 ) is the column density, K d (mL·g -1 ) is the linear adsorption coefficient.
[0046] In the CDE model, a two-site chemical nonequilibrium method is used to estimate the migration of solute, which considers the non-equilibrium state caused by adsorption. This method assumes that there are two types of adsorption sites: 1 solute Assume that it is a transient equilibrium adsorption site and is described by the equilibrium adsorption isotherm, 2 solute Assume that it is a first-order kinetic adsorption site and corresponds to the rate-controlling step of chemical or diffusion adsorption. In this model, the migration parameter β is related to the fraction of transient solute retention, and ω describes the ratio of hydraulic residence time to adsorption characteristic time scale, β and ω are as follows:
[0047]
[0048]
[0049] Wherein, f is the fraction of equilibrium adsorption sites, L represents the column length (cm), α (min -1 ) is the first-order rate on the non-equilibrium site.
[0050] Step 3, generate a soil sample set from the vector set A1 in step 1 and the parameterized evaluation index R in step 2, randomly select n samples from the soil sample set as a validation set, and the remaining N-n samples as a training set.
[0051] Step 4, use five-fold cross-validation to construct Adaboost, GBR, knn, XGB, MLP, random forest model, and support vector machine from the training set in step 3, and establish a 2-dimensional space MSE-MAE coordinate system with MSE as the abscissa and MAE as the ordinate to evaluate the error of the above seven models.
[0052] Adaboost, GBR, XGB, and random forest model are constructed by decision tree, and support vector machine is constructed by binary decision tree as basic learner.
[0053] The decision tree construction includes the following steps:
[0054] (I) Feature selection: Let the data set D = [m x l], m data, l dimensions (l features), and define the information of probability p as:
[0055] Let P(X = x i ) = p i , i = 1...n, then the information entropy of random variable X is:
[0056]
[0057] Let the random variable P(X = x i , Y = y i ) = p ij ;
[0058] The conditional probability entropy of Y given X is:
[0059] H(Y|X) = -∑ x,y P(x)P(y|x)logP(y|x) (2)
[0060] Define the information gain Gain(D, A) of feature A on training data set D as:
[0061] g(D, A) = H(D) - H(D|A)
[0062] Determine the difference between the entropies of D before and after feature A, the larger g(D, A) is, the more A should be selected as the division set. However, g(D, A) tends to select features with more values, so use the ratio of information gain g(D, A) to the entropy H A (D) of the value of feature A to select features, called gain ratio GainRatio, denoted as gR (D, A) as follows:
[0063]
[0064] For g R (D, A) respectively look at each of them. Let A have n different values, where D i is the sample set corresponding to the i-th value of feature A, |D| is the number of samples, |D i | is the number of samples with feature A taking value i,
[0065]
[0066] Let there be K class labels, and the number of each class is denoted by |C k |, Then the information entropy is obtained:
[0067]
[0068] Let |D ik | is the number of samples belonging to class k in the set with feature A taking value i, then the conditional probability entropy is obtained:
[0069]
[0070] (2) Decision tree generation:
[0071] Input: training data set D, feature set A, information gain threshold ε.
[0072] Output: decision tree T.
[0073] (1) If D has only one class C k or The class with the largest number of instances is marked as the node, and the return is made;
[0074] (2) Otherwise, select If A g <ε, return the label corresponding to the current subset;
[0075] (3) Otherwise, use A g to divide the data set into several parts, and on each corresponding subset, continue to call formula (2) and formula (3) to continuously extend (cut the set) until the information gain reaches the threshold.
[0076] The decision tree selects the current best (i.e., the feature with the largest information gain or information gain rate) dimension to build a subtree each time, which is a greedy algorithm and a local optimum.
[0077] (3) Pruning of decision tree:
[0078] Let the number of nodes of tree T be |T|, t is a certain node, the leaf node has N t samples, the kth class has N tk samples, and H t (T) is the empirical entropy of the leaf node, then the loss function is defined as:
[0079]
[0080] That is, the number of samples of each node x the confusion degree of the node + tree complexity. Then each time, compare the old and new leaf nodes of each leaf node before and after pruning C α (T) to choose whether to prune.
[0081] According to the above decision tree, combined with ensemble learning, reinforcement learning and gradient optimization techniques, Adaboost, GBR, XGB, knn, support vector machine, neural network, random forest model are constructed, wherein:
[0082] Random forest is an ensemble learning method based on decision trees. It trains multiple decision trees at the same time, each tree randomly samples the data with replacement, and makes the final prediction by voting or averaging. Let the total number of features be K, then the decision tree refers to the randomly selected k features, where k = log2K.
[0083] Adaboost can use decision trees as weak classifiers, and improve the performance of the model by sequentially training multiple decision trees. Each decision tree is given different weights, which are adjusted according to its classification error on the previous classifier.
[0084] GBR gradually trains decision trees to reduce residuals.
[0085] XGB is an optimized and extended version of GBR, which can also use decision trees as base learners. It sequentially trains multiple decision trees through the gradient boosting algorithm and adjusts the model according to the residual gradient.
[0086] The decision boundary used in the classification problem of support vector machine can also be regarded as a binary decision tree. Support vector machine maps data to high-dimensional feature space and finds a maximum interval hyperplane to classify. Neural network does not directly use decision tree. It is a deep model composed of multiple neuron layers, which learns multiple layers of nonlinear transformations to extract features and perform pattern recognition tasks, which is different from the structure and method of decision tree.
[0087] Among them, the XGBoost machine learning algorithm is constructed as follows:
[0088]
[0089] Among them, the sum of the predictions of the first t-1 trees plus the prediction of the tth tree f t (x i ), i.e. Ω(f t ) is the regularizer, which generally penalizes the model complexity. constant is the constant term. For the above objective function, when optimizing the tth tree, the predictions of the first t-1 trees can also be regarded as constants, thus can be added to the constant when expanding the calculation of L.
[0090] When L adopts the square loss function, the part of the independent variable f t (x i ) will be regarded as part of the constant constant, and the Obj is as follows:
[0091]
[0092] And for other forms of loss function, Taylor expansion can be used, and the second-order Taylor expansion is as follows:
[0093]
[0094] Therefore, after being brought into Obj, there are and Δx = f t (x i ), thus Obj (t) is as follows:
[0095]
[0096]
[0097] And for the regularizer, the general form is as follows
[0098]
[0099] where T is the number of leaves of the tree, w j is the label of the jth node of the tree. That is, Ω(f t ) hopes that the number of leaves T of the tree will not be too much, and the output w j of each leaf will not be too extreme to cause overfitting.
[0100] Combined with the regularizer expression method, define q(x i ) = j and I j = {i | q(x i ) = j}, at this time, Obj (t) can be further expanded as:
[0101]
[0102]
[0103]
[0104] Observe the formula above, Represents the contribution of the jth leaf to the tree, so when choosing whether to split the leaf node, the following Gain formula is calculated (take binary split as an example):
[0105]
[0106] If the Gain formula is less than 0, then splitting makes the loss function decrease. When selecting dimensions, all dimensions need to be traversed to select the best split dimension.
[0107] Knn (k-Nearest Neighbor algorithm) does not directly use decision trees. It is based on the distance between samples to classify, but can use decision trees as a data structure to speed up the search process of k-Nearest Neighbor.
[0108] MLP also does not directly use decision trees. It is a deep model composed of multiple neuron layers, which extracts features and performs pattern recognition tasks by learning multi-layer nonlinear transformations. The training process of the model is as follows:
[0109] (I) Initialize the weight: randomly initialize the weight matrix W.
[0110] (II) Forward propagation: input data X is subjected to multiple layers of nonlinear transformation to obtain output value y^.
[0111] (1) Weighted summation:
[0112]
[0113] Where h j represents the weighted sum of all inputs of the current node, and M represents the dimension of the input data. In the forward propagation process, each neuron will accept input from all neurons in the previous layer, and M represents the number of neurons in the previous layer.
[0114] (2) Neuron output value:
[0115]
[0116] Where g() represents the activation function, w is the weight, and x is the input.
[0117] (3) Output layer output value:
[0118]
[0119] where y represents the value of the output layer, that is, the final result, and k represents the index of the output layer neuron, used to distinguish different output neurons.
[0120] (iii) Loss function:
[0121] A simple error sum of squares is used:
[0122]
[0123] where t represents the target value, that is, the true value, and N represents the number of samples.
[0124] (iv) Error backpropagation: Gradient descent is used to find the optimal solution, that is, to find the partial derivative of the loss function E with respect to the weight w:
[0125]
[0126] Output layer increment term:
[0127]
[0128] Hidden layer increment term:
[0129]
[0130] Update hidden layer weights:
[0131]
[0132] (v) Repeat steps (ii) to (iv) until the stopping condition is met (e.g., the maximum number of iterations is reached or the loss function converges).
[0133] The seven machine learning models constructed by the above steps use the five-fold cross-validation method to obtain the best parameters through the target function MSE-MAE evaluation, and save the optimal model parameters of each model.
[0134] where MSE (Mean Squared Error), MAE (Mean Absolute Error) and r 2 (determination coefficient) are calculated as follows:
[0135]
[0136] where n is the number of samples, y i is the i-th observation, is the i-th predicted value.
[0137]
[0138] where n is the number of samples, y i is the i-th observation, is the i-th predicted value.
[0139]
[0140] where n is the number of samples, y i is the i-th observation, is the i-th prediction, is the mean of the observations.
[0141] Error evaluation fitting learning calculation is evaluated according to the Euclidean distance formula for 7 kinds of models:
[0142]
[0143] (x ij , y ij ) is the point constructed in 2-dimensional space for 7 kinds of models, d(x, y) is the distance from the origin to each point, the smaller the value, the better the error evaluation of the objective function MSE-MAE, and the five-fold cross-validation is continuously carried out until the error evaluation of MSE-MAE is the minimum accuracy, and then the best state of each model is trained, and the corresponding optimal model parameters are saved.
[0144] Step 5, using the determination coefficient r 2 Randomly extract 50% of the data in the soil sample set in step 3 from the 7 kinds of trained models in step 4 for testing and evaluation, according to the MSE-MAE coordinate system and the determination coefficient r 2 Subjectively select three models with d(x, y) values lower than the remaining models and r 2 higher than other models, respectively call three models to compare the error of the predicted soil solute migration ability R value after deleting different soil feature vectors in step 1 with the true value, and judge the correlation degree between different feature vectors and soil solute migration ability according to the size of the error, and sort according to the rule that the smaller the error, the greater the correlation degree, and obtain the top 9 feature vectors with high correlation degree with soil solute migration ability.
[0145] Step 6, generate a feature sample set according to the top 9 feature vector set obtained in step 5 and the soil solute migration ability characteristic label vector R obtained in step 2, retrain the three models obtained in step 5 through the feature sample set, and use the optimized models to predict the migration ability of solutes under different soil conditions.
[0146] Step 7, the three selected models, each model ranks the top 9 feature vectors that have the greatest impact on migration ability R to form data, and generates a feature sample set with the soil solute migration ability label vector R obtained in step 2, and re-trains the obtained R value. Under the same data set training, three models can predict three R values, and by averaging method, the average of the prediction results of the three models is obtained as the final prediction result R.
[0147] The calculation method is:
[0148]
[0149] Finally, the migration ability of the solute in the soil is evaluated by R, and the greater the predicted value R is, the smaller the migration ability is.
[0150] According to the above-mentioned solute migration ability prediction method based on machine learning, the advantages and effects of the present application are proved by experimental tests.
[0151] The present application selects 31 different provincial / federal city farmland soils from north to south in China as sample soils, collects the soil physical and chemical properties, material composition and element content data of each sample soil, extracts and parameterizes the soil characteristics;
[0152] S1: Collect the soil physical and chemical properties, material composition and element content data of each sample soil, including: soil pH value, TOC, CEC, soil organic matter composition, soil calcium carbonate content, soil element content (Al, Mg, Mn, Ca, P, S, Zn, As), different forms of iron content (carbonate-bound iron, reducible iron, magnetite iron, silicate iron, residual iron) and soil clay mineral and non-clay mineral content (quartz, potassium feldspar, plagioclase, calcite, ankerite, hematite, anhydrite, siderite, halite, illite, kaolinite, chlorite, illite-smectite interlayer), which constitutes the characteristic vector of each sample. Extract and parameterize the soil characteristics;
[0153] S2: Based on the soil samples obtained in S1, simulate the migration process of ammonia nitrogen in soil pore medium under the driving of hydraulic action through a column experiment device, measure the concentration change of the solute in the water body, obtain the breakthrough curve as shown in Figure 3 , and then use the STANMOD software based on the convective-dispersion model (CDE) as the theoretical basis to calculate, finally obtain the retention coefficient R as shown in Table 1, obtain the solute migration ability evaluation index R in the soil and parameterize. In order to ensure the reliability of the data, machine learning is used to predict R for comparison.
[0154] Table 1 Retention coefficient of soil ammonia nitrogen migration process
[0155]
[0156]
[0157] S3: Generate a soil sample set based on the soil characteristic vector set obtained in S1 and the soil internal solute migration capacity characteristic label vector R obtained in S2. According to the soil sample number N, set a value n, and randomly extract 90% of the samples from the soil sample set as a training set and 10% as a validation set;
[0158] S4: Based on the training set in S3, use five-fold cross-validation to respectively construct Adaboost, GBR, knn, XGB, MLP, random forest model (RF), and support vector machine (SVR), calculate the target function MSE and MAE, and use MSE-MAE to evaluate the error of the above seven models for fitting learning calculation and evaluation. If the error evaluation of the target function MSE-MAE is not optimal, continue to carry out five-fold cross-validation until the error evaluation of the target function MSE-MAE is optimal precision, and then train to obtain the best state of each model, and save the corresponding optimal model parameters. The final training results of Adaboost, GBR, knn, XGB, MLP, random forest model, and support vector machine model are shown in Figs. 4, 5, 6, 7, 8, and 9, respectively. The black line in the figure represents the fitting of the model on the training set, the gray area represents the prediction error range of the model on the test set, the black points represent the training set data, and the gray points represent the test set data. Figure 3
[0159] S5: Test and evaluate 50% of the data in the soil sample set in S3 randomly extracted from the above seven trained models. According to the MSE-MAE coordinate system and the coefficient of determination r2, subjectively select three models with d(x, y) values lower than those of the remaining models and r2 higher than those of other models, as shown in Fig. 9, and finally determine XGB, MLP, and random forest model. Figure 11
[0160] Observe the change in the model r 2 to measure the importance of the features. After disturbing the feature values, the more obvious the decrease in the model r 2 , the more relevant the feature is to the prediction ability of the model. Finally, the top 9 feature vectors with high correlation to the soil internal solute migration capacity are obtained. The feature ranking of the XGB model after operation is: cation exchange capacity, oxidized magnesium, organic matter content, carbonate-bound iron, reducible iron, oxidized arsenic, oxidized manganese, iron dolomite, and potassium feldspar. The feature ranking of the RF model after operation is: cation exchange capacity, total zinc content, organic matter, total sulfur content, reducible iron, oxidized manganese, carbonate-bound iron, kaolinite, and quartz. MLP is a kind of feedforward neural network. It learns complex patterns in data through multiple layers of nonlinear transformations. Unlike decision tree models (xgboost and random forest), it does not have built-in methods to calculate feature importance.
[0161] S6: The first 9 eigenvector sets obtained according to S5 are combined with the soil solute migration capacity characteristic marker vector R obtained in S2 to generate a feature sample set, the three models obtained in S5 are retrained through the feature sample set, and the optimized models are used to predict the migration capacity of solutes in different soil conditions, including: using the first 9 eigenvectors obtained by the three models in S5 as the training data of the respective models, running the corresponding model to obtain the migration capacity of solutes in the soil under the algorithm;
[0162] S7: The three models XGB, MLP and random forest model (RF) screened out are ranked to form data of the 9 eigenvectors that have the greatest impact on the migration capacity R under the model, and the data is combined with the soil solute migration capacity marker vector R obtained in step 2 to generate a feature sample set and retrain the R value. The average method is used to average the prediction results of the three models to obtain the final prediction result R.
[0163] It should be emphasized that the embodiments described in the present application are illustrative rather than limiting, and therefore the present application includes but is not limited to the embodiments described in the specific embodiments, and any other embodiments derived by those skilled in the art according to the technical solutions of the present application also belong to the scope of protection of the present application.
Claims
1. A machine learning-based method for predicting solute transport capacity, characterized in that: Includes the following steps: Step 1: Based on the changes in latitude and longitude, select farmland soil from different regions as sample soils, and at the same time obtain data on the soil physicochemical properties, material composition and element content of the sample soils. Extract and parameterize the soil characteristics to form a vector set A1. Step 2: Obtain the evaluation index R of solute migration capacity in the sample soil by using a migration experimental device, a convection-diffusion model, and STANMOD software, and parameterize the evaluation index R. Step 3: Generate a soil sample set based on the vector set A1 from Step 1 and the parameterized evaluation index R from Step 2. Randomly select n samples from the soil sample set as the validation set and the remaining Nn samples as the training set. Step 4: Using the training set from Step 3, construct Adaboost, GBR, XGB, knn, support vector machine, neural network, and random forest models respectively using five-fold cross-validation. Establish a 2D MSE-MAE coordinate system with MSE as the x-axis and MAE as the y-axis to perform error evaluation, fitting, and learning calculations for the above 7 models. Step 5: Use the coefficient of determination r 2 The three models with the smallest error values in the MSE-MAE coordinate system were selected, and the top nine feature vectors with high correlation to the solute migration capacity in the soil were selected based on the three models. Step 6: Combine the first 9 feature vectors with the soil solute migration capacity characteristic label vector R from Step 2 to generate a feature sample set. After retraining the three selected models, the migration capacity of solutes in the soil is obtained.
2. The solute transport capacity prediction method based on machine learning according to claim 1, characterized in that: The soil characteristics in step 1 include soil pH, TOC, CEC, soil organic matter composition, soil calcium carbonate content, soil element content, content of different forms of iron, and content of soil clay minerals and non-clay minerals.
3. The solute transport capacity prediction method based on machine learning according to claim 1, characterized in that: The seven models constructed in step 4 are built using decision trees as the basic learners.
4. The solute transport capacity prediction method based on machine learning according to claim 1, characterized in that: The specific implementation method for error evaluation and fitting learning calculation of the above 7 models in step 4 is as follows: Judgment is based on Euclidean distance. ; in, Points are constructed in 2D space for the seven models. The distance from each point to the origin is the value. The smaller this value, the better the error assessment of the objective function MSE-MAE. Five-fold cross-validation is continuously carried out until the error assessment of MSE-MAE is the minimum accuracy. Then, the optimal state of each model is obtained through training, and the corresponding optimal model parameters are saved.
5. The solute transport capacity prediction method based on machine learning according to claim 1, characterized in that: The specific implementation method of step 5 is as follows: using the determination coefficient r 2 For the seven trained models in step 4, 50% of the data from the soil sample set in step 3 were randomly selected for testing and evaluation. The results were evaluated using the MSE-MAE coordinate system and the coefficient of determination r. 2 The top three performing models were obtained. The errors of the predicted soil solute migration capacity R values after deleting different soil feature vectors in step 1 were compared with the actual values. The correlation between different feature vectors and the solute migration capacity in the soil was judged according to the magnitude of the error. The models were sorted according to the rule that the smaller the error, the greater the correlation, and the top 9 feature vectors with high correlation to the solute migration capacity in the soil were obtained.
6. The solute transport capacity prediction method based on machine learning according to claim 1, characterized in that: The specific implementation method of step 6 is as follows: generate a feature sample set based on the first 9 feature vector sets obtained in step 5 and the soil solute migration ability characteristic label vector R obtained in step 2. Re-optimize and train the 3 models obtained in step 5 using the feature sample set, and use the 3 optimized and trained models to predict the migration ability of solutes under different soil conditions.
7. The solute transport capacity prediction method based on machine learning according to claim 6, characterized in that: The migration capability is obtained by using the first nine feature vectors obtained by the three models in step 5 as training data for their respective models, and then running the corresponding model to obtain the migration capability of solutes in the soil under that model.
Citation Information
Patent Citations
Lake dissolved organic matter property prediction method based on machine learning
CN114386516A
Soil mineral binding state organic carbon prediction method and device based on random forest and environmental variables
CN115758270A