A method to reveal the nonlinear impacts of ecological services in karst areas
By analyzing the ecosystem service data and driver data in the karst area, using XGBoost model and SHAP values to identify causal relationships, the problem of low nonlinear impact analysis of ecosystem services in the existing technology is solved, and the accuracy of the analysis is improved. Adaptability.
Patent Information
- Application Number
- CN202411364591.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-29
- Publication Date
- 2024-12-03
- Estimated Expiration
- 2044-09-29
AI Technical Summary
In the prior art, the nonlinear impact analysis of ecosystem services in karst areas has low accuracy and poor adaptability, making it difficult to accurately understand the impact of driving factors such as human activities and climate change on ecosystem services.
By obtaining ecosystem service data and driver factor data in karst areas, building a box chart, calculating coefficient of variation and degree of dispersion, determining stability indicators, screening causal relationships, extracting driver features using XGBoost model, calculating SHAP average, and optimizing the model to determine Relationship between drivers under different threshold ranges and ecosystem service data response.
It improves the accuracy and adaptability of nonlinear impact analysis of ecosystem services, can more accurately identify the causal relationship between drivers and ecosystem services, and provides a more accurate research framework.
Smart Images

Figure CN118885984B_ABST
Abstract
Description
Technical Field
[0001] The invention relates to the technical field of electrical data processing, and in particular to a method for revealing the nonlinear impact of ecological services in karst areas. Background Art
[0002] The karst region is a complex regional system. Limited natural resources, fragile ecological environment, backward social economy and tense human-land relationship have always restricted regional development. In existing technologies, data on driving factors such as human activities, climate change, and natural topography in the region have a strong nonlinear relationship with major ecosystem services (carbon fixation, habitat quality, net primary productivity, soil conservation and water production). In addition, there are many types of data and a large amount of data redundancy, which leads to low accuracy and poor adaptability of nonlinear impact analysis of ecosystem services. Only by obtaining accurate nonlinear impact relationships of ecosystem services can we provide a research framework and method that can be used as a reference for regions with similar geographical environments.
[0003] Therefore, how to improve the accuracy and adaptability of nonlinear impact analysis of ecosystem services is a technical problem that needs to be solved. Summary of the invention
[0004] The purpose of the present invention is to solve the problems of low accuracy and poor adaptability of nonlinear impact analysis of ecosystem services in the prior art, and to propose a method for revealing the nonlinear impact of ecosystem services in karst areas.
[0005] In order to achieve the above object, the present invention adopts the following technical solutions:
[0006] A method to reveal the nonlinear impacts of ecological services in karst areas, including:
[0007] Obtain ecosystem service data and driving factor data in the karst area, construct box plots for each ecosystem service data and each driving factor data to determine their respective dispersion levels, calculate the coefficient of variation for each ecosystem service data and each driving factor data, and determine the stability index for each ecosystem service data and each driving factor data based on the coefficient of variation and dispersion level;
[0008] Combine each ecosystem service data and each driver data in pairs to obtain a combination list of ecosystem service data and driver data. Determine the causal indicator threshold corresponding to each data combination in the combination list based on the stability indicators of the two, and mark them in the combination list. Screen the driver data through the causal indicators and causal indicator thresholds of each data combination in the combination list, so as to determine the driver data and ecosystem service data with causal relationship.
[0009] The causal relationship between driver data and ecosystem service data was standardized, driver features were extracted based on the driver data, and an XGBoost model was established. The SHAP average of each driver feature for the causal relationship between the driver feature and the ecosystem service data was calculated through the XGBoost model.
[0010] Each driving feature in each causal relationship is sorted according to the SHAP average value, and the first driving feature and the second driving feature are screened out. The XGBoost model is optimized through the first driving feature, and the second driving feature is split to obtain the corresponding driving factor data. The SHAP value of the second driving feature and the change curve of these driving factor data are constructed to determine the response relationship between the driving factor data and the ecosystem service data under different threshold ranges.
[0011] In some embodiments of the present application, the stability index of each ecosystem service data and each driving factor data is determined according to the coefficient of variation and the degree of dispersion, including:
[0012] ;
[0013] in, data on ecosystem services or drivers, , are the stable conversion coefficients of the coefficient of variation and the degree of dispersion, is the coefficient of variation, is the degree of dispersion in the box plot, IQR is the interquartile range in the box plot, is the difference between the upper and lower quartile ranges in the box plot, for The larger of is a preset constant.
[0014] In some embodiments of the present application, the causal index threshold corresponding to each data combination in the combination list is determined according to the stability index of the two, including:
[0015] Each ecosystem service data and each driving factor data has a corresponding stability indicator, which are recorded as the first stability indicator and the second stability indicator respectively.
[0016] Configure the original causal indicator threshold of each data combination in the combination list, calculate the weighted average of the first stability indicator and the second stability indicator, and respectively calculate the distance from the first stability indicator to the weighted average and the distance from the second stability indicator to the weighted average. Use the smaller of the two distances as the proximity indicator, calculate the average of the proximity indicator and the weighted average, and then adjust the original causal indicator threshold by the average. The adjusted original causal indicator threshold is used as the causal indicator threshold corresponding to each data combination.
[0017] In some embodiments of the present application, the driving factor data is screened by combining the causal indicators and causal indicator thresholds of each data combination in the list to determine the driving factor data and ecosystem service data with causal relationships, including:
[0018] Map the driver data and ecosystem service data in each data combination into the cause state space and the effect state space respectively;
[0019] Determine the causal indicators of each data combination based on the data sample points in the cause state space and the effect state space, where the cause is the driving factor data and the effect is the ecosystem service data;
[0020] If the causal index of a data combination is greater than the causal index threshold, the data combination is retained;
[0021] Otherwise, eliminate the data combination;
[0022] This completes the screening of driving factor data, and the retained data are combined into driving factor data and ecosystem service data with causal relationships.
[0023] In some embodiments of the present application, the SHAP average value of each driving feature for the ecosystem service data with which it has a causal relationship is calculated by the XGBoost model, including:
[0024] The ecosystem service data and driving factor data of the validation set were divided into multiple samples, and the SHAP value of each driving feature in each sample was calculated;
[0025] The first prediction value of the ecosystem service data in a certain sample is calculated by the XGBoost model, a certain feature is masked, and then the second prediction value of the ecosystem service data with a feature missing in the sample is calculated by the XGBoost model. The predicted contribution value of the feature in this sample is determined according to the difference between the first prediction value and the second prediction value. The predicted contribution value is the SHAP value of the feature in the sample.
[0026] The SHAP values of the driving features in all samples are calculated to obtain the SHAP average value of each driving feature.
[0027] In some embodiments of the present application, each driving feature in each causal relationship is sorted according to the SHAP average value, and the first driving feature and the second driving feature are screened out, including:
[0028] A ranking order is set according to the type of ecosystem service data in each causal relationship. According to the ranking order, the first several driving features among the driving features sorted by the SHAP average value are used as the second driving features, and the other driving features ranked behind the ranking order are used as the first driving features.
[0029] In some embodiments of the present application, the XGBoost model is optimized by the first driving feature, including:
[0030] ;
[0031] in, is the loss function after the i-th optimization, is the loss function after the i-1th optimization, n is the number of the first driving features optimized for the i-th time, is the optimization weight of the j-th driving feature of the i-th optimization, is the SHAP value of the j-th driver feature optimized for the i-th time, is the compensation constant of the i-th optimization.
[0032] In some embodiments of the present application, a change curve of the SHAP value of the second driving feature and these driving factor data is constructed to determine the response relationship between the driving factor data and the ecosystem service data under different threshold ranges, including:
[0033] The optimized XGBoost model is used to construct a change curve of the SHAP value of the second driving feature and its driving factor data, and multiple inflection points are determined in the change curve. The distance on both sides is determined according to the absolute value of the slope at the inflection point. Within the distance on both sides, multiple marking points are selected, and the marking points with higher slope changes are screened out through the slope changes of two adjacent marking points among the multiple marking points. Different threshold ranges of the driving factor data are determined based on the screened marking points, and the change curves corresponding to these threshold ranges are intercepted, so as to determine the response relationship between the driving factor data and the ecosystem service data under different threshold ranges.
[0034] By applying the above scheme, the ecosystem service data and driving factor data of the karst area are obtained, and box plots of each ecosystem service data and each driving factor data are constructed to determine their respective discrete degrees. The coefficient of variation of each ecosystem service data and each driving factor data is calculated, and the stability index of each ecosystem service data and each driving factor data is determined according to the coefficient of variation and the degree of dispersion; each ecosystem service data and each driving factor data are combined in pairs to obtain a combination list of ecosystem service data-driving factor data, and the causal indicator threshold corresponding to each data combination in the combination list is determined according to the stability index of the two, and it is marked in the combination list, and the driving factor data is screened by the causal indicator and causal indicator threshold of each data combination in the combination list, so as to determine whether there is causal relationship. The driving factor data and ecosystem service data of the relationship are standardized, the driving factor data and ecosystem service data with causal relationship are extracted based on the driving factor data, and the XGBoost model is established. The SHAP average value of each driving feature for the ecosystem service data with causal relationship is calculated through the XGBoost model; each driving feature in each causal relationship is sorted according to the SHAP average value, the first driving feature and the second driving feature are screened out, the XGBoost model is optimized by the first driving feature, the second driving feature is split to obtain the corresponding driving factor data, and the SHAP value of the second driving feature and the change curve of these driving factor data are constructed, so as to determine the response relationship between the driving factor data and the ecosystem service data under different threshold ranges. This application determines the causal indicator threshold corresponding to each data combination in the combination list according to the stability index of the two, and sets a reasonable causal indicator threshold according to the stability of the two types of data, so as to accurately and reasonably screen the driving factor data with strong causal relationship. The SHAP values of different driving features are determined, and the XGBoost model is optimized according to the SHAP value and the response relationship between the driving factor data and the ecosystem service data is constructed, which improves the accuracy and adaptability of the nonlinear impact relationship analysis of the ecosystem service data. BRIEF DESCRIPTION OF THE DRAWINGS
[0035] Figure 1 A schematic flow chart of a method for revealing the nonlinear impact of ecological services in karst areas proposed by the present invention;
[0036] Figure 2 This is a flow chart of the calculation process of the SHAP value in a method for revealing the nonlinear impact of ecological services in karst areas proposed by the present invention. DETAILED DESCRIPTION
[0037] The technical solutions in the embodiments of the present invention will be described clearly and completely below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, rather than all the embodiments.
[0038] Reference Figure 1 , a method to reveal the nonlinear effects of ecological services in karst areas, including the following steps:
[0039] Step S101, obtaining ecosystem service data and driving factor data in the karst area, constructing box plots of each ecosystem service data and each driving factor data to determine their respective dispersion levels, calculating the coefficient of variation of each ecosystem service data and each driving factor data, and determining the stability index of each ecosystem service data and each driving factor data according to the coefficient of variation and the dispersion level.
[0040] In this example, ecosystem service data include carbon fixation, habitat quality, net primary productivity, soil conservation and water production, etc., and driving factor data include human activities, climate change, natural terrain and other related data. What we want to discuss here is how driving factor data affect ecosystem service data. The stability of the two types of data is calculated based on the coefficient of variation and the degree of dispersion.
[0041] In some embodiments of the present application, the stability index of each ecosystem service data and each driving factor data is determined according to the coefficient of variation and the degree of dispersion, including:
[0042] ;
[0043] in, data on ecosystem services or drivers, , are the stable conversion coefficients of the coefficient of variation and the degree of dispersion, is the coefficient of variation, is the degree of dispersion in the box plot, IQR is the interquartile range in the box plot, is the difference between the upper and lower quartile ranges in the box plot, for The larger of is a preset constant.
[0044] In this embodiment, the box plot provides information about the degree of dispersion of the data by displaying the quartiles and outliers of the data. The IQR is the difference between the third quartile (Q3) and the first quartile (Q1). The difference between the upper and lower quartile ranges in the box plot is the upper and lower bound distance, which refers to the distance from the upper bound of the box (Q3 + 1.5 * IQR) to the lower bound (Q1 -1.5 * IQR). The average value of the coefficient of variation and the degree of dispersion is corrected by the larger of the two numbers. The value range is between 0.87-1.14.
[0045] Step S102, each ecosystem service data and each driving factor data are combined in pairs to obtain a combination list of ecosystem service data and driving factor data, and the causal indicator threshold corresponding to each data combination in the combination list is determined according to the stability indicators of the two, and it is marked in the combination list, and the driving factor data is screened by the causal indicators and causal indicator thresholds of each data combination in the combination list, so as to determine the driving factor data and ecosystem service data with a causal relationship.
[0046] In this embodiment, all possible pairwise combinations of each ecosystem service data and each driver data are performed to obtain a combination list of ecosystem service data-driver data. The causal index threshold is set according to the stability index of the two types of data in the combination, and the combined causal index is calculated. The causal index represents the degree of causality from the driver data (cause) to the ecosystem service data (effect). In this way, the driver data and ecosystem service data with causal relationship are determined.
[0047] In some embodiments of the present application, the causal index threshold corresponding to each data combination in the combination list is determined according to the stability index of the two, including:
[0048] Each ecosystem service data and each driving factor data has a corresponding stability indicator, which are recorded as the first stability indicator and the second stability indicator respectively.
[0049] Configure the original causal indicator threshold of each data combination in the combination list, calculate the weighted average of the first stability indicator and the second stability indicator, and respectively calculate the distance from the first stability indicator to the weighted average and the distance from the second stability indicator to the weighted average. Use the smaller of the two distances as the proximity indicator, calculate the average of the proximity indicator and the weighted average, and then adjust the original causal indicator threshold by the average. The adjusted original causal indicator threshold is used as the causal indicator threshold corresponding to each data combination.
[0050] In this embodiment, because the stability of the two types of data will affect the setting of the causal indicator threshold, the causal indicator threshold is adjusted according to the stability. The original causal indicator threshold of each data combination in the configuration combination list can be set by historical experience or related mathematical formulas. The average value of the proximity index (the first stability index or the second stability index) and the weighted average value is calculated. Different average values correspond to different correction coefficients. The correction of the data is completed in the form of the product of the correction coefficient and the original causal indicator threshold.
[0051] In some embodiments of the present application, the driving factor data is screened by combining the causal indicators and causal indicator thresholds of each data combination in the list to determine the driving factor data and ecosystem service data with causal relationships, including:
[0052] Map the driver data and ecosystem service data in each data combination into the cause state space and the effect state space respectively;
[0053] Determine the causal indicators of each data combination based on the data sample points in the cause state space and the effect state space, where the cause is the driving factor data and the effect is the ecosystem service data;
[0054] If the causal index of a data combination is greater than the causal index threshold, the data combination is retained;
[0055] Otherwise, eliminate the data combination;
[0056] This completes the screening of driving factor data, and the retained data are combined into driving factor data and ecosystem service data with causal relationships.
[0057] In this embodiment, the causal index here is based on the state space reconstruction and neighbor distance method to determine the direction and size of the causal relationship. For two independent systems or factors X and Y (X is the driving factor data, Y is the ecosystem service data, and the causal index here is nonlinear), the state space of the two systems is established according to the state space reconstruction theory.
[0058] For the sample points xn, xrn,1, ..., xrn,k in the state space X, it represents the k nearest neighbor points of xn in the state space X, and the average Euclidean distance between xn and the k nearest neighbor points is calculated;
[0059] ;
[0060] For a sample point yn in state space Y, ysn,1,...,ysn,k represents the k nearest neighbor points of yn in state space Y, which are mapped to state space X, and the average Euclidean distance between xn and the k nearest neighbor points xsn,1,...,xsn,k is calculated;
[0061] ;
[0062] In order to simplify the calculation, the average distance between xn and all N sample points can be used;
[0063] ;
[0064] The causal relationship between systems determined by the mapping relationship in the state space is defined as:
[0065] ;
[0066] According to the definition, 0< ≤1, when When it approaches 0, systems X and Y are independent of each other. When it is significantly greater than 0, there is a causal relationship from system X to Y, and the closer it is to 1, the stronger the causality.
[0067] Step S103, standardize the driving factor data and ecosystem service data with causal relationships, extract driving features based on the driving factor data, and establish an XGBoost model, and calculate the SHAP average value of each driving feature for the ecosystem service data with which it has a causal relationship through the XGBoost model.
[0068] In this embodiment, driving features are extracted based on driving factor data, where some features may be directly determined by one driving factor data, and some features may require a combination of multiple driving factor data to determine. XGBoost model, XGBoost is an efficient gradient boosting framework for solving classification, regression, prediction and other problems. It is an integrated learning algorithm that makes up for the shortcomings of existing models by continuously adding new models, which are usually a series of decision trees. SHAP is a model interpretation method that assigns an impact score to each feature based on the Shapley value in game theory, indicating the contribution of the feature to the model prediction results. The SHAP value can explain the importance of each feature of a single prediction and maintain global consistency (that is, the sum of the SHAP values of all predictions of the model is equal to the predicted difference of the model). The XGBoost model can be used to determine the threshold range of the impact of driving factors on ecosystem services, as well as the impact of changes in driving factors within these threshold ranges on ecosystem services.
[0069] In some embodiments of the present application, the SHAP average value of each driving feature for the ecosystem service data with which it has a causal relationship is calculated by the XGBoost model, such as Figure 2 Shown include:
[0070] The ecosystem service data and driving factor data of the validation set were divided into multiple samples, and the SHAP value of each driving feature in each sample was calculated;
[0071] Step S201, calculating a first prediction value of ecosystem service data in a certain sample by using an XGBoost model;
[0072] Step S202, masking a certain feature, and then calculating the second predicted value of the ecosystem service data with a missing feature in the sample through the XGBoost model;
[0073] Step S203, determining a predicted contribution value of the feature in the sample according to the difference between the first predicted value and the second predicted value, where the predicted contribution value is the SHAP value of the feature in the sample;
[0074] The SHAP values of the driving features in all samples are calculated to obtain the SHAP average value of each driving feature.
[0075] In this embodiment, the data of the validation set is divided into multiple samples, the SHAP value of the driving feature of each sample is calculated (describing the contribution of the feature to the model's prediction of ecosystem service data), and the SHAP values of different samples are combined to obtain the SHAP average value of the feature, and the features are sorted by the average SHAP value.
[0076] Step S104, sort each driving feature in each causal relationship according to the SHAP average value, screen out the first driving feature and the second driving feature, optimize the XGBoost model through the first driving feature, split the second driving feature to obtain the corresponding driving factor data, construct the SHAP value of the second driving feature and the change curve of these driving factor data, so as to determine the response relationship between the driving factor data and the ecosystem service data under different threshold ranges.
[0077] In this embodiment, the top ranked driving features are used as the second driving features (features with the greatest impact on ecosystem services), and the bottom ranked features are used as the first driving features (features with less impact on ecosystem services, which can help identify model bottlenecks and optimize the model). The SHAP value of the second driving feature and the change curve of these driving factor data are constructed through the optimized model, and finally the response relationship between the driving factor data and the ecosystem service data under different threshold ranges is determined.
[0078] In some embodiments of the present application, each driving feature in each causal relationship is sorted according to the SHAP average value, and the first driving feature and the second driving feature are screened out, including:
[0079] A ranking order is set according to the type of ecosystem service data in each causal relationship. According to the ranking order, the first several driving features among the driving features sorted by the SHAP average value are used as the second driving features, and the other driving features ranked behind the ranking order are used as the first driving features.
[0080] In this embodiment, the types of different ecosystem service data may be different, and have corresponding different ranking orders. The top few and the bottom few are used as the second driving feature and the first driving feature respectively. The second driving feature and the first driving feature completely constitute the driving feature in the ranking.
[0081] In some embodiments of the present application, the XGBoost model is optimized by the first driving feature, including:
[0082] ;
[0083] in, is the loss function after the i-th optimization, is the loss function after the i-1th optimization, n is the number of the first driving features optimized for the i-th time, is the optimization weight of the j-th driving feature of the i-th optimization, is the SHAP value of the j-th driver feature optimized for the i-th time, is the compensation constant of the i-th optimization.
[0084] In this embodiment, the model is optimized by continuously reducing the loss function of the XGBoost model. The value range is between 0.897-0.969.
[0085] In some embodiments of the present application, a change curve of the SHAP value of the second driving feature and these driving factor data is constructed to determine the response relationship between the driving factor data and the ecosystem service data under different threshold ranges, including:
[0086] The optimized XGBoost model is used to construct a change curve of the SHAP value of the second driving feature and its driving factor data, and multiple inflection points are determined in the change curve. The distance on both sides is determined according to the absolute value of the slope at the inflection point. Within the distance on both sides, multiple marking points are selected, and the marking points with higher slope changes are screened out through the slope changes of two adjacent marking points among the multiple marking points. Different threshold ranges of the driving factor data are determined based on the screened marking points, and the change curves corresponding to these threshold ranges are intercepted, so as to determine the response relationship between the driving factor data and the ecosystem service data under different threshold ranges.
[0087] In this embodiment, the inflection point on the curve is the point where the curve changes from increasing to decreasing or from decreasing to increasing. The larger the absolute value of the inflection point slope, the greater the degree of change of the inflection point, and the larger the corresponding distance on both sides that needs to be checked. Within the distance on both sides, multiple marking points are selected, and the marking points with higher slope changes are screened out by the slope changes of two adjacent marking points among the multiple marking points. It means that within the distance on both sides, several points on the curve are randomly selected or selected according to the law of increasing gradual change, and the slope changes between adjacent points are calculated to screen out marking points with higher slope changes (exceeding the threshold), so as to determine different threshold ranges of driving factor data. Within these threshold ranges, the SHAP value changes significantly, that is, the ecosystem service data changes significantly. Analyze the changes in SHAP value with each driving factor to identify the threshold range that produces significant impact.
[0088] By applying the above scheme, the ecosystem service data and driving factor data of the karst area are obtained, and box plots of each ecosystem service data and each driving factor data are constructed to determine their respective discrete degrees. The coefficient of variation of each ecosystem service data and each driving factor data is calculated, and the stability index of each ecosystem service data and each driving factor data is determined according to the coefficient of variation and the degree of dispersion; each ecosystem service data and each driving factor data are combined in pairs to obtain a combination list of ecosystem service data-driving factor data, and the causal indicator threshold corresponding to each data combination in the combination list is determined according to the stability index of the two, and it is marked in the combination list, and the driving factor data is screened by the causal indicator and causal indicator threshold of each data combination in the combination list, so as to determine whether there is causal relationship. The driving factor data and ecosystem service data of the relationship are standardized, the driving factor data and ecosystem service data with causal relationship are extracted based on the driving factor data, and the XGBoost model is established. The SHAP average value of each driving feature for the ecosystem service data with causal relationship is calculated through the XGBoost model; each driving feature in each causal relationship is sorted according to the SHAP average value, the first driving feature and the second driving feature are screened out, the XGBoost model is optimized by the first driving feature, the second driving feature is split to obtain the corresponding driving factor data, and the SHAP value of the second driving feature and the change curve of these driving factor data are constructed, so as to determine the response relationship between the driving factor data and the ecosystem service data under different threshold ranges. This application determines the causal indicator threshold corresponding to each data combination in the combination list according to the stability index of the two, and sets a reasonable causal indicator threshold according to the stability of the two types of data, so as to accurately and reasonably screen the driving factor data with strong causal relationship. The SHAP values of different driving features are determined, and the XGBoost model is optimized according to the SHAP value and the response relationship between the driving factor data and the ecosystem service data is constructed, which improves the accuracy and adaptability of the nonlinear impact relationship analysis of the ecosystem service data.
[0089] Through the description of the above implementation methods, those skilled in the art can clearly understand that the present invention can be implemented by hardware, or by software plus a necessary general hardware platform. Based on such an understanding, the technical solution of the present invention can be embodied in the form of a software product, which can be stored in a non-volatile storage medium (which can be a CD-ROM, a USB flash drive, a mobile hard disk, etc.), including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in each implementation scenario of the present invention.
[0090] The above description is only a preferred specific implementation manner of the present invention, but the protection scope of the present invention is not limited thereto. Any technician familiar with the technical field can make equivalent replacements or changes according to the technical scheme and inventive concept of the present invention within the technical scope disclosed by the present invention, which should be covered by the protection scope of the present invention.
Claims
1. A method to reveal the nonlinear impact of ecological services in karst areas, characterized by: include: Obtain ecosystem service data and driving factor data in the karst area, construct box plots for each ecosystem service data and each driving factor data to determine their respective dispersion levels, calculate the coefficient of variation for each ecosystem service data and each driving factor data, and determine the stability index for each ecosystem service data and each driving factor data based on the coefficient of variation and dispersion level; Combine each ecosystem service data and each driver data in pairs to obtain a combination list of ecosystem service data and driver data. Determine the causal indicator threshold corresponding to each data combination in the combination list based on the stability indicators of the two, and mark them in the combination list. Screen the driver data through the causal indicators and causal indicator thresholds of each data combination in the combination list, so as to determine the driver data and ecosystem service data with causal relationship. The causal relationship between driver data and ecosystem service data was standardized, driver features were extracted based on the driver data, and an XGBoost model was established. The SHAP average of each driver feature for the causal relationship between the driver feature and the ecosystem service data was calculated through the XGBoost model. Each driving feature in each causal relationship is sorted according to the SHAP average value, and the first driving feature and the second driving feature are screened out. The XGBoost model is optimized through the first driving feature, and the second driving feature is split to obtain the corresponding driving factor data. The SHAP value of the second driving feature and the change curve of the driving factor data obtained after splitting the second driving feature are constructed to determine the response relationship between the driving factor data and the ecosystem service data under different threshold ranges.
2. A method for revealing the nonlinear impact of ecological services in karst areas according to claim 1, characterized in that: Determine the stability indicators for each ecosystem service data and each driver data based on the coefficient of variation and dispersion, including: ; in, data on ecosystem services or drivers, , are the stable conversion coefficients of the coefficient of variation and the degree of dispersion, is the coefficient of variation, is the degree of dispersion in the box plot, IQR is the interquartile range in the box plot, is the difference between the upper and lower quartile ranges in the box plot, for The larger of is a preset constant.
3. A method for revealing the nonlinear impact of ecological services in karst areas according to claim 2, characterized in that: The causal indicator threshold corresponding to each data combination in the combination list is determined based on the stability indicators of the two, including: Each ecosystem service data and each driving factor data has a corresponding stability indicator, which are recorded as the first stability indicator and the second stability indicator respectively. Configure the original causal indicator threshold of each data combination in the combination list, calculate the weighted average of the first stability indicator and the second stability indicator, and respectively calculate the distance from the first stability indicator to the weighted average and the distance from the second stability indicator to the weighted average. Use the smaller of the two distances as the proximity indicator, calculate the average of the proximity indicator and the weighted average, and then adjust the original causal indicator threshold by the average. The adjusted original causal indicator threshold is used as the causal indicator threshold corresponding to each data combination.
4. A method for revealing the nonlinear impact of ecological services in karst areas according to claim 3, characterized in that: The driver data are screened by combining the causal indicators and causal indicator thresholds for each data combination in the list to identify driver data and ecosystem service data with causal relationships, including: Map the driver data and ecosystem service data in each data combination into the cause state space and the effect state space respectively; Determine the causal indicators of each data combination based on the data sample points in the cause state space and the effect state space, where the cause is the driving factor data and the effect is the ecosystem service data; If the causal index of a data combination is greater than the causal index threshold, the data combination is retained; Otherwise, eliminate the data combination; This completes the screening of driving factor data, and the retained data are combined into driving factor data and ecosystem service data with causal relationships.
5. The method for revealing the nonlinear impact of ecological services in karst areas according to claim 1, characterized in that: The SHAP mean of each driving feature for the ecosystem service data with which it has a causal relationship is calculated through the XGBoost model, including: The ecosystem service data and driving factor data of the validation set were divided into multiple samples, and the SHAP value of each driving feature in each sample was calculated; The first prediction value of the ecosystem service data in a certain sample is calculated by the XGBoost model, a certain feature is masked, and then the second prediction value of the ecosystem service data with a feature missing in the sample is calculated by the XGBoost model. The predicted contribution value of the feature in this sample is determined according to the difference between the first prediction value and the second prediction value. The predicted contribution value is the SHAP value of the feature in the sample. The SHAP values of the driving features in all samples are calculated to obtain the SHAP average value of each driving feature.
6. A method for revealing the nonlinear impact of ecological services in karst areas according to claim 1, characterized in that: Each driving feature in each causal relationship is sorted according to the SHAP average value, and the first driving feature and the second driving feature are screened out, including: A ranking order is set according to the type of ecosystem service data in each causal relationship. According to the ranking order, the first several driving features among the driving features sorted by the SHAP average value are used as the second driving features, and the other driving features ranked behind the ranking order are used as the first driving features.
7. A method for revealing the nonlinear impact of ecological services in karst areas according to claim 6, characterized in that: The XGBoost model is optimized through the first driving feature, including: ; in, is the loss function after the i-th optimization, is the loss function after the i-1th optimization, n is the number of the first driving features optimized for the i-th time, is the optimization weight of the j-th driving feature of the i-th optimization, is the SHAP value of the j-th driver feature optimized for the i-th time, is the compensation constant of the i-th optimization.
8. A method for revealing the nonlinear impact of ecological services in karst areas according to claim 7, characterized in that: Construct the SHAP value of the second driving feature and the change curve of the driving factor data obtained after splitting the second driving feature, so as to determine the response relationship between the driving factor data and the ecosystem service data under different threshold ranges, including: The optimized XGBoost model is used to construct a change curve of the SHAP value of the second driving feature and its driving factor data, and multiple inflection points are determined in the change curve. The distance on both sides is determined according to the absolute value of the slope at the inflection point. Within the distance on both sides, multiple marking points are selected, and the marking points with higher slope changes are screened out through the slope changes of two adjacent marking points among the multiple marking points. Different threshold ranges of the driving factor data are determined based on the screened marking points, and the change curves corresponding to these threshold ranges are intercepted, so as to determine the response relationship between the driving factor data and the ecosystem service data under different threshold ranges.
