Soil property quantitative analysis method of spectrum-driven and greedy optimization integrated model

Through the spectrally driven greedy optimization integration model, the accuracy and efficiency problems of soil properties prediction under different soil types and regions are solved, and efficient and accurate soil properties prediction is achieved, which is suitable for large-scale data processing.

CN119537852APending Publication Date: 2025-02-28WEST ANHUI UNIV
View PDF 0 Cites 3 Cited by

Patent Information

Application Number
CN202411625194.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-14
Publication Date
2025-02-28

AI Technical Summary

Technical Problem

The prior art is difficult to effectively predict soil properties under different soil types and regions. The prediction accuracy and generalization ability of a single model are insufficient, and the calculation complexity of traditional model selection and integration methods are high.

Method used

Using the spectral-driven greedy optimization ensemble model, we select the best model combination and build an ensemble learning model through the steps of data preprocessing, basic model definition, greedy optimization model selection, ensemble learning model and model performance evaluation to improve the accuracy of soil properties prediction.

Benefits of technology

It significantly improves the accuracy and efficiency of soil properties prediction, reduces computational complexity and resource consumption, and is suitable for large-scale data processing and high computing cost scenarios.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119537852A_ABST
    Figure CN119537852A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of soil detection, and discloses a soil property quantitative analysis method of a spectrum-driven and greedy optimization integrated model, which comprises the following steps: preprocessing data; defining a basic model; selecting a greedy optimization model; integrating learning models; evaluating model performance; according to the method, the optimal model combination is selected through the greedy optimization method, the advantages of multiple models are integrated, and the accuracy of soil property prediction is improved. The greedy algorithm is simple and efficient, model selection and integration can be completed in a short time, and the method is suitable for processing of large-scale data sets. The method does not depend on a specific model or data set, and can be expanded and applied to prediction tasks in other fields.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of soil detection technology, and more specifically, to a soil property quantitative analysis method based on a spectrum-driven and greedy optimization integrated model. Background Art

[0002] As a core resource for agricultural production, the physical and chemical properties of soil have a decisive influence on crop growth, yield, and sustainability of farmland. Traditional soil property analysis usually relies on laboratory chemical experiments, such as the determination of texture, pH, organic matter content, and nutrients. Although these methods are accurate, they are often time-consuming, cumbersome, and costly, and are not suitable for large-scale rapid analysis of soil samples. In recent years, with the rapid development of spectral analysis technology, soil property prediction models based on non-destructive detection technologies such as near-infrared spectroscopy and mid-infrared spectroscopy have begun to emerge. These technologies can quickly and non-destructively acquire large amounts of spectral data, thus showing great potential in large-scale agricultural and environmental monitoring.

[0003] However, since spectral data are usually high-dimensional and have complex nonlinear relationships, a single machine learning model often has difficulty in achieving optimal prediction results when processing these complex data. The prediction accuracy of a single model is not only affected by the high dimensionality and redundant features of spectral data, but is also easily restricted by external factors such as regional differences and soil type diversity. This results in weak generalization of the model under different soil types and in different regions, and low stability of the prediction results. Therefore, how to develop a soil property prediction model that can adapt to diverse soil types and improve prediction accuracy has become an urgent problem to be solved.

[0004] In the field of machine learning, ensemble learning methods can significantly improve the generalization ability and overall performance of models by combining the prediction results of multiple models. By integrating multiple weak models, the limitations of a single model can be overcome, thereby achieving higher prediction accuracy in complex nonlinear problems. The core of ensemble learning lies in the reasonable selection and optimization of model combinations. However, how to effectively select models and construct the optimal combination remains a challenging problem. Therefore, it is of great practical value to develop a method that can automatically select and optimize model combinations, combined with the characteristics of spectral data, to further improve the accuracy of soil property prediction. Compared with complex deep learning models, models based on ensemble learning and greedy algorithms have lower complexity and stronger interpretability, and are therefore more suitable for large-scale agricultural and environmental applications. Summary of the invention

[0005] The present invention provides a soil property quantitative analysis method based on a spectral driven and greedy optimization integrated model, which is adapted to the detection efficiency and accuracy of soil properties in different soil types and regions, and solves technical problems in related technologies.

[0006] The present invention provides a soil property quantitative analysis method based on a spectrum-driven and greedy optimization integrated model, comprising the following steps:

[0007] S1: Data preprocessing;

[0008] S2: Basic model definition;

[0009] S3: Greedy optimization model selection;

[0010] S4: Ensemble learning model;

[0011] S5: Model performance evaluation.

[0012] Furthermore, in step S1, soil spectral feature data and corresponding soil property label data are obtained, the data are cleaned to remove outliers, the spectral feature data are processed by first-order derivative, and the soil spectral data set is divided into a training set and a test set in a 4:1 ratio.

[0013] Furthermore, in step S2, a group of representative basic machine learning models are defined, including but not limited to a random forest model, a partial least squares model, a gradient boosting tree model, an extreme gradient boosting tree model, a support vector regression model, and a multilayer perceptron model.

[0014] Further, in step S3, let the model combination M = {m1, m2, ..., mk}, where mi represents the i-th model, and its prediction value is Predicted value of the combined model Calculated by the following formula:

[0015]

[0016] Among them, k is the number of models currently selected.

[0017] Furthermore, in step S3, an evaluation function is defined to evaluate the performance of the model combination, including but not limited to the root mean square error.

[0018] Furthermore, in step S3, in the process of selecting the model combination, a model pool P = {m1, m2, ..., mk} is set, where N is the total number of candidate models, and a model is selected from the unselected models each time so that the RMSE of the evaluation function after adding the model is minimized.

[0019] Furthermore, the process of selecting the model combination is as follows:

[0020] Step 301, initializing the selected model set S;

[0021] Step 302, setting the maximum number of models kmax;

[0022] Step 303: In each iteration, traverse the unselected models in the candidate model pool P, set the current candidate model as mi, add it to the selected model set, and form a new model combination m∈S∪{m i}, calculate the combined RMSE:

[0023]

[0024] Step 304, select the RMSE i The smallest model m* is added to the selected model set, that is:

[0025] S=S∪{m*}

[0026] Step 305, repeat steps 303 and 304 until the number of models reaches kmax or the model pool is empty.

[0027] Furthermore, in step S4, the basic model combination selected in step S3 is used to construct an integrated learning model, the first layer model is the basic model selected in step S3, and the second layer meta-model can select a simple model with strong generalization ability, including but not limited to a partial least squares model.

[0028] Furthermore, in step S4, the soil data set is divided into five parts, and one subset is taken as a validation set each time, and the other subsets are taken as training sets to train and evaluate each basic model.

[0029] Furthermore, in step S4, the prediction results of all basic models on each sample are used as the input of the second-layer model, and the true label is used as the output to train the second-layer meta-model and obtain the final integrated model parameters.

[0030] The beneficial effects of the present invention are:

[0031] The present invention selects the best model combination through the greedy optimization method, integrates the advantages of multiple models, and improves the accuracy of soil property prediction. The greedy algorithm is simple and efficient, can complete model selection and integration in a relatively short time, and is suitable for processing large-scale data sets. The method does not rely on a specific model or data set and can be extended to prediction tasks in other fields.

[0032] Traditional model selection and integration methods, such as global search and grid search, have high computational complexity and often require a large amount of computing resources and time. The present invention uses a greedy algorithm for model selection, which significantly reduces the search space and computational burden while ensuring prediction performance, and improves the efficiency of model selection and training. This makes the invention have great application value in large-scale data processing and high computing cost scenarios, and is particularly suitable for industries that require high model building speed.

[0033] The integrated learning model of the present invention can flexibly adapt to different machine learning tasks and data types. By selecting multiple basic models, the present invention can adjust the model according to specific application scenarios and is applicable to a variety of task types from linear to nonlinear, from regression to classification. In addition, the use of metamodels further enhances the adaptability to complex tasks, making the technology more widely used in different industries. BRIEF DESCRIPTION OF THE DRAWINGS

[0034] Figure 1 It is a flow chart of a soil property quantitative analysis method of a spectrum-driven and greedy optimization integrated model of the present invention;

[0035] Figure 2 is the performance of the spectrally driven greedy ensemble model of the present invention on the test set. DETAILED DESCRIPTION

[0036] The subject matter described herein will now be discussed with reference to example implementations. It should be understood that the discussion of these implementations is only to enable those skilled in the art to better understand and implement the subject matter described herein, and the functions and arrangements of the elements discussed may be changed without departing from the scope of protection of the present specification. Various examples may omit, replace, or add various processes or components as needed. In addition, the features described in some examples may also be combined in other examples.

[0037] At least one embodiment of the present invention discloses a soil property quantitative analysis method based on a spectral driven and greedy optimization integrated model, such as Figure 1 As shown, the following steps are included:

[0038] S1: Data preprocessing;

[0039] S2: Basic model definition;

[0040] S3: Greedy optimization model selection;

[0041] S4: Ensemble learning model;

[0042] S5: Model performance evaluation.

[0043] In some embodiments of the present invention, in step S1, soil spectral feature data and corresponding soil property label data are obtained, the data is cleaned to remove outliers, the spectral feature data is processed by first-order derivative, and the soil spectral data set is divided into a training set and a test set in a 4:1 ratio to ensure the generalization ability of the model.

[0044] In some embodiments of the present invention, in step S2, a group of representative basic machine learning models are defined, including but not limited to random forest model, partial least squares model, gradient boosting tree model, extreme gradient boosting tree model, support vector regression model and multilayer perceptron model to ensure the diversity of models. The optimal hyperparameters of each basic model are determined by 5-fold cross validation.

[0045] In some embodiments of the present invention, in step S3, the model combination M = {m1, m2, ..., mk}, where mi represents the i-th model, and its prediction value is Predicted value of the combined model It can be calculated by the following formula:

[0046]

[0047] Among them, k is the number of models currently selected.

[0048] In some embodiments of the present invention, in step S3, an evaluation function is defined to evaluate the performance of the model combination, including but not limited to the root mean square error (RMSE).

[0049]

[0050] Where n is the total number of samples, y j is the true value of the jth sample, is the predicted value of the combined model for the jth sample.

[0051] In some embodiments of the present invention, in step S3, in the process of selecting a model combination, a model pool P = {m1, m2, ..., mk} is set, where N is the total number of candidate models. Each time a model is selected from the unselected models, so that the RMSE of the evaluation function after adding the model is minimized. The algorithm process is as follows:

[0052] Step 301, initializing the selected model set S;

[0053] Step 302, setting the maximum number of models kmax;

[0054] Step 303: In each iteration, traverse the unselected models in the candidate model pool P, set the current candidate model as mi, add it to the selected model set, and form a new model combination m∈S∪{m i}, calculate the combined RMSE:

[0055]

[0056] Step 304, select the RMSE i The smallest model m* is added to the selected model set, that is:

[0057] S=S∪{m*}

[0058] Step 305, repeat steps 303 and 304 until the number of models reaches kmax or the model pool is empty.

[0059] In some embodiments of the present invention, in step S4, the basic model combination selected in step S3 is used to construct an integrated learning model. The first layer model is the basic model selected in step S3, and the second layer meta-model can select a simple model with strong generalization ability, including but not limited to a partial least squares model.

[0060] In some embodiments of the present invention, in step S4, the soil data set is divided into five parts, and one subset is taken each time as a validation set, and the other subsets are taken as training sets to train and evaluate each basic model.

[0061] In some embodiments of the present invention, in step S4, the prediction results of all basic models on each sample are used as the input of the second layer model, the true label is used as the output, the second layer meta model is trained, and the final integrated model parameters are obtained.

[0062] In some embodiments of the present invention, in step S5, the test set is predicted, a prediction matrix is ​​generated using the basic model, and a final prediction result is generated using the second-layer model, and the RMSE and the coefficient of determination (R 2 ) and other indicators to evaluate the model performance.

[0063]

[0064]

[0065] in, is the predicted value, y i is the true value, is the sample mean, n is the number of samples

[0066] In this embodiment, in order to facilitate the establishment of the model, the existing LUCAS soil database is used. Taking the Finnish nitrogen database as an example, the data contains visible-near infrared spectral features and corresponding soil property labels. The flow chart is as follows: Figure 1 shown.

[0067] In the data preprocessing stage, the characteristic spectrum was processed by first-order derivative. The data set was divided into training set and test set in a ratio of 4:1 to ensure the effectiveness of model training and evaluation.

[0068] We further selected a combination of basic models, namely, random forest model, partial least squares model, gradient boosting tree model, extreme gradient boosting tree model, lightweight gradient boosting machine model, support vector regression model and multilayer perceptron model, and used 5-fold cross validation to determine the optimal parameters of each basic model.

[0069] The greedy algorithm is further used to search for the optimal combination of basic models and build an integrated learning model. After local search, the optimal model combination is determined to be a multilayer perceptron model (RMSE = 1.46), a lightweight gradient booster model (RMSE = 1.41) and a partial least squares model (RMSE = 1.40). The second-layer meta-model of the integrated learning model selects the partial least squares model. The verification results on the test set show that compared with the single model, the integrated model has achieved the best performance, such as Figure 2 shown.

[0070] The above describes an embodiment of the present invention, but this embodiment is not limited to the above-mentioned specific implementation mode. The above-mentioned specific implementation mode is merely illustrative and not restrictive. Under the guidance of this embodiment, ordinary technicians in this field can also make more forms of equivalent embodiments, all of which are within the protection of this embodiment.

Claims

1. A quantitative analysis method of soil properties based on a spectrum-driven and greedy optimization integrated model, characterized in that: The following steps are involved: S1: Data preprocessing; S2: Basic model definition; S3: Greedy optimization model selection; S4: Ensemble learning model; S5: Model performance evaluation.

2. The soil property quantitative analysis method based on a spectrum-driven and greedy optimization integrated model according to claim 1 is characterized in that: In step S1, soil spectral feature data and corresponding soil property label data are obtained, the data are cleaned to remove outliers, the spectral feature data are processed by first-order derivative, and the soil spectral data set is divided into a training set and a test set in a 4:1 ratio.

3. The soil property quantitative analysis method based on a spectrum-driven and greedy optimization integrated model according to claim 1 is characterized in that: In step S2, a group of representative basic machine learning models are defined, including but not limited to a random forest model, a partial least squares model, a gradient boosting tree model, an extreme gradient boosting tree model, a support vector regression model, and a multilayer perceptron model.

4. The soil property quantitative analysis method based on a spectrum-driven and greedy optimization integrated model according to claim 1 is characterized in that: In step S3, let the model combination M = {m1,m2,…,mk}, where mi represents the i-th model and its prediction value is Predicted value of the combined model Calculated by the following formula: Among them, k is the number of models currently selected.

5. The soil property quantitative analysis method based on a spectrum-driven and greedy optimization integrated model according to claim 1 is characterized in that: In step S3, an evaluation function is defined to evaluate the performance of the model combination, including but not limited to the root mean square error.

6. The soil property quantitative analysis method of a spectrum-driven and greedy optimization integrated model according to claim 1 or 5, characterized in that: In step S3, in the process of selecting the model combination, a model pool P = {m1, m2, ..., mk} is set, where N is the total number of candidate models, and a model is selected from the unselected models each time so that the RMSE of the evaluation function after adding the model is minimized.

7. The soil property quantitative analysis method of a spectrum-driven and greedy optimization integrated model according to claim 6 is characterized in that: The process of selecting a model combination is as follows: Step 301, initializing the selected model set S; Step 302, setting the maximum number of models kmax; Step 303: In each iteration, traverse the unselected models in the candidate model pool P, set the current candidate model as mi, add it to the selected model set, and form a new model combination m∈S∪{m i }, calculate the combined RMSE: Step 304, select the RMSE i The smallest model m* is added to the selected model set, that is: S=S∪{m*} Step 305, repeat steps 303 and 304 until the number of models reaches kmax or the model pool is empty.

8. The soil property quantitative analysis method of a spectrum-driven and greedy optimization integrated model according to claim 1 is characterized in that: In step S4, the basic model combination selected in step S3 is used to construct an integrated learning model. The first layer model is the basic model selected in step S3, and the second layer meta-model can select a simple model with strong generalization ability, including but not limited to a partial least squares model.

9. The soil property quantitative analysis method of a spectrum-driven and greedy optimization integrated model according to claim 1 is characterized in that: In step S4, the soil data set is divided into five parts, and one subset is taken as a validation set each time, and the other subsets are taken as training sets to train and evaluate each basic model.

10. The soil property quantitative analysis method of a spectrum-driven and greedy optimization integrated model according to claim 1 is characterized in that: In step S4, the prediction results of all basic models on each sample are used as the input of the second-layer model, and the true label is used as the output. The second-layer meta-model is trained to obtain the final integrated model parameters.

Citation Information

Cited By

  • Landslide susceptibility evaluation method and device based on superposition integration strategy

    CN119807674A

  • Landslide susceptibility evaluation method and device based on superposition integration strategy

    CN119807674B

  • Self-adaptive multi-model fusion method and device, storage medium and computer equipment

    CN120297446A