Soil calcium carbonate content prediction method based on indoor hyperspectrum and linear regression
Through the method based on indoor hyperspectral and linear regression, the prediction process of soil calcium carbonate content is simplified, the complex and cost-effective modeling problems in the existing technology are solved, and the rapid and accurate estimation of calcium carbonate content is achieved, and the characteristics of high efficiency, accuracy and environmental protection are achieved.
Patent Information
- Application Number
- CN202510518516.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-24
- Publication Date
- 2025-05-23
- Estimated Expiration
- 2045-04-24
AI Technical Summary
The existing modeling method of the hyperspectral analysis method for soil calcium carbonate content is complex, costly, and has high requirements for data quality and quantity. It is easy to overfit the model when the sample size is insufficient.
Using an indoor hyperspectral and linear regression method, the spectral reflectivity data of the 2000-2400nm band of soil samples were collected, breakpoint correction, de-trend and continuous removal were performed, the maximum absorption depth of the 2330-2360nm band was selected, and a linear regression model was established to predict the calcium carbonate content.
It realizes rapid and accurate estimation of soil calcium carbonate content, reduces the cost and complexity of traditional chemical analysis methods, simplifies the modeling process, improves the accessibility of data, and has the characteristics of high efficiency, accuracy, low cost and environmentally friendly.
Smart Images

Figure CN120028276A_ABST
Abstract
Description
Technical Field
[0001] The invention belongs to the technical field of soil remote sensing, and in particular relates to a soil calcium carbonate content prediction method based on indoor hyperspectral and linear regression. Background Art
[0002] Soil calcium carbonate is the main component of terrestrial soil carbonates, and its content affects the physical structure, chemical properties, biochemical processes, soil carbon pool dynamics and global carbon cycle of the soil. Soil calcium carbonate changes soil aeration, water permeability and erosion resistance by promoting the formation and stability of soil aggregates; at the same time, it regulates soil pH and affects the availability of essential elements for plants. In addition, it also indirectly affects plant growth by affecting soil enzyme activity and microbial community structure. As an important component of the soil inorganic carbon pool, the dynamic changes in soil calcium carbonate content are closely related to the state of soil aggregates, microbial activity and organic matter decomposition, and affects the global greenhouse effect by participating in the carbon cycle. Therefore, efficient and accurate estimation of soil calcium carbonate content is an important part of soil science research, which not only helps to improve soil fertility and ecosystem functions, but also has important significance for accurately calculating soil carbon pool reserves, understanding carbon cycle mechanisms and responding to climate change.
[0003] The existing methods for detecting soil calcium carbonate content mainly include: (1) Traditional chemical analysis method: mainly including titration method and gas volume method, which has high accuracy, but has the disadvantages of being time-consuming, labor-intensive, costly, complicated to operate and difficult to achieve rapid batch analysis; (2) Spectral analysis method: Soil calcium carbonate content estimation based on spectral analysis has the advantages of being fast, cost-effective, environmentally friendly, non-destructive and reproducible. Its process mainly includes the following steps: first, soil spectral data is collected and noise is removed through preprocessing, then a quantitative relationship model between the spectrum and calcium carbonate content is established, and finally the model is used to predict unknown samples. Among them, commonly used preprocessing methods include: Savitzky-Golay convolution smoothing, first-order differential, second-order differential and continuum removal; commonly used modeling methods include: partial least squares regression (PLSR), multivariate linear regression (MLR), support vector machine regression (SVR) or random forest regression (RFR) and other machine learning methods and neural networks (NN). In addition, some estimation methods will use the competitive adaptive reweighted sampling algorithm (CARS) or the continuous projection algorithm (SPA) to screen the characteristic bands before modeling to achieve the purpose of data dimensionality reduction, thereby improving the computational efficiency of the model.
[0004] However, the existing modeling methods for soil calcium carbonate content hyperspectral analysis are still relatively complex: PLSR and MLR require the use of 350-2500 nm band data for modeling, which is complex and costly in collecting and processing hyperspectral data and establishing models; even if data dimension reduction is achieved using methods such as CARS and SPA before modeling, the selection process is complex and highly dependent on the characteristics of the data set, resulting in large differences in the screening results of different data sets. Machine learning methods such as SVR and RFR, as well as NN methods, have high time complexity, and the established models have poor interpretability, making it difficult to intuitively explain the physical and chemical relationship between spectral features and calcium carbonate content; in addition, these methods have high requirements for data quality and quantity, and are prone to overfitting when the sample size is insufficient. Summary of the invention
[0005] Purpose of the invention: The purpose of the present invention is to provide a soil calcium carbonate content prediction method based on indoor hyperspectral and linear regression. Using a small number of samples and a small number of bands of hyperspectral reflectance data to estimate soil calcium carbonate content is efficient, accurate, low-cost, and environmentally friendly. It can provide scientific and reliable calcium carbonate content data support for fields such as soil quality assessment, precision agriculture, and ecological environment protection. At the same time, it can provide a reference for the research and development of soil inorganic carbon determination instruments in the future, and promote the sustainable management and utilization of soil resources.
[0006] Technical solution: A method for predicting soil calcium carbonate content based on indoor hyperspectral and linear regression of the present invention comprises the following steps: Step 1, collecting soil samples and pre-treating them; Step 2, measuring the spectral reflectance data of the soil sample in the 2000-2400nm band; Step 3, determining the calcium carbonate content of the soil sample; Step 4, performing breakpoint correction, detrending and continuum removal processing on the spectral reflectance data of the soil sample in the 2000-2400 nm band to obtain processed data; Step 5: Select the spectral reflectance data of the 2330-2360nm band from the processed data and calculate its maximum absorption depth; Step 6: Based on the calcium carbonate content in step 3 and the maximum absorption depth in step 5, a linear regression model is established, and the linear regression model expression is used as a functional relationship between the maximum absorption depth and the calcium carbonate content; Step 7: Based on the linear regression model and the spectral reflectance data of the soil samples in the target area, the calcium carbonate content of the soil samples in the target area is predicted.
[0007] Furthermore, step 1 specifically includes: collecting soil samples, removing debris from the collected soil samples, allowing the soil samples to air dry naturally, and completing the pretreatment of the soil samples.
[0008] Furthermore, step 2 is specifically as follows: the reflectivity of the soil sample is measured by a spectroradiometer in the laboratory, the incident angle of the light source is set to 15° with the vertical direction, the light source is 20~30cm away from the sample, the probe field angle is 5°, each sample is measured 10~20 times, and the average value is taken as the reflectivity data, and the spectral reflectivity data of the soil sample in the 2000-2400nm band is obtained.
[0009] Furthermore, step 4 specifically includes the following steps: Step 4.1: Spectral reflectance data R Detrending is performed, and the calculation formula is: ; in, λ is the wavelength, R dto,λ The wavelength after the initial detrending process λ The reflectivity at R λ The wavelength λ The reflectivity at a and b are the intercept and slope obtained by linear regression fitting, R dt,λ The wavelength λ The result value of reflectivity after detrending; Step 4.2: Use the Continuum Removed tool in ENVI software to perform continuum removal processing on the detrended result data to obtain the processed reflectance data. R cr .
[0010] Further, step 5 is specifically: calculate the maximum absorption depth in the 2330-2360nm band, and the calculation formula is: ; in, H λ The wavelength λ The maximum absorption depth at R cr,λ The wavelength λ The spectral reflectance value after the continuum is removed; λ is the wavelength, ranging from 2330-2360nm.
[0011] Furthermore, step 6 specifically includes the following steps: Step 6.1: Use the KS algorithm to divide all sample data sets into modeling sample sets in a ratio of 3:1 to 2:1. T and validation sample set V, specifically: First, calculate the Euclidean distance between any two samples in the sample set, according to the calculation formula: in, for i and j The Euclidean distance between samples is H i and H j Respectively i and j The maximum absorption depth of each sample is y i and y j Respectively i and j Measured value of calcium carbonate content of samples; Select the two samples with the farthest Euclidean distance as the modeling sample set T The initial sample is then calculated, and the minimum distance between the remaining samples and the selected samples is then selected to join the modeling sample set. T ; Repeat the above steps until the modeling sample set T The number of samples in the test set reaches a predetermined proportion, and the remaining samples are used as the validation sample set. V ; Step 6.2: Modeling sample set T Randomly divide into K subsets, each with the same number of samples; for each round of validation, select one of the subsets as the validation subset Tv , the remaining K-1 subsets are combined as modeling subsets Ts , using the modeling subset Ts The soil calcium carbonate content prediction model was constructed by linear regression method, and the model expression is: ; in, To model subset Ts Middle i Preliminary prediction of calcium carbonate content in soil samples, k , C are all rate coefficients. When the predicted value When it is less than 0, the predicted value is corrected to 0 according to the following formula: in, To model subset Ts Middle i The final predicted value of calcium carbonate content of soil samples; Step 6.3: Use the constructed model to predict the validation subset and calculate the determination coefficient for this round of validation R Tv 2 and RMS error RMSE Tv ; Step 6.4, select R Tv 2 Maximum and RMSE Tv The smallest round k and C The optimal calibration coefficient is used to establish a linear regression model between the maximum absorption depth and the calcium carbonate content. Step 6.5: Apply the linear regression model to the validation sample set and calculate the coefficient of determination for validation R V 2 , Root Mean Square Error RMSE V , mean absolute error MAE V and relative prediction bias RPD V As an evaluation indicator of model accuracy.
[0012] Furthermore, in step 6.3, the determination coefficient of the round of verification is R Tv 2 and RMS error RMSE Tv The calculation formula is as follows: ; Where n is the number of samples in the validation subset, y Tv,i To verify the subset i The measured value of soil calcium carbonate content in each sample, To verify the subset i The predicted value of soil calcium carbonate content in each sample, is the average value of the measured values of soil calcium carbonate content of all samples in the validation subset; R Tv 2 The larger the value, RMSE Tv The smaller the value is, the higher the accuracy of the soil calcium carbonate content prediction model is.
[0013] Further, in step 6.5, the determination coefficient of the calculation verification is R V 2 , Root Mean Square Error RMSEV , mean absolute error MAE V and relative prediction bias RPD V The calculation formula is as follows: Among them, m is the number of samples in the validation sample set, y V,i To verify the sample set i The measured value of soil calcium carbonate content in each sample, To verify the sample set i The predicted value of soil calcium carbonate content for each sample, To verify the average value of the measured values of soil calcium carbonate content in all samples in the sample set; R V 2 and RPD V The larger the value, RMSE V and MAE V The smaller the value of , the higher the accuracy of the linear regression model between the maximum absorption depth and the calcium carbonate content.
[0014] The present invention also discloses a computer device, comprising a memory, a processor and a computer program stored in the memory, wherein the processor executes the computer program to implement the steps of the method of the present invention.
[0015] The present invention also discloses a computer-readable storage medium on which a computer program / instruction is stored. When the computer program / instruction is executed by a processor, the steps of the method of the present invention are implemented.
[0016] Beneficial effects: Compared with the prior art, the present invention has the following significant advantages: the soil calcium carbonate content estimation method based on indoor hyperspectral provided by the present invention realizes the rapid and accurate estimation of soil calcium carbonate content, effectively avoids the large amount of polluting chemical tail liquid involved in the traditional chemical analysis method, and the high time and economic costs brought about by it, and also greatly reduces the number of bands required for the spectral analysis method, and greatly simplifies the modeling method by using univariate linear regression instead of multivariate nonlinear regression, shortens the estimation time, and the present invention is reasonably designed, and can construct a linear regression model of the maximum absorption depth obtained after soil hyperspectral pretreatment and soil calcium carbonate content, thereby improving the accessibility of soil calcium carbonate content data. The method is highly feasible, has the characteristics of high efficiency, accuracy, low cost, and environmental friendliness, and is suitable for promotion. BRIEF DESCRIPTION OF THE DRAWINGS
[0017] Figure 1 It is a schematic diagram of a flow chart of an implementation mode of the present invention.
[0018] Figure 2 It is a schematic diagram of the spectrum testing device of the present invention.
[0019] Figure 3 It is a scatter plot of the actual value and predicted value of soil calcium carbonate content in the verification sample set of the embodiment of the present invention. DETAILED DESCRIPTION
[0020] The technical solution of the present invention is further described below in conjunction with the accompanying drawings.
[0021] Example
[0022] This embodiment takes the soil calcium carbonate content reflectance spectrum estimation in the area east of Fangong Dike, Dongtai City, Jiangsu Province as an example. Figure 1 This is a flow chart of an embodiment of the present invention. With respect to the entire process of sample processing, data preprocessing, calculating the maximum absorption depth, establishing a linear regression model, establishing a functional relationship between the maximum absorption depth and the calcium carbonate content, etc., this embodiment further describes the present invention in detail, as follows: The present invention provides a soil calcium carbonate content estimation method based on indoor hyperspectral, comprising the following steps: S1. Collect soil samples from the target area and perform pretreatment; S2. Determine the spectral reflectance of the soil sample at 2000-2400nm; S3. Determine the calcium carbonate content of the soil sample; S4. Detrending and continuum removal processing is performed on the reflectance data in the 2000-2400 nm band; S5. Select the processed data of 2330-2360nm band and calculate its maximum absorption depth; S6. Establishing a linear regression model based on the maximum absorption depth and calcium carbonate content; S7. The functional relationship between the maximum absorption depth and the calcium carbonate content was established based on the linear regression model.
[0023] As a preferred embodiment of the present invention, step S1 specifically includes: collecting 110 soil samples that are typical and regionally representative in the study area, removing debris from the samples, and naturally air-drying the soil samples to complete the pretreatment of the soil samples.
[0024] As a preferred embodiment of the present invention, step S2 specifically comprises: in a dark laboratory, using Figure 2The FieldSpec3 portable spectrometer shown in the figure measures the soil spectral reflectance data. The spectrometer probe adopts a 5-degree field of view (B = 2.5°) to observe perpendicularly to the soil sample, with a distance (H) of 15 cm from the soil sample and a detection radius (R2) of 0.655 cm. The light source is a 50W halogen lamp, with an angle (A) of 15° to the vertical direction and a distance (L) of 20-30 cm from the sample. The sample container is placed on the black automatic rotating platform, which is a small aluminum round box with a radius (R1) of 2.5 cm and a depth of 1 cm. Before the measurement, the dark current is first removed, and then the absolute reflectance is obtained using a 40×40cm diffuse reflection standard reference plate. During the measurement, the surface of the soil sample is first leveled with a ruler, and then the small round box containing the soil sample is placed on the black automatic rotating platform. During the period of the small round box rotating at a constant speed, the spectrometer measures 20 spectral curves at equal time intervals, and the average value is taken as the reflectance data. After measuring the spectral data of 5 soil samples, it is re-calibrated with a reference white plate to reduce the error.
[0025] As a preferred embodiment of the present invention, step S3 is specifically: using the gas volume method to determine the calcium carbonate content of the soil sample, that is, adding dilute hydrochloric acid to the soil sample, using a gas collection device to measure the volume of carbon dioxide gas generated by the reaction between the two, and calculating the calcium carbonate content in the soil sample. The calcium carbonate content of the soil in the study area ranges from 1.45 g / kg to 67.97 g / kg, with an average value of 34.29 g / kg and a standard deviation of 19.49 g / kg.
[0026] As a preferred embodiment of the present invention, step S4 includes the following sub-steps:
[0027] S4.1. Reflectivity data R Detrending is performed according to the calculation formula: in, λ is the wavelength, R dto,λ The wavelength after the initial detrending process λ The reflectivity at R λ The wavelength λ The reflectivity at a and b are the intercept and slope obtained by linear regression fitting, R dt,λ The wavelength λ The reflectivity at the detrended location is the result value, because R dto,λ may be less than 0, which will hinder the continuum removal process in S4.2, so it is necessary to R dto,λThe range is adjusted to a non-negative range.
[0028] S4.2. Use the Continuum Removed tool in ENVI Classic 5.6 software to remove the trend of the result data. R dt Perform continuum removal processing to obtain processed reflectivity data R cr .
[0029] As a preferred embodiment of the present invention, step S5 specifically comprises: Calculate the reflectivity data after processing in each band from 2000 to 2400nm R cr,λ The Pearson correlation coefficient with soil calcium carbonate content is calculated according to the formula: in, r λ The wavelength λ Pearson correlation coefficient between the processed reflectance data and soil calcium carbonate content; N is the number of data points (N=110); For the wavelength λ Place i Processed reflectance data of samples; The wavelength λ The average reflectance data of all samples after processing; y i For the i A measurement of soil calcium carbonate content; The Pearson correlation coefficient between the reflectance data after processing at each wavelength of 2000-2400nm and the soil calcium carbonate content was calculated. r , which ranges from -0.911356 to 0.338588, with an average of -0.473652 and a standard deviation of 0.317089. Among them, the Pearson correlation coefficient between the reflectance data of each wavelength in the 2330-2360nm band after processing and the soil calcium carbonate content r The absolute value is closest to 1, ranging from -0.911356 to -0.859884, with an average value of -0.890840 and a standard deviation of 0.012639. This shows that the processed reflectance data of the 2330-2360nm band has a significant negative correlation with the soil calcium carbonate content, so this band is suitable for the prediction of calcium carbonate content.
[0030] Select the processed data of the 2330-2360nm band and calculate its maximum absorption depth according to the calculation formula: in, H λ The wavelength λ The maximum absorption depth at R cr,λ The wavelength λ The spectral reflectance value after the continuum is removed; λ is the wavelength, ranging from 2330-2360nm. The maximum absorption depth of each soil sample was calculated H , which ranges between 0.097827 and 0.444846, with a mean of 0.289283 and a standard deviation of 0.088376.
[0031] As a preferred embodiment of the present invention, step S6 includes the following sub-steps:
[0032] S6.1. Use the KS algorithm to divide all sample data sets into modeling sample sets in a ratio of 8:3. T and validation sample set V , the specific steps are as follows: First, calculate the Euclidean distance between any two samples in the sample set, according to the calculation formula: in, for i and j The Euclidean distance between samples is H i and H j Respectively i and j The maximum absorption depth of each sample is y i and y j Respectively i and j Measured value of calcium carbonate content of each sample (g / kg).
[0033] Then select the two samples with the farthest Euclidean distance as the modeling sample set T The initial sample is then calculated, and the minimum distance between the remaining samples and the selected samples is then selected to join the modeling sample set. T Repeat the above steps until the modeling sample set T The number of samples in the test set reaches a predetermined proportion, and the remaining samples are used as the validation sample set. V .
[0034] S6.2. Modeling sample set TRandomly divide into 5 subsets, each containing 16 samples; for each round of validation, select one of the subsets as the validation subset Tv , the remaining four subsets are combined as the modeling subset Ts , using the modeling subset Ts The soil calcium carbonate content prediction model was constructed by linear regression method, and the model expression is: ; in, To model a subset Ts Middle i Preliminary prediction of calcium carbonate content in soil samples, k , C are all rate coefficients. When the predicted value When it is less than 0, the predicted value is corrected to 0 according to the following formula; in, To model a subset Ts Middle i The final predicted value of calcium carbonate content of soil samples;
[0035] S6.3. Use the constructed model to predict the validation subset and calculate the determination coefficient for this round of validation R Tv 2 , Root Mean Square Error RMSE Tv , according to the calculation formula: Where n is the number of samples in the validation subset (n=16), y Tv,i To verify the subset i Measured value of soil calcium carbonate content of each sample (g / kg), To verify the subset i Predicted value of soil calcium carbonate content for each sample (g / kg), is the average value of the measured soil calcium carbonate content of all samples in the validation subset (g / kg); R Tv 2 The larger the value, RMSE Tv The smaller the value, the higher the accuracy of the soil calcium carbonate content prediction model.
[0036] S6.4. Selection R Tv 2 Maximum and RMSE Tv The smallest roundk and C The optimal calibration coefficient was used to establish a linear regression model between the maximum absorption depth and the calcium carbonate content.
[0037] S6.5. Apply the linear regression model to the validation sample set and calculate the coefficient of determination for validation R V 2 , Root Mean Square Error RMSE V , mean absolute error MAE V and relative prediction bias RPD V As an evaluation index of model accuracy, according to the calculation formula: Among them, m is the number of samples in the validation sample set (m=30), y V,i To verify the sample set i Measured value of soil calcium carbonate content of each sample (g / kg), To verify the sample set i Predicted value of soil calcium carbonate content for each sample (g / kg), To verify the average value of the measured soil calcium carbonate content of all samples in the sample set (g / kg); R V 2 and RPD V The larger the value, RMSE V and MAE V The smaller the value, the higher the accuracy of the linear regression model between the maximum absorption depth and the calcium carbonate content.
[0038] In this embodiment, the best round of cross-validation modeling process R Tv 2 =0.8917, RMSE Tv =6.7575g / kg, optimal rating coefficient k =192.3373, C =-21.8461, the linear regression model expression between the maximum absorption depth and calcium carbonate content is: y =192.3373× H -21.8461. The scatter plot of the actual value and predicted value of soil calcium carbonate content in the validation sample set is as follows Figure 3 As shown. The coefficient of determination of the validation sample set RV ² is 0.8452, root mean square error RMSE V The mean absolute error is 7.6725 g / kg, MAE V It is 6.2541g / kg, relative prediction deviation RPD V It is 2.5853, and all accuracy indicators have reached the expected targets (R²>0.8, RMSE<10g / kg, MAE<10g / kg, RPD>2.0), indicating that the model has good prediction performance, and proceeds to step S7.
[0039] As a preferred embodiment of the present invention, step S7 specifically comprises: using the linear regression model expression obtained in S6.5 as a functional relationship between the maximum absorption depth and the calcium carbonate content, and estimating the soil calcium carbonate content based on the reflectance spectrum data of soil samples with other unknown calcium carbonate contents in the study area.
Claims
1. A method for predicting soil calcium carbonate content based on indoor hyperspectral and linear regression, characterized in that: The steps include: Step 1, collecting soil samples and pre-treating them; Step 2, measuring the spectral reflectance data of the soil sample in the 2000-2400nm band; Step 3, determining the calcium carbonate content of the soil sample; Step 4, performing breakpoint correction, detrending and continuum removal processing on the spectral reflectance data of the soil sample in the 2000-2400 nm band to obtain processed data; Step 5: Select the spectral reflectance data of the 2330-2360nm band from the processed data and calculate its maximum absorption depth; Step 6: Based on the calcium carbonate content in step 3 and the maximum absorption depth in step 5, a linear regression model is established, and the linear regression model expression is used as a functional relationship between the maximum absorption depth and the calcium carbonate content; Step 7: Based on the linear regression model and the spectral reflectance data of the soil samples in the target area, the calcium carbonate content of the soil samples in the target area is predicted.
2. A soil calcium carbonate content prediction method based on indoor hyperspectral and linear regression according to claim 1, characterized in that: Step 1 specifically includes: collecting soil samples, removing debris from the collected soil samples, allowing the soil samples to air dry naturally, and completing the pretreatment of the soil samples.
3. The method for predicting soil calcium carbonate content based on indoor hyperspectral and linear regression according to claim 1, characterized in that: Step 2 is as follows: the reflectivity of the soil sample is measured by a spectroradiometer in the laboratory, the incident angle of the light source is set to 15° with the vertical direction, the light source is 20~30cm away from the sample, the probe field angle is 5°, each sample is measured 10~20 times, and the average value is taken as the reflectivity data to obtain the spectral reflectivity data of the soil sample in the 2000-2400nm band.
4. The method for predicting soil calcium carbonate content based on indoor hyperspectral and linear regression according to claim 1, characterized in that: Step 4 specifically includes the following steps: Step 4.1: Spectral reflectance data R Detrending is performed, and the calculation formula is: ; in, λ is the wavelength, R dto,λ The wavelength after initial detrending λ The reflectivity at R λ The wavelength λ The reflectivity at a and b are the intercept and slope obtained by linear regression fitting, R dt,λ The wavelength λ The result value of reflectivity after detrending; Step 4.2: Use the Continuum Removed tool in ENVI software to perform continuum removal processing on the detrended result data to obtain the processed reflectance data. R cr .
5. The method for predicting soil calcium carbonate content based on indoor hyperspectral and linear regression according to claim 4, characterized in that: Step 5 is as follows: Calculate the maximum absorption depth in the 2330-2360nm band using the following formula: ; in, H λ The wavelength λ The maximum absorption depth at R cr,λ The wavelength λ The spectral reflectance value after the continuum is removed; λ is the wavelength, ranging from 2330-2360nm.
6. The method for predicting soil calcium carbonate content based on indoor hyperspectral and linear regression according to claim 4, characterized in that: Step 6 specifically includes the following steps: Step 6.1: Use the KS algorithm to divide all sample data sets into modeling sample sets in a ratio of 3:1 to 2:
1. T and validation sample set V , specifically: First, calculate the Euclidean distance between any two samples in the sample set, according to the calculation formula: in, for i and j The Euclidean distance between samples is H i and H j Respectively i and j The maximum absorption depth of each sample is y i and y j Respectively i and j Measured value of calcium carbonate content of samples; Select the two samples with the farthest Euclidean distance as the modeling sample set T The initial sample is then calculated, and the minimum distance between the remaining samples and the selected samples is then selected to join the modeling sample set. T ; Repeat the above steps until the modeling sample set T The number of samples in the test set reaches a predetermined proportion, and the remaining samples are used as the validation sample set. V ; Step 6.2: Modeling sample set T Randomly divide into K subsets, each with the same number of samples; for each round of validation, select one of the subsets as the validation subset TV , the remaining K-1 subsets are combined as modeling subsets Ts , using the modeling subset Ts The soil calcium carbonate content prediction model was constructed by linear regression method, and the model expression is: ; in, To model a subset Ts Middle i Preliminary prediction of calcium carbonate content in soil samples, k , C are all rate coefficients. When the predicted value When it is less than 0, the predicted value is corrected to 0 according to the following formula; in, To model a subset Ts Middle i The final predicted value of calcium carbonate content of soil samples; Step 6.3: Use the constructed model to predict the validation subset and calculate the determination coefficient for this round of validation R Tv 2 and RMS error RMSE Tv ; Step 6.4, select R Tv 2 Maximum and RMSE Tv The smallest round k and C The optimal calibration coefficient is used to establish a linear regression model between the maximum absorption depth and the calcium carbonate content. Step 6.5: Apply the linear regression model to the validation sample set and calculate the coefficient of determination for validation R V 2 , Root Mean Square Error RMSE V , mean absolute error MAE V and relative prediction bias RPD V As an evaluation indicator of model accuracy.
7. The method for predicting soil calcium carbonate content based on indoor hyperspectral and linear regression according to claim 6, characterized in that: In step 6.3, the determination coefficient of this round of verification is R Tv 2 and RMS error RMSE Tv The calculation formula is as follows: ; Where n is the number of samples in the validation subset, y Tv,i To verify the subset i The measured value of soil calcium carbonate content in each sample, To verify the subset i The predicted value of soil calcium carbonate content in each sample, is the average value of the measured values of soil calcium carbonate content of all samples in the validation subset; R Tv 2 The larger the value, RMSE Tv The smaller the value is, the higher the accuracy of the soil calcium carbonate content prediction model is.
8. The method for predicting soil calcium carbonate content based on indoor hyperspectral and linear regression according to claim 6, characterized in that: In step 6.5, the calculation verifies the coefficient of determination R V 2 , Root Mean Square Error RMSE V , mean absolute error MAE V and relative prediction bias RPD V The calculation formula is as follows: Among them, m is the number of samples in the validation sample set, y V,i To verify the sample set i The measured value of soil calcium carbonate content in each sample, To verify the sample set i The predicted value of soil calcium carbonate content in each sample, To verify the average value of the measured values of soil calcium carbonate content in all samples in the sample set; R V 2 and RPD V The larger the value, RMSE V and MAE V The smaller the value of , the higher the accuracy of the linear regression model between the maximum absorption depth and the calcium carbonate content.
9. A computer device comprising a memory, a processor and a computer program stored in the memory, characterized in that: The processor executes the computer program to implement the steps of the method of claim 1.
10. A computer-readable storage medium having a computer program / instruction stored thereon, characterized in that: When the computer program / instructions are executed by a processor, the steps of the method according to claim 1 are implemented.
Citation Information
Patent Citations
Black soil water content fast determining method based on spectral absorption features
CN106770054A
Soil organic matter content quantitative inversion method based on ground hyper-spectrum
CN110376139A
Tobacco leaf SPAD value estimation method based on novel vegetation index
CN112881327A
Method for estimating content of heavy metals in soil based on hyperspectral remote sensing technology
CN114018833A
Rapid quantification method for soil carbonate
CN114720416A
Cited By
Soil nutrient analysis method based on spectrum technology
CN120539064A