Vegetation carbon sink space optimization method and system based on interpretable machine learning
By employing an interpretable machine learning approach, utilizing the XGBoost regression model and SHAP interpreter, the contribution of environmental factors to carbon sinks is quantified, and the optimal threshold range is determined. This addresses the issues of insufficient prediction accuracy and interpretability in traditional methods, enabling efficient spatial optimization and management of vegetation carbon sinks.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- HEFEI UNIV OF TECH
- Filing Date
- 2025-12-23
- Publication Date
- 2026-04-17
AI Technical Summary
Existing research on the spatial optimization of vegetation carbon sinks relies on traditional statistical methods with limited predictive accuracy, while machine learning methods lack interpretability, struggle to capture complex nonlinear response mechanisms, and fail to provide clear threshold constraints, thus limiting the practical application value of vegetation carbon sink management and policy formulation.
Using an interpretable machine learning approach, the XGBoost regression model combined with the SHAP interpreter and the LOWESS algorithm is employed to quantify the contribution of environmental factors to carbon sequestration, determine the optimization threshold range, and generate a vegetation carbon sequestration optimization recommendation report.
It has achieved high-precision prediction and optimization of vegetation carbon sinks, provided scientific and operable spatial regulation pathways, and enhanced the decision support value of carbon sink management and regional ecological planning.
Smart Images

Figure CN121390476B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of ecological and environmental technology, and in particular to a method and system for spatial optimization of vegetation carbon sinks based on interpretable machine learning. Background Technology
[0002] Vegetation carbon sinks play a crucial role in global carbon cycling and climate change mitigation as an important pathway for terrestrial ecosystems to fix and store carbon dioxide.
[0003] Current research on the spatial optimization of vegetation carbon sinks mainly relies on traditional statistical methods, such as multiple linear regression and correlation analysis. While these methods can reveal the relationship between environmental factors and carbon sinks to some extent, they often assume a linear correlation between variables, making it difficult to capture the complex nonlinear response mechanisms of carbon sinks to multi-source environmental factors, resulting in limited prediction accuracy. Meanwhile, machine learning methods such as random forests and gradient boosting trees, although improving prediction accuracy, suffer from opaque model decision-making processes, operating as typical "black boxes." This makes it difficult to extract interpretable patterns in the effects of environmental factors, thus failing to provide clear threshold constraints and regulatory basis for spatial optimization.
[0004] Furthermore, most existing optimization methods lack a closed-loop design from interpretive modeling to spatial zoning, often remaining at the outcome prediction stage and failing to achieve spatial identification of vegetation carbon sink potential gains and the generation of optimization strategies. This limits their practical application value in regional ecological planning, carbon sink management, and policy formulation.
[0005] Therefore, there is an urgent need to propose a new method that integrates interpretable machine learning and spatial optimization. This method can obtain carbon sink distribution through high-precision prediction models, quantify the effects of environmental factors using interpretable algorithms, and further combine spatial optimization techniques to determine the threshold ranges and optimization zones of key factors. This will provide a scientific and operable spatial regulation path for improving vegetation carbon sinks. Summary of the Invention
[0006] To address at least one of the aforementioned technical problems, this invention proposes a spatial optimization method and system for vegetation carbon sinks based on interpretable machine learning.
[0007] The first aspect of this invention provides a spatial optimization method for vegetation carbon sinks based on interpretable machine learning, comprising:
[0008] Acquire multi-source environmental data for the target area, including administrative division data, environmental factor data, and target variable data. Perform spatial coordinate unification and resolution standardization on the multi-source environmental data to generate a spatial tabular dataset.
[0009] Based on the spatial table dataset, an XGBoost regression model is trained using cross-validation and early stopping strategies. The trained XGBoost regression model is then used to predict the vegetation carbon sink in the target area to determine the model performance data.
[0010] A preset number of sampling points were selected during the training process of the XGBoost regression model. Based on the SHAP interpreter, the contribution value of each environmental factor to vegetation carbon sink was calculated, and a feature importance ranking map and a SHAP summary map were generated.
[0011] The feature importance ranking graph and SHAP summary graph are fitted based on the LOWESS algorithm to determine the relationship curve between each environmental factor value and the SHAP value, and the optimization threshold range of each environmental factor is determined based on the relationship curve.
[0012] The optimal characteristic value of environmental factors is determined based on the optimized threshold range, the vegetation carbon sink gain of the optimized characteristic value is predicted, the predicted gain data is obtained, and the optimized zoning is determined based on the predicted gain data.
[0013] Based on the model performance data and the optimization threshold range for each environmental factor, a vegetation carbon sink optimization suggestion report is generated for the optimized partition.
[0014] In this solution, the acquisition of multi-source environmental data for the target area includes administrative division data, environmental factor data, and target variable data. Spatial coordinate unification and resolution standardization are performed on the multi-source environmental data to generate a spatial tabular dataset. Specifically:
[0015] Obtain administrative division data of the target area, including boundary coordinate information of the target area; and standardize the target area into several regular grids according to a preset resolution based on the administrative division data.
[0016] The environmental factor data of each grid cell in the target area within a preset historical time period are obtained. The environmental factor data includes precipitation, temperature, altitude, slope, normalized vegetation index, leaf area index, soil organic carbon content, soil clay content, land use intensity data, and nighttime light data.
[0017] Acquire target variable data for each grid cell in the target area, where the target variable data is net ecosystem productivity;
[0018] The coordinate system of the multi-source environmental data is converted to the WGS84 geographic coordinate system. The environmental factor data and target variable data after the coordinate system is unified are extracted into the corresponding coordinate raster to generate spatial table data containing environmental factors and target variables.
[0019] In this scheme, the XGBoost regression model is trained using cross-validation and early stopping strategies based on the spatial table dataset. The trained XGBoost regression model is then used to predict the vegetation carbon sink in the target area to determine the model performance data. Specifically:
[0020] Outlier analysis is performed on the spatial table data based on the interquartile range method. The first quartile and the third quartile of each environmental factor variable are calculated to obtain the interquartile range value. An outlier judgment threshold range is set, and data that are less than the first quartile minus a preset multiple or greater than the third quartile plus a preset multiple are marked as numerical outliers.
[0021] Outlier processing is performed on the numerical outliers, including replacing infinity with null values (NaN), replacing outliers with preset quantile values, and replacing missing values with the median.
[0022] The spatial table data after outlier processing is divided into 80% training set and 20% test set. The XGBoost regression model is initialized and the hyperparameters of the model are set, including learning rate, regularization coefficient, and maximum depth of decision tree.
[0023] The training set and test set are imported into the XGBoost regression model for training based on the k-fold cross-validation strategy. The maximum number of iterations and the number of early stopping rounds are set. Training is stopped when the model does not improve the accuracy of net ecosystem productivity prediction on the validation set within a preset number of consecutive iterations, and the trained XGBoost regression model is obtained.
[0024] The trained XGBoost regression model is used to predict vegetation carbon sink on the test set. The root mean square error, mean absolute error, and coefficient of determination between the predicted and actual values are calculated. The model performance is evaluated based on the root mean square error, mean absolute error, and coefficient of determination to obtain model performance data.
[0025] In this scheme, the selection of a preset number of sampling points during the XGBoost regression model training process, the calculation of the contribution value of each environmental factor to vegetation carbon sink based on the SHAP interpreter, and the generation of feature importance ranking map and SHAP summary map are specifically as follows:
[0026] A predetermined number of sample data are randomly selected from the training input data of the trained XGBoost regression model as the SHAP analysis sample set. If the total number of samples is less than the predetermined number, all samples are selected.
[0027] Create a SHAP interpreter object based on the XGBoost regression model. For each environmental factor in each sample, construct a baseline reference value through the SHAP interpreter and evaluate the marginal contribution of the environmental factor to the model output in all feature subsets of the XGBoost regression model based on the Shapley value calculation method. Obtain the SHAP value of the environmental factor by weighted averaging the contribution values of all feature subsets.
[0028] All environmental factors are sorted in descending order of their average absolute SHAP values to generate a feature importance ranking list of each environmental factor’s contribution to vegetation carbon sink prediction.
[0029] A SHAP summary graph is plotted based on the SHAP values. The horizontal axis of the SHAP summary graph represents the SHAP values, and the vertical axis represents the environmental factors sorted by importance. Each point in the graph represents the distribution of SHAP values of a sample on that environmental factor, and the color of the point reflects the magnitude of the environmental factor value of that sample.
[0030] Simultaneously, a feature importance ranking bar chart is generated, where the horizontal axis of the bar chart is the average absolute SHAP value, the vertical axis is the name of the environmental factor, and the length of the bar indicates the importance of each environmental factor.
[0031] In this scheme, the feature importance ranking graph and SHAP summary graph are fitted using the LOWESS algorithm to determine the relationship curve between each environmental factor value and the SHAP value. Based on the relationship curve, the optimization threshold range for each environmental factor is determined, specifically as follows:
[0032] Data cleaning was performed on the feature values and SHAP values corresponding to each environmental factor in the SHAP summary diagram to remove sample points containing missing or invalid values.
[0033] The LOWESS algorithm is used to perform local weighted regression fitting on the cleaned feature values and SHAP values to generate a smooth relationship curve between feature values and SHAP values.
[0034] Calculate the Spearman correlation coefficient between the characteristic values of each environmental factor and the SHAP value, and determine the positive or negative direction of the environmental factor's impact on vegetation carbon sink based on the sign of the correlation coefficient;
[0035] On the smooth relationship curve, identify continuous feature value intervals where the SHAP value is greater than zero. If there are multiple continuous intervals, select the interval with the largest mean SHAP value as the candidate optimization interval.
[0036] When the length of the candidate optimization interval is less than the preset minimum ecological interval threshold, the interval is expanded to both sides of the minimum ecological interval length with the median of the interval as the center to obtain the first optimization threshold interval.
[0037] If there is no interval with a SHAP value greater than zero on the smooth relationship curve, then the feature point corresponding to the maximum global SHAP value is selected as the center, and the minimum ecological interval centered on the feature point is constructed to obtain the second optimized threshold interval.
[0038] For each environmental factor, an optimized threshold interval visualization is generated, which simultaneously displays the original feature value-SHAP value scatter plot, LOWESS fitting curve, SHAP zero value reference line, and optimized threshold interval boundary markers.
[0039] The first or second optimized threshold interval of each environmental factor is compared with the original feature value distribution range. Interval boundary points that exceed the actual feature value range are removed, and the optimized threshold interval of each environmental factor is output.
[0040] In this scheme, the step of determining the optimized characteristic value of environmental factors based on the optimized threshold range, predicting the vegetation carbon sequestration gain of the optimized characteristic value to obtain predicted gain data, and determining the optimized partition based on the predicted gain data specifically involves:
[0041] Select a preset number of key environmental factors from the feature importance ranking map, calculate the deviation distance between the current feature value of each key environmental factor in each grid of the target area and the boundary of the optimization threshold interval, and determine the optimization demand intensity based on the deviation distance;
[0042] The feature value corresponding to the maximum value of the SHAP value of each key environmental factor in each grid of the target area within the optimization threshold range is selected as the optimization feature value to form the optimization feature dataset;
[0043] The optimized feature dataset is imported into the trained XGBoost regression model to predict vegetation carbon sink, and the optimized net ecosystem productivity prediction value is obtained. The difference between the net ecosystem productivity before and after optimization is calculated as the carbon sink gain potential value.
[0044] If the potential value of carbon sink gain is greater than the preset ratio of net ecosystem productivity before optimization, the environmental factor is taken as the environmental factor to be optimized, and the quantity information of the environmental factor to be optimized is counted.
[0045] The optimization zones are determined based on the carbon sink gain potential value, optimization demand intensity, and number of environmental factors to be optimized for each grid in the target area. Based on the carbon sink gain potential value and environmental factors to be optimized for each optimization zone, a spatial distribution map of carbon sink potential gain, a heat map of key feature optimization demand, and a suggested optimization zone map are drawn.
[0046] In this scheme, the step of generating a vegetation carbon sequestration optimization suggestion report for the optimized zone based on the model performance data and the optimization threshold range of each environmental factor specifically includes:
[0047] Based on the model performance data and the optimization threshold range for each environmental factor, a vegetation carbon sink optimization suggestion report for the optimized zone is generated.
[0048] The vegetation carbon sink optimization suggestion report includes the environmental factors to be optimized, optimization direction, optimization priority, carbon sink gain potential value, carbon sink potential gain spatial distribution map, key feature optimization demand heat map and optimization zoning suggestion map for each grid in the target area.
[0049] A second aspect of the present invention also provides a vegetation carbon sink space optimization system based on interpretable machine learning. The system includes a memory and a processor. The memory includes a vegetation carbon sink space optimization method program based on interpretable machine learning. When the processor executes the vegetation carbon sink space optimization method program based on interpretable machine learning, it performs the following steps:
[0050] Acquire multi-source environmental data for the target area, including administrative division data, environmental factor data, and target variable data. Perform spatial coordinate unification and resolution standardization on the multi-source environmental data to generate a spatial tabular dataset.
[0051] Based on the spatial table dataset, an XGBoost regression model is trained using cross-validation and early stopping strategies. The trained XGBoost regression model is then used to predict the vegetation carbon sink in the target area to determine the model performance data.
[0052] A preset number of sampling points were selected during the training process of the XGBoost regression model. Based on the SHAP interpreter, the contribution value of each environmental factor to vegetation carbon sink was calculated, and a feature importance ranking map and a SHAP summary map were generated.
[0053] The feature importance ranking graph and SHAP summary graph are fitted based on the LOWESS algorithm to determine the relationship curve between each environmental factor value and the SHAP value, and the optimization threshold range of each environmental factor is determined based on the relationship curve.
[0054] The optimal characteristic value of environmental factors is determined based on the optimized threshold range, the vegetation carbon sink gain of the optimized characteristic value is predicted, the predicted gain data is obtained, and the optimized zoning is determined based on the predicted gain data.
[0055] Based on the model performance data and the optimization threshold range for each environmental factor, a vegetation carbon sink optimization suggestion report is generated for the optimized partition.
[0056] This invention discloses a method and system for spatial optimization of vegetation carbon sinks based on interpretable machine learning. The method first acquires multi-source environmental data, including administrative divisions, environmental factors, and target variables for the target area, forming a spatial tabular dataset. Based on this dataset, an XGBoost regression model is trained to predict vegetation carbon sink capacity and evaluate model performance. The SHAP interpreter is then used to quantify the contribution of each environmental factor to carbon sink, generating feature importance and interpretability maps. The Lowes algorithm is used to fit the relationship curve between environmental factors and carbon sink response, extracting the optimal threshold interval. Furthermore, based on the optimization threshold, carbon sink gain is predicted, optimization zones are delineated, and a spatial optimization scheme is formed. Finally, a vegetation carbon sink optimization recommendation report is output. This method enables the scientific quantification of carbon sink spatial optimization, improving the interpretability and decision support value of carbon sink enhancement strategies. Attached Figure Description
[0057] Figure 1 A flowchart of a spatial optimization method for vegetation carbon sinks based on interpretable machine learning according to the present invention is shown.
[0058] Figure 2 The flowchart illustrating the generation of the spatial table dataset according to the present invention is shown;
[0059] Figure 3 The flowchart illustrating the generation of the feature importance ranking graph and SHAP summary graph according to the present invention is shown.
[0060] Figure 4 A block diagram of a vegetation carbon sink spatial optimization system based on interpretable machine learning according to the present invention is shown. Detailed Implementation
[0061] To better understand the above-mentioned objectives, features, and advantages of the present invention, the present invention will be further described in detail below with reference to the accompanying drawings and specific embodiments. It should be noted that, unless otherwise specified, the embodiments and features described in these embodiments can be combined with each other.
[0062] Many specific details are set forth in the following description in order to provide a full understanding of the invention. However, the invention may also be practiced in other ways different from those described herein, and therefore the scope of protection of the invention is not limited to the specific embodiments disclosed below.
[0063] Figure 1 The flowchart of a spatial optimization method for vegetation carbon sinks based on interpretable machine learning according to the present invention is shown.
[0064] like Figure 1 As shown, the first aspect of the present invention provides a spatial optimization method for vegetation carbon sinks based on interpretable machine learning, comprising:
[0065] S102, acquire multi-source environmental data of the target area, the multi-source environmental data including administrative division data, environmental factor data, and target variable data, perform spatial coordinate unification and resolution standardization processing on the multi-source environmental data, and generate a spatial table dataset;
[0066] S104, Train the XGBoost regression model using cross-validation and early stopping strategy based on the spatial table dataset, and predict the vegetation carbon sink in the target area based on the trained XGBoost regression model to determine the model performance data.
[0067] S106: Select a preset number of sampling points during the training process of the XGBoost regression model, calculate the contribution value of each environmental factor to vegetation carbon sink based on the SHAP interpreter, and generate a feature importance ranking map and a SHAP summary map.
[0068] S108, Fit the feature importance ranking graph and SHAP summary graph based on the LOWESS algorithm to determine the relationship curve between each environmental factor value and the SHAP value, and determine the optimization threshold range for each environmental factor based on the relationship curve;
[0069] S110, determine the optimized characteristic value of environmental factors according to the optimized threshold range, predict the vegetation carbon sink gain of the optimized characteristic value, obtain the predicted gain data, and determine the optimized partition according to the predicted gain data;
[0070] S112, Generate a vegetation carbon sink optimization suggestion report for the optimized partition based on the model performance data and the optimization threshold range of each environmental factor.
[0071] It should be noted that by acquiring and uniformly processing multi-source environmental data such as administrative divisions, environmental factors, and target variables of the target area, a spatial tabular dataset is generated. This achieves spatial fusion and standardization of data from different sources and with varying levels of precision, ensuring the accuracy and comparability of subsequent modeling. Cross-validation and early stopping strategies are used to train the XGBoost regression model for carbon sink prediction, effectively improving the model's generalization ability and prediction accuracy while avoiding overfitting, making the carbon sink estimation more reliable. The introduction of the SHAP interpreter during training not only reveals the causal effects under complex nonlinear relationships through quantitative analysis of the contribution of environmental factors to carbon sinks, but also generates visualized feature importance ranking and summary plots, thus realizing… This study demonstrates the transformation from a black-box model to an interpretable model. By fitting the SHAP results using the LOWESS algorithm, a smooth relationship curve between the values of each environmental factor and its contribution to carbon sequestration is obtained. This further identifies the optimal threshold range for factor effects, providing scientific boundary constraints for environmental regulation and carbon sequestration enhancement. Based on the optimized threshold range, the optimal characteristic values of environmental factors are determined, and carbon sequestration gains are predicted, achieving a quantitative assessment of potential carbon sequestration enhancement space. Furthermore, a spatial partitioning method is used to identify optimization priorities for different regions, forming a differentiated optimization layout. Finally, a carbon sequestration optimization recommendation report is generated by combining model performance data with the optimized threshold range, providing an intuitive and operable decision-making basis for regional ecological governance, vegetation restoration, and carbon sequestration management.
[0072] Figure 2 A flowchart illustrating the generation of spatial table datasets according to the present invention is shown.
[0073] According to an embodiment of the present invention, the acquisition of multi-source environmental data of the target area, including administrative division data, environmental factor data, and target variable data, and the spatial coordinate unification and resolution standardization processing of the multi-source environmental data to generate a spatial tabular dataset, specifically involves:
[0074] S202, Obtain administrative division data of the target area, the administrative division data including the boundary coordinate information of the target area, and standardize the target area into several regular grids according to a preset resolution based on the administrative division data;
[0075] S204, acquire environmental factor data for each grid cell in the target area within a historical preset time period. The environmental factor data includes precipitation, temperature, altitude, slope, normalized vegetation index, leaf area index, soil organic carbon content, soil clay content, land use intensity data, and nighttime light data.
[0076] S206, Obtain target variable data for each grid cell in the target area, wherein the target variable data is net ecosystem productivity;
[0077] S208, the coordinate system of the multi-source environmental data is converted into the WGS84 geographic coordinate system, and the environmental factor data and target variable data after the coordinate system is unified are extracted into the corresponding coordinate raster to generate spatial table data containing environmental factors and target variables.
[0078] It should be noted that by unifying multi-source environmental factor data and target variable data with different sources, resolutions, and coordinate systems into regularized spatial raster cells, a dataset with a standardized format and a unified coordinate system is formed. This achieves an accurate correspondence between environmental factors and target variables on the same spatial cell, avoiding calculation errors caused by spatial mismatch or scale inconsistency.
[0079] According to an embodiment of the present invention, the step of training an XGBoost regression model using cross-validation and an early stopping strategy based on the spatial table dataset, and predicting the vegetation carbon sink of the target area based on the trained XGBoost regression model to determine the model performance data, specifically includes:
[0080] Outlier analysis is performed on the spatial table data based on the interquartile range method. The first quartile and the third quartile of each environmental factor variable are calculated to obtain the interquartile range value. An outlier judgment threshold range is set, and data that are less than the first quartile minus a preset multiple or greater than the third quartile plus a preset multiple are marked as numerical outliers.
[0081] Outlier processing is performed on the numerical outliers, including replacing infinity with null values (NaN), replacing outliers with preset quantile values, and replacing missing values with the median.
[0082] The spatial table data after outlier processing is divided into 80% training set and 20% test set. The XGBoost regression model is initialized and the hyperparameters of the model are set, including learning rate, regularization coefficient, and maximum depth of decision tree.
[0083] The training set and test set are imported into the XGBoost regression model for training based on the k-fold cross-validation strategy. The maximum number of iterations and the number of early stopping rounds are set. Training is stopped when the model does not improve the accuracy of net ecosystem productivity prediction on the validation set within a preset number of consecutive iterations, and the trained XGBoost regression model is obtained.
[0084] The trained XGBoost regression model is used to predict vegetation carbon sink on the test set. The root mean square error, mean absolute error, and coefficient of determination between the predicted and actual values are calculated. The model performance is evaluated based on the root mean square error, mean absolute error, and coefficient of determination to obtain model performance data.
[0085] It should be noted that outlier detection and correction of the spatial table data using the interquartile range method significantly reduces noise interference by handling extreme outliers, invalid values, and missing values, ensuring the stability and reliability of the input data. Secondly, in the data partitioning stage, the cleaned dataset is reasonably divided into training and test sets to ensure that the model can be validated with independent samples while being trained, thereby obtaining objective performance evaluation. In the model construction process, the advantages of the XGBoost regression algorithm are utilized. Its gradient boosting-based ensemble learning framework can automatically capture the complex nonlinear relationship between environmental factors and vegetation carbon sinks and effectively handle the interaction between multi-dimensional variables. By setting hyperparameters such as learning rate, regularization coefficient, and tree depth, the model achieves a balance between fitting ability and generalization performance. Combined with the k-fold cross-validation strategy, the limited data can be fully utilized to avoid bias caused by the randomness of sample partitioning, while enhancing model stability. At the same time, an early stopping mechanism is introduced to terminate training when the performance on the validation set does not improve for several consecutive rounds, thereby effectively preventing overfitting. Finally, predictions were made on the test set based on the trained XGBoost model, and the results were evaluated using metrics such as root mean square error, mean absolute error, and coefficient of determination. This not only quantified the prediction accuracy but also ensured a high degree of consistency between the predicted results and the actual carbon sink. The first quartile is the value at the 25th percentile after arranging all data in ascending order, and the third quartile is the value at the 75th percentile. The training set includes a validation set, which consists of data randomly selected from the training set for verifying the accuracy of model training.
[0086] Figure 3 The flowchart illustrating the generation of the feature importance ranking graph and SHAP summary graph according to the present invention is shown.
[0087] According to an embodiment of the present invention, the step of selecting a preset number of sampling points during the training process of the XGBoost regression model, calculating the contribution value of each environmental factor to vegetation carbon sink based on the SHAP interpreter, and generating a feature importance ranking map and a SHAP summary map specifically involves:
[0088] S302, randomly select a preset number of sample data from the training input data of the trained XGBoost regression model as the SHAP analysis sample set. If the total number of samples is less than the preset number, all samples are selected.
[0089] S304. Create a SHAP interpreter object based on the XGBoost regression model. For each environmental factor of each sample, construct a benchmark reference value through the SHAP interpreter and evaluate the marginal contribution of the environmental factor to the model output in all feature subsets of the XGBoost regression model based on the Shapley value calculation method. Obtain the SHAP value of the environmental factor by weighted averaging the contribution values of all feature subsets.
[0090] S306, sort all environmental factors in descending order of their average absolute value of SHAP values to generate a feature importance ranking list of each environmental factor’s contribution to vegetation carbon sink prediction.
[0091] S308, Draw a SHAP summary diagram based on the SHAP value. The horizontal axis of the SHAP summary diagram is the SHAP value, and the vertical axis is the environmental factors sorted by importance. Each point in the diagram represents the distribution of the SHAP value of a sample on that environmental factor, and the color of the point reflects the magnitude of the environmental factor value of the sample.
[0092] S310, simultaneously generate a feature importance ranking bar chart, wherein the horizontal axis of the bar chart is the average absolute SHAP value, the vertical axis is the name of the environmental factor, and the length of the bar indicates the importance of each environmental factor.
[0093] It should be noted that, firstly, representative samples are extracted from the model training data to construct a SHAP analysis sample set, ensuring coverage of the typical value space of environmental factors. Subsequently, the created SHAP interpreter object systematically evaluates the marginal contribution of each environmental factor to the model output across all possible feature subsets by constructing a benchmark reference value. Specifically, this method is based on the Shapley value principle of cooperative game theory. It calculates the incremental impact of adding a certain environmental factor to different feature combinations on the prediction result, and then weights and averages the contributions of all subsets to finally obtain the SHAP value of that factor. This calculation method accurately reflects the independent role of each environmental factor in the model prediction and its interaction effects with other factors. Statistical analysis of the SHAP values of all samples not only yields a ranking list of the contributions of each environmental factor, but also visualizes the nonlinear relationship between factor values and SHAP values. The feature importance ranking bar chart intuitively presents the overall influence of each factor on carbon sink prediction, while the SHAP summary plot further reveals the changing patterns of each factor's contribution to carbon sink across different value ranges.
[0094] According to an embodiment of the present invention, the fitting of the feature importance ranking graph and the SHAP summary graph based on the LOWESS algorithm to determine the relationship curve between each environmental factor value and the SHAP value, and the determination of the optimization threshold range for each environmental factor based on the relationship curve, specifically involves:
[0095] Data cleaning was performed on the feature values and SHAP values corresponding to each environmental factor in the SHAP summary diagram to remove sample points containing missing or invalid values.
[0096] The LOWESS algorithm is used to perform local weighted regression fitting on the cleaned feature values and SHAP values to generate a smooth relationship curve between feature values and SHAP values.
[0097] Calculate the Spearman correlation coefficient between the characteristic values of each environmental factor and the SHAP value, and determine the positive or negative direction of the environmental factor's impact on vegetation carbon sink based on the sign of the correlation coefficient;
[0098] On the smooth relationship curve, identify continuous feature value intervals where the SHAP value is greater than zero. If there are multiple continuous intervals, select the interval with the largest mean SHAP value as the candidate optimization interval.
[0099] When the length of the candidate optimization interval is less than the preset minimum ecological interval threshold, the interval is expanded to both sides of the minimum ecological interval length with the median of the interval as the center to obtain the first optimization threshold interval.
[0100] If there is no interval with a SHAP value greater than zero on the smooth relationship curve, then the feature point corresponding to the maximum global SHAP value is selected as the center, and the minimum ecological interval centered on the feature point is constructed to obtain the second optimized threshold interval.
[0101] For each environmental factor, an optimized threshold interval visualization is generated, which simultaneously displays the original feature value-SHAP value scatter plot, LOWESS fitting curve, SHAP zero value reference line, and optimized threshold interval boundary markers.
[0102] The first or second optimized threshold interval of each environmental factor is compared with the original feature value distribution range. Interval boundary points that exceed the actual feature value range are removed, and the optimized threshold interval of each environmental factor is output.
[0103] It should be noted that the raw data was first cleaned to ensure the reliability of the analysis data. Then, the LOWESS local weighted regression algorithm was used to fit a smooth relationship curve between the feature values and the SHAP value, effectively capturing the complex nonlinear pattern of environmental factors' contribution to carbon sinks. The positive and negative directions of each factor's impact on carbon sinks were clarified by calculating the Spearman correlation coefficient. In the curve analysis stage, continuous feature value intervals with SHAP values greater than zero were prioritized for identification, indicating that environmental factors within this interval have a positive promoting effect on carbon sinks. If multiple effective intervals exist, the interval with the largest average contribution is selected as the candidate to ensure optimal optimization results. At the same time, a minimum ecological interval threshold constraint is introduced to avoid the infeasibility of ecological regulation due to excessively narrow intervals. When the candidate interval does not meet the length requirement, it is reasonably expanded. For cases where there is no obvious positive contribution interval, an optimization interval is constructed based on the global maximum SHAP value to ensure that all factors can obtain reasonable optimization suggestions. Finally, through visualization verification and actual feature value range validation, unreasonable interval boundaries are eliminated to ensure that the output optimization threshold interval not only conforms to the optimality of the mathematical model but also meets the feasibility and operability of the actual ecosystem. The smoothed relationship curve between eigenvalues and SHAP values is a continuous curve obtained by fitting the nonlinear relationship between the specific values of environmental factors and their corresponding SHAP contributions using the LOWESS (Locally Weighted Regression) algorithm. This curve reveals the influence pattern of environmental factors on vegetation carbon sinks in different value ranges, such as positive promotion, negative inhibition, or threshold effect. Compared with the discrete distribution of the original scatter plot, it clearly shows the overall trend between environmental factors and carbon sink contributions, such as a unimodal, monotonically increasing, or complex fluctuating relationship. The rising segment of the curve indicates that increasing the factor value can enhance carbon sink, while the falling segment means that excessive increase may have an inhibitory effect. The minimum ecological threshold range refers to the smallest effective range of values within which environmental factors can have a significant positive impact on vegetation carbon sinks in a real ecosystem.
[0104] According to an embodiment of the present invention, the step of determining the optimal characteristic value of environmental factors based on the optimal threshold range, predicting the vegetation carbon sink gain of the optimal characteristic value to obtain predicted gain data, and determining the optimal partition based on the predicted gain data specifically includes:
[0105] Select a preset number of key environmental factors from the feature importance ranking map, calculate the deviation distance between the current feature value of each key environmental factor in each grid of the target area and the boundary of the optimization threshold interval, and determine the optimization demand intensity based on the deviation distance;
[0106] The feature value corresponding to the maximum value of the SHAP value of each key environmental factor in each grid of the target area within the optimization threshold range is selected as the optimization feature value to form the optimization feature dataset;
[0107] The optimized feature dataset is imported into the trained XGBoost regression model to predict vegetation carbon sink, and the optimized net ecosystem productivity prediction value is obtained. The difference between the net ecosystem productivity before and after optimization is calculated as the carbon sink gain potential value.
[0108] If the potential value of carbon sink gain is greater than the preset ratio of net ecosystem productivity before optimization, the environmental factor is taken as the environmental factor to be optimized, and the quantity information of the environmental factor to be optimized is counted.
[0109] The optimization zones are determined based on the carbon sink gain potential value, optimization demand intensity, and number of environmental factors to be optimized for each grid in the target area. Based on the carbon sink gain potential value and environmental factors to be optimized for each optimization zone, a spatial distribution map of carbon sink potential gain, a heat map of key feature optimization demand, and a suggested optimization zone map are drawn.
[0110] It should be noted that, firstly, key environmental factors are selected based on feature importance ranking. By calculating the deviation between the current feature value and the optimization threshold range, the optimization demand intensity of each region is quantified, reflecting the urgency of ecological regulation. Simultaneously, the feature value corresponding to the largest SHAP value of each factor is selected to construct an optimization feature dataset, ensuring that the adopted optimization value has the maximum carbon sink gain effect. The optimized feature data is input into a trained XGBoost model to predict carbon sink potential. By comparing the difference in net ecosystem productivity before and after optimization, the theoretical improvement space of each region is objectively assessed. Further, combined with ecological practice needs, environmental factors with significant gains are selected as optimization targets and their numbers are counted, forming a complete assessment of optimization elements. Finally, a three-dimensional decision model is constructed, including carbon sink gain potential value, optimization demand intensity, and the number of factors to be optimized. A weighted priority algorithm is used to divide the target area into four levels: no optimization demand area, improvement potential area, key improvement area, and key transformation area. The priority calculation comprehensively considers carbon sink benefit, ecological demand, and their interaction, ensuring that the zoning results reflect both theoretical gains and practical feasibility. Accompanying spatial distribution maps, heat maps, and zoning suggestion maps visually present the key optimization areas and regulation directions. The priority calculation based on the carbon sink gain potential and the number of environmental factors to be optimized is as follows:
[0111] ,
[0112] in, This represents the potential value for carbon sequestration gains. This represents the maximum potential gain value (the difference between the current carbon sink value and the maximum carbon sink value of the ecosystem obtained during the ecological survey). The number of environmental factors to be optimized To maximize the number of required parameters (i.e., the total number of key environmental factors selected from the preset parameters). Based on... The value divides the area into 4 levels:
[0113] ;
[0114] According to an embodiment of the present invention, the step of generating a vegetation carbon sequestration optimization suggestion report for an optimized zone based on the model performance data and the optimization threshold range of each environmental factor specifically includes:
[0115] Based on the model performance data and the optimization threshold range for each environmental factor, a vegetation carbon sink optimization suggestion report for the optimized zone is generated.
[0116] The vegetation carbon sink optimization suggestion report includes the environmental factors to be optimized, optimization direction, optimization priority, carbon sink gain potential value, carbon sink potential gain spatial distribution map, key feature optimization demand heat map and optimization zoning suggestion map for each grid in the target area.
[0117] It is important to note that the interpretability analysis results of machine learning models are transformed into actionable ecological engineering guidelines. By integrating model performance validation data with environmental factor optimization threshold ranges, the generated optimization recommendation report achieves a complete transformation from theoretical calculation to practical application. The model performance data ensures the scientific credibility of the recommendations, while the optimization threshold ranges provide specific regulatory parameters. The report systematically includes a spatially explicit list of optimization elements, a quantitative priority ranking, and a visualized potential distribution, enabling decision-makers to intuitively identify optimization priorities in different regions: the list of environmental factors to be optimized clarifies the specific ecological elements requiring intervention; the optimization direction indicates the regulatory trend of increasing or decreasing characteristic values; the optimization priority reflects the sequence of implementation in different regions; the carbon sink gain potential value quantifies the expected ecological benefits; and three types of thematic maps present the allocation strategies for optimization resources through spatial visualization.
[0118] According to an embodiment of the present invention, it further includes:
[0119] After obtaining multi-source environmental data with unified spatial coordinates, extract the center point coordinates of each data layer, calculate the center point offset between adjacent grids, and generate a grid offset distribution map.
[0120] An offset compensation matrix is constructed based on the grid offset distribution map. A bilinear interpolation algorithm is used to resample the pixel values of grids with offsets exceeding the threshold to generate a compensated grid data layer.
[0121] The compensated raster data layers are overlaid and matched with the standard raster template of the target resolution. Local interpolation is performed to fill the missing edge pixels that appear during the matching process, generating a spatially aligned multi-source environmental dataset.
[0122] Based on the spatially aligned multi-source environmental dataset, the environmental factor values of each raster cell are extracted, and an environmental factor matrix containing a unified spatial reference system is constructed.
[0123] According to an embodiment of the present invention, the step of constructing an offset compensation matrix based on a raster offset distribution map, and resampling the pixel values of rasteres with offsets exceeding a threshold using a bilinear interpolation algorithm to generate a compensated raster data layer, specifically involves:
[0124] The horizontal and vertical offsets of each data layer relative to the standard raster template are calculated based on the raster offset distribution map, and the offsets are decomposed into integer cell offsets and fractional cell offsets.
[0125] For integer pixel offsets, a raster-wide translation strategy is used for compensation, and for fractional pixel offsets, a bilinear interpolation weight matrix is constructed.
[0126] The original raster cell values are weighted according to the bilinear interpolation weight matrix to generate compensated cell values. Edge cell verification is performed on the compensated raster data layer to detect invalid or outlier values introduced during the compensation process.
[0127] Based on the detection results, invalid values are filled with the mean value of neighboring pixels to generate the final compensated raster data layer.
[0128] The compensated raster data layer is compared pixel by pixel with the standard raster template, and a pixel alignment accuracy report is output. The compensation parameters are then iteratively optimized based on the alignment accuracy report.
[0129] It should be noted that spatial standardization of multi-source environmental data is a crucial foundational step in vegetation carbon sink spatial optimization research. However, in practical applications, remote sensing images and ground observation data from different sources often use different acquisition devices and coordinate systems, leading to slight misalignments in the raster boundaries of each data layer even after coordinate unification. This raster misalignment directly affects the accuracy of subsequent environmental factor extraction, especially when fusing data at different resolutions. The offset of edge pixels can cause spatial matching errors between key parameters such as vegetation indices and topographic factors, thereby reducing the reliability of carbon sink prediction models. The dynamic raster alignment compensation method proposed in this invention effectively solves this problem by accurately calculating the offset of each data layer relative to the standard template and employing a hierarchical compensation strategy. This method first generates an offset distribution map through raster center point coordinate analysis, and then compensates for integer and decimal pixel offsets using overall translation and bilinear interpolation, respectively. This not only ensures the consistency of data spatial location but also ensures the integrity of the compensated data through edge pixel verification and neighborhood filling mechanisms, significantly improving the spatial alignment accuracy of multi-source data.
[0130] Figure 4 A block diagram of a vegetation carbon sink spatial optimization system based on interpretable machine learning according to the present invention is shown.
[0131] A second aspect of the present invention also provides a vegetation carbon sink space optimization system based on interpretable machine learning. The system includes: a memory 401, a processor 402, and a communication interface 403. The memory includes a vegetation carbon sink space optimization method program based on interpretable machine learning. The communication interface is used for data connection and communication between the memory and the processor. When the vegetation carbon sink space optimization method program based on interpretable machine learning is executed by the processor, the following steps are implemented:
[0132] Acquire multi-source environmental data for the target area, including administrative division data, environmental factor data, and target variable data. Perform spatial coordinate unification and resolution standardization on the multi-source environmental data to generate a spatial tabular dataset.
[0133] Based on the spatial table dataset, an XGBoost regression model is trained using cross-validation and early stopping strategies. The trained XGBoost regression model is then used to predict the vegetation carbon sink in the target area to determine the model performance data.
[0134] A preset number of sampling points were selected during the training process of the XGBoost regression model. Based on the SHAP interpreter, the contribution value of each environmental factor to vegetation carbon sink was calculated, and a feature importance ranking map and a SHAP summary map were generated.
[0135] The feature importance ranking graph and SHAP summary graph are fitted based on the LOWESS algorithm to determine the relationship curve between each environmental factor value and the SHAP value, and the optimization threshold range of each environmental factor is determined based on the relationship curve.
[0136] The optimal characteristic value of environmental factors is determined based on the optimized threshold range, the vegetation carbon sink gain of the optimized characteristic value is predicted, the predicted gain data is obtained, and the optimized zoning is determined based on the predicted gain data.
[0137] Based on the model performance data and the optimization threshold range for each environmental factor, a vegetation carbon sink optimization suggestion report is generated for the optimized partition.
[0138] This invention discloses a method and system for spatial optimization of vegetation carbon sinks based on interpretable machine learning. The method first acquires multi-source environmental data, including administrative divisions, environmental factors, and target variables for the target area, forming a spatial tabular dataset. Based on this dataset, an XGBoost regression model is trained to predict vegetation carbon sink capacity and evaluate model performance. The SHAP interpreter is then used to quantify the contribution of each environmental factor to carbon sink, generating feature importance and interpretability maps. The Lowes algorithm is used to fit the relationship curve between environmental factors and carbon sink response, extracting the optimal threshold interval. Furthermore, based on the optimization threshold, carbon sink gain is predicted, optimization zones are delineated, and a spatial optimization scheme is formed. Finally, a vegetation carbon sink optimization recommendation report is output. This method enables the scientific quantification of carbon sink spatial optimization, improving the interpretability and decision support value of carbon sink enhancement strategies.
[0139] In the several embodiments provided in this application, it should be understood that the disclosed devices and methods can be implemented in other ways. The device embodiments described above are merely illustrative. For example, the division of units is only a logical functional division, and in actual implementation, there may be other division methods, such as: multiple units or components can be combined, or integrated into another system, or some features can be ignored or not executed. In addition, the coupling, direct coupling, or communication connection between the various components shown or discussed can be through some interfaces, and the indirect coupling or communication connection between devices or units can be electrical, mechanical, or other forms.
[0140] The units described above as separate components may or may not be physically separate. The components shown as units may or may not be physical units. They may be located in one place or distributed across multiple network units. Some or all of the units may be selected to achieve the purpose of this embodiment according to actual needs.
[0141] In addition, in the various embodiments of the present invention, each functional unit can be integrated into one processing unit, or each unit can be a separate unit, or two or more units can be integrated into one unit; the integrated unit can be implemented in hardware or in the form of hardware plus software functional units.
[0142] Those skilled in the art will understand that all or part of the steps of the above method embodiments can be implemented by hardware related to program instructions. The aforementioned program can be stored in a computer-readable storage medium. When the program is executed, it performs the steps of the above method embodiments. The aforementioned storage medium includes various media capable of storing program code, such as mobile storage devices, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
[0143] Alternatively, if the integrated units of this invention are implemented as software functional modules and sold or used as independent products, they can also be stored in a computer-readable storage medium. Based on this understanding, the technical solutions of the embodiments of this invention, or the parts that contribute to the prior art, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the methods described in the various embodiments of this invention. The aforementioned storage medium includes various media capable of storing program code, such as mobile storage devices, ROM, RAM, magnetic disks, or optical disks.
[0144] The above description is merely a specific embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the technical scope disclosed in the present invention should be included within the scope of protection of the present invention. Therefore, the scope of protection of the present invention should be determined by the scope of the claims.
Claims
1. A vegetation carbon sink space optimization method based on interpretable machine learning, characterized in that, Includes the following steps: Acquire multi-source environmental data for the target area, including administrative division data, environmental factor data, and target variable data. Perform spatial coordinate unification and resolution standardization on the multi-source environmental data to generate a spatial table dataset. Based on the spatial table dataset, an XGBoost regression model is trained using cross-validation and early stopping strategies. The trained XGBoost regression model is then used to predict the vegetation carbon sink in the target area to determine the model performance data. A preset number of sampling points were selected during the training process of the XGBoost regression model. Based on the SHAP interpreter, the contribution value of each environmental factor to vegetation carbon sink was calculated, and a feature importance ranking map and a SHAP summary map were generated. The feature importance ranking graph and SHAP summary graph are fitted using the LOWESS algorithm to determine the relationship curve between each environmental factor value and the SHAP value. Based on the relationship curve, the optimization threshold range for each environmental factor is determined, specifically as follows: The LOWESS algorithm is used to perform local weighted regression fitting on the cleaned feature values and SHAP values to generate a smooth relationship curve between feature values and SHAP values. Calculate the Spearman correlation coefficient between the characteristic values of each environmental factor and the SHAP value, and determine the positive or negative direction of the environmental factor's impact on vegetation carbon sink based on the sign of the correlation coefficient; On the smooth relationship curve, identify continuous feature value intervals where the SHAP value is greater than zero. If there are multiple continuous intervals, select the interval with the largest mean SHAP value as the candidate optimization interval. When the length of the candidate optimization interval is less than the preset minimum ecological interval threshold, the interval is expanded to both sides of the minimum ecological interval length with the median of the interval as the center to obtain the first optimization threshold interval. If there is no interval with a SHAP value greater than zero on the smooth relationship curve, then the feature point corresponding to the maximum global SHAP value is selected as the center, and the minimum ecological interval centered on the feature point is constructed to obtain the second optimized threshold interval. Based on the optimization threshold range, the optimized characteristic values of environmental factors are determined, the vegetation carbon sequestration gain of the optimized characteristic values is predicted, and the predicted gain data is obtained. Based on the predicted gain data, the optimization zones are determined, specifically as follows: Select a preset number of key environmental factors from the feature importance ranking map, calculate the deviation distance between the current feature value of each key environmental factor in each grid of the target area and the boundary of the optimization threshold interval, and determine the optimization demand intensity based on the deviation distance; The feature value corresponding to the maximum value of the SHAP value of each key environmental factor in each grid of the target area within the optimization threshold range is selected as the optimization feature value to form the optimization feature dataset; The optimized feature dataset is imported into the trained XGBoost regression model to predict vegetation carbon sink, and the optimized net ecosystem productivity prediction value is obtained. The difference between the net ecosystem productivity before and after optimization is calculated as the carbon sink gain potential value. If the potential value of carbon sink gain is greater than the preset ratio of net ecosystem productivity before optimization, the environmental factor is taken as the environmental factor to be optimized, and the quantity information of the environmental factor to be optimized is counted. The optimization zones are determined based on the carbon sink gain potential value, optimization demand intensity, and number of environmental factors to be optimized for each grid in the target area. Based on the carbon sink gain potential value and environmental factors to be optimized for each optimization zone, a spatial distribution map of carbon sink potential gain, a heat map of key feature optimization demand, and a suggested optimization zone map are drawn. Based on the model performance data and the optimization threshold range for each environmental factor, a vegetation carbon sink optimization suggestion report is generated for the optimized partition.
2. The vegetation carbon sink spatial optimization method based on interpretable machine learning according to claim 1, characterized in that, The process involves acquiring multi-source environmental data for the target area, including administrative division data, environmental factor data, and target variable data. Spatial coordinate unification and resolution standardization are then performed on the multi-source environmental data to generate a spatial tabular dataset. Specifically: Obtain administrative division data of the target area, including boundary coordinate information of the target area; and standardize the target area into several regular grids according to a preset resolution based on the administrative division data. The environmental factor data of each grid cell in the target area within a preset historical time period are obtained. The environmental factor data includes precipitation, temperature, altitude, slope, normalized vegetation index, leaf area index, soil organic carbon content, soil clay content, land use intensity data, and nighttime light data. Acquire target variable data for each grid cell in the target area, where the target variable data is net ecosystem productivity; The coordinate system of the multi-source environmental data is converted to the WGS84 geographic coordinate system. The environmental factor data and target variable data after the coordinate system is unified are extracted into the corresponding coordinate raster to generate spatial table data containing environmental factors and target variables.
3. The vegetation carbon sink spatial optimization method based on interpretable machine learning according to claim 1, characterized in that, The process involves training an XGBoost regression model using cross-validation and an early stopping strategy based on the spatial table dataset, predicting the vegetation carbon sink in the target area based on the trained XGBoost regression model, and determining the model performance data. Specifically: Outlier analysis is performed on the spatial table data based on the interquartile range method. The first quartile and the third quartile of each environmental factor variable are calculated to obtain the interquartile range value. An outlier judgment threshold range is set, and data that are less than the first quartile minus a preset multiple or greater than the third quartile plus a preset multiple are marked as numerical outliers. Outlier processing is performed on the numerical outliers, including replacing infinity with null values (NaN), replacing outliers with preset quantile values, and replacing missing values with the median. The spatial table data after outlier processing is divided into 80% training set and 20% test set. The XGBoost regression model is initialized and the hyperparameters of the model are set, including learning rate, regularization coefficient, and maximum depth of decision tree. The training set and test set are imported into the XGBoost regression model for training based on the k-fold cross-validation strategy. The maximum number of iterations and the number of early stopping rounds are set. Training is stopped when the model does not improve the accuracy of net ecosystem productivity prediction on the validation set within a preset number of consecutive iterations, and the trained XGBoost regression model is obtained. The trained XGBoost regression model is used to predict vegetation carbon sink on the test set. The root mean square error, mean absolute error, and coefficient of determination between the predicted and actual values are calculated. The model performance is evaluated based on the root mean square error, mean absolute error, and coefficient of determination to obtain model performance data.
4. The vegetation carbon sink spatial optimization method based on interpretable machine learning according to claim 1, characterized in that, The process involves selecting a preset number of sampling points during the XGBoost regression model training process, calculating the contribution of each environmental factor to vegetation carbon sink based on the SHAP interpreter, and generating a feature importance ranking map and a SHAP summary map. Specifically: A predetermined number of sample data are randomly selected from the training input data of the trained XGBoost regression model as the SHAP analysis sample set. If the total number of samples is less than the predetermined number, all samples are selected. Create a SHAP interpreter object based on the XGBoost regression model. For each environmental factor of each sample, construct a benchmark reference value through the SHAP interpreter and evaluate the marginal contribution of the environmental factor to the model output in all feature subsets of the XGBoost regression model based on the Shapley value calculation method. Obtain the SHAP value of the environmental factor by weighted averaging the contribution values of all feature subsets. All environmental factors are sorted in descending order according to the average absolute value of their SHAP values to generate a feature importance ranking list of the contribution of each environmental factor to the prediction of vegetation carbon sink. A SHAP summary graph is plotted based on the SHAP values. The horizontal axis of the SHAP summary graph represents the SHAP values, and the vertical axis represents the environmental factors sorted by importance. Each point in the graph represents the distribution of SHAP values of a sample on that environmental factor, and the color of the point reflects the magnitude of the environmental factor value of that sample. Simultaneously, a feature importance ranking bar chart is generated, where the horizontal axis of the bar chart is the average absolute SHAP value, the vertical axis is the name of the environmental factor, and the length of the bar indicates the importance of each environmental factor.
5. The vegetation carbon sink spatial optimization method based on interpretable machine learning according to claim 1, characterized in that, The process of fitting the feature importance ranking map and SHAP summary map based on the LOWESS algorithm to determine the relationship curve between each environmental factor value and the SHAP value, and determining the optimization threshold range for each environmental factor based on the relationship curve, further includes: Data cleaning was performed on the feature values and SHAP values corresponding to each environmental factor in the SHAP summary diagram to remove sample points containing missing or invalid values. For each environmental factor, an optimized threshold interval visualization is generated, which simultaneously displays the original feature value-SHAP value scatter plot, LOWESS fitting curve, SHAP zero value reference line, and optimized threshold interval boundary markers. The first or second optimized threshold interval of each environmental factor is compared with the original feature value distribution range. Interval boundary points that exceed the actual feature value range are removed, and the optimized threshold interval of each environmental factor is output.
6. The vegetation carbon sink spatial optimization method based on interpretable machine learning according to claim 1, characterized in that, The step of generating a vegetation carbon sequestration optimization suggestion report for the optimized zone based on the model performance data and the optimization threshold range of each environmental factor is as follows: Based on the model performance data and the optimization threshold range for each environmental factor, a vegetation carbon sink optimization suggestion report for the optimized zone is generated. The vegetation carbon sink optimization suggestion report includes the environmental factors to be optimized, optimization direction, optimization priority, carbon sink gain potential value, carbon sink potential gain spatial distribution map, key feature optimization demand heat map and optimization zoning suggestion map for each grid in the target area.
7. A vegetation carbon sink spatial optimization system based on interpretable machine learning, characterized in that, The vegetation carbon sink space optimization system based on interpretable machine learning includes a storage device and a processor. The storage device includes a vegetation carbon sink space optimization method program based on interpretable machine learning. When the vegetation carbon sink space optimization method program based on interpretable machine learning is executed by the processor, it performs the following steps: Acquire multi-source environmental data for the target area, including administrative division data, environmental factor data, and target variable data. Perform spatial coordinate unification and resolution standardization on the multi-source environmental data to generate a spatial table dataset. Based on the spatial table dataset, an XGBoost regression model is trained using cross-validation and early stopping strategies. The trained XGBoost regression model is then used to predict the vegetation carbon sink in the target area to determine the model performance data. A preset number of sampling points were selected during the training process of the XGBoost regression model. Based on the SHAP interpreter, the contribution value of each environmental factor to vegetation carbon sink was calculated, and a feature importance ranking map and a SHAP summary map were generated. The feature importance ranking graph and SHAP summary graph are fitted using the LOWESS algorithm to determine the relationship curve between each environmental factor value and the SHAP value. Based on the relationship curve, the optimization threshold range for each environmental factor is determined, specifically as follows: The LOWESS algorithm is used to perform local weighted regression fitting on the cleaned feature values and SHAP values to generate a smooth relationship curve between feature values and SHAP values. Calculate the Spearman correlation coefficient between the characteristic values of each environmental factor and the SHAP value, and determine the positive or negative direction of the environmental factor's impact on vegetation carbon sink based on the sign of the correlation coefficient; On the smooth relationship curve, identify continuous feature value intervals where the SHAP value is greater than zero. If there are multiple continuous intervals, select the interval with the largest mean SHAP value as the candidate optimization interval. When the length of the candidate optimization interval is less than the preset minimum ecological interval threshold, the interval is expanded to both sides of the minimum ecological interval length with the median of the interval as the center to obtain the first optimization threshold interval. If there is no interval with a SHAP value greater than zero on the smooth relationship curve, then the feature point corresponding to the maximum global SHAP value is selected as the center, and the minimum ecological interval centered on the feature point is constructed to obtain the second optimized threshold interval. Based on the optimization threshold range, the optimized characteristic values of environmental factors are determined, the vegetation carbon sequestration gain of the optimized characteristic values is predicted, and the predicted gain data is obtained. Based on the predicted gain data, the optimization zones are determined, specifically as follows: Select a preset number of key environmental factors from the feature importance ranking map, calculate the deviation distance between the current feature value of each key environmental factor in each grid of the target area and the boundary of the optimization threshold interval, and determine the optimization demand intensity based on the deviation distance; The feature value corresponding to the maximum value of the SHAP value of each key environmental factor in each grid of the target area within the optimization threshold range is selected as the optimization feature value to form the optimization feature dataset; The optimized feature dataset is imported into the trained XGBoost regression model to predict vegetation carbon sink, and the optimized net ecosystem productivity prediction value is obtained. The difference between the net ecosystem productivity before and after optimization is calculated as the carbon sink gain potential value. If the potential value of carbon sink gain is greater than the preset ratio of net ecosystem productivity before optimization, the environmental factor is taken as the environmental factor to be optimized, and the quantity information of the environmental factor to be optimized is counted. The optimization zones are determined based on the carbon sink gain potential value, optimization demand intensity, and number of environmental factors to be optimized for each grid in the target area. Based on the carbon sink gain potential value and environmental factors to be optimized for each optimization zone, a spatial distribution map of carbon sink potential gain, a heat map of key feature optimization demand, and a suggested optimization zone map are drawn. Based on the model performance data and the optimization threshold range for each environmental factor, a vegetation carbon sink optimization suggestion report is generated for the optimized partition.
8. A vegetation carbon sink spatial optimization system based on interpretable machine learning according to claim 7, characterized in that, The step of generating a vegetation carbon sequestration optimization suggestion report for the optimized zone based on the model performance data and the optimization threshold range of each environmental factor is as follows: Based on the model performance data and the optimization threshold range for each environmental factor, a vegetation carbon sink optimization suggestion report for the optimized zone is generated. The vegetation carbon sink optimization suggestion report includes the environmental factors to be optimized, optimization direction, optimization priority, carbon sink gain potential value, carbon sink potential gain spatial distribution map, key feature optimization demand heat map and optimization zoning suggestion map for each grid in the target area.
Citation Information
Patent Citations
Soil organic carbon density space non-stationary dominant factor identification and high-resolution mapping method
CN120298535A
Regulation factor threshold effect evaluation method and device for vegetation response sudden drought characteristics, equipment and storage medium
CN120542717A