Aquatic organism integrity index modeling method based on random forest
Through the aquatic biological integrity index modeling method based on random forests, the problem of failure to fully consider the nonlinear relationship between multiple complex elements in the existing technology is solved, and more scientific indicator identification and environmental pressure sensitivity assessment are achieved, providing theoretical support for water ecological protection.
Patent Information
- Application Number
- CN202411353199.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-26
- Publication Date
- 2025-02-25
AI Technical Summary
The prior art fails to fully consider the nonlinear relationship between multiple complex elements when calculating the biological integrity index, resulting in insufficient consideration of the comprehensive impact of multiple environmental stress factors.
The aquatic biological integrity index modeling method based on random forests is adopted. By establishing a candidate index system, selecting reference points, calculating candidate biological index values, performing PCA analysis, obtaining P-IBI parameters, and using the stochastic forest model for modeling, the output results are repeatedly remodeled to retain the index combination with the largest model interpretation rate.
This method can more scientifically identify the protection indicators of aquatic organisms, consider the comprehensive impact of multiple indicators on the integrity index of aquatic organisms, improves the sensitivity to changes in environmental pressure, and provides theoretical support for river water ecological protection and restoration.
Smart Images

Figure CN119514313A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the field of water ecology, and in particular relates to a random forest-based aquatic biological integrity index modeling method. Background Art
[0002] The Index of Biological Integrity (IBI) is a comprehensive index that considers multiple biological indicators or parameters to evaluate the impact of human activities on the integrity of biological communities. It is used to describe the integrity of biological communities in ecosystems. Calculating the IBI is a systematic process that involves multiple steps, including indicator selection, evaluation system construction, specific calculation methods, and final system establishment. By applying this index scientifically and rationally, we can effectively evaluate the impact of human activities on ecosystems and provide an important basis for the protection and restoration of aquatic ecosystems.
[0003] Evaluation of lake ecosystem based on phytoplankton biointegrity index - A case study of Taihu Lake in winter 2012 [J]. Acta Ecologica Sinica, 2016, 36(5): 1431-1441. (Published on July 11, 2015) This paper published a method for evaluating the health quality of Taihu Lake water ecology in winter, applying the theory and method of biointegrity. This method uses the ratio method to unify the dimensions of each parameter, and then accumulates the P-IBI score of Taihu Lake in the dry season, and divides the health evaluation standards. Although the dimensions of each parameter are accumulated, only the data distribution of a single indicator and the correlation between indicators are considered, and the nonlinear relationship between multiple complex factors is not fully considered.
[0004] Chinese patent CN110675036A (publication date: January 10, 2020) discloses a plateau river ecological health assessment method based on random forest optimization of microbial index. Based on the microbial integrity index, the random forest algorithm is used to calculate the ecological weight, and a set of ecological health status assessment system for plateau rivers is established. The patent establishes a connection between the microbial integrity index and water quality to calculate the microbial integrity index, which can mainly reflect the changes in water quality. It is based on qualitative or semi-quantitative results and does not take into account the comprehensive impact of multiple environmental pressure factors. Summary of the invention
[0005] To solve the above problems, a random forest-based aquatic biological integrity index modeling method is proposed, which includes the following steps:
[0006] S1. Establish a candidate indicator system, use a Büchner funnel and a vacuum filter pump to quickly filter and collect plankton samples, use a water sampler to quantitatively collect 1L to 2L of water into a quantitative sampling bottle, immediately add Lugol's solution to fix it, collect phytoplankton data, select and establish candidate indicators based on relevant basin literature and collected phytoplankton data, and organize and establish data;
[0007] S2. Select reference points. Select reference points based on the reference point selection criteria, combined with the physical and chemical characteristics of water bodies, habitat environmental quality and historical data;
[0008] S3. Calculation and screening of candidate biological index values: Calculate the index values of each candidate biological according to the reference point data, analyze the distribution range of each index value, and screen;
[0009] S4, PCA candidate index acquisition, PCA analysis of candidate biological index values after distribution range screening, and selection of candidate indexes containing most variation information;
[0010] S5, P-IBI parameter acquisition, the indicators after the distribution range is screened, the discrimination ability test and redundancy test are performed, and the P-IBI parameters of each indicator are calculated;
[0011] S6. Model the aquatic biological integrity index based on the random forest model and output the results. Perform random forest modeling and repeatedly re-model according to the output results, retain the indicator combination with the largest model explanation rate, and obtain multiple indicators that have a comprehensive impact on a single indicator or biological integrity index.
[0012] Furthermore, the reference point selection criteria in step S1 are as follows: the sampled river section basically maintains a natural state, there are no water conservancy and hydropower projects or sand mining operations in the sampled river section, the river section has relatively complete floodplains and riverbank plants, there are no residents or industrial and mining enterprises around the river section, and there is no point source and non-point source pollution upstream of the river section.
[0013] Furthermore, the step S2 selects reference points with good habitat environment quality according to the land use data and the reference point selection criteria in ArcGIS software.
[0014] Furthermore, the distribution range screening in step S3 refers to screening out the following two types of indexes: an index whose value decreases as the interference increases and an index whose distribution is relatively scattered.
[0015] Furthermore, the discrimination ability test in step S5 refers to using damaged point data to calculate the index value after distribution range screening, using the box plot method to analyze the distribution of the index value between the reference point and the damaged point, and retaining the indicators whose overlapping parts do not exceed the median line of the two boxes.
[0016] The redundancy test refers to performing Peasron correlation analysis, retaining the index with |r|<0.75, and if the correlation coefficient between two indexes |r|>0.75, retaining one of them;
[0017] The ratio method is used to unify the dimensions of the indicators and calculate the P-IBI value of each indicator:
[0018] The stronger the interference, the lower the parameter value. P-IBI value = index value / 95% quantile
[0019] The stronger the interference, the higher the P-IBI value = (maximum value - index value) / (maximum value - 5% quantile)
[0020] The P-IBI value range of each indicator is 0-1. If it is greater than 1, it is recorded as 1.
[0021] Furthermore, in step S6, the PCA candidate index is used as the explanatory variable of the random forest model, and the P-IBI parameter is used as the response variable of the random forest model to perform random forest modeling. The specific modeling process is as follows:
[0022] S61, randomly extracting the training set with replacement, calculating the out-of-bag error rate, adjusting the number of binary tree variables, and generating a decision tree;
[0023] S62. Use random forest to calculate feature importance based on the Gini index. The impurity GI calculation formula is as follows:
[0024]
[0025] The probability distribution of a node class;
[0026] The importance is calculated as follows:
[0027]
[0028] n: the number of trees;
[0029] M: the number of times a specific feature appears in a single tree;
[0030] GIm: Gini index of the node before splitting;
[0031] GIl: Gini index of the left node after splitting;
[0032] GIr: Gini index of the right node after splitting;
[0033] S63. After obtaining the importance index results, calculate the model explanation rate, screen out the top 90% of the importance indicators, and repeat the modeling until the model explanation rate no longer increases.
[0034] Compared with the prior art, the technical solution of the present application has the following advantages and effects:
[0035] 1. The present invention couples the traditional biological integrity index calculation method with a machine learning algorithm, inputs the biological integrity index and different biological indicators, and establishes a response relationship between the aquatic biological integrity index and different biological indicators. It replaces the traditional biological integrity index calculation method that uses simple mathematical analysis to screen indicators, considers the comprehensive impact of multiple indicators on a single indicator or biological integrity index, can identify important indicators for constructing the aquatic biological integrity index, and comprehensively reflects the complex impact of multiple indicators on the aquatic biological integrity index, providing theoretical support for river water ecological protection and restoration.
[0036] 2. The present invention combines the theoretical mechanism of the machine algorithm model, and optimizes the random forest modeling of the aquatic biological integrity index only once, selects the top-ranked indicator combination of the output results, and repeatedly models the random forest model to obtain the indicator with the highest explanation rate. This method effectively improves the reliability and scientificity of the random forest-based aquatic biological completeness index modeling.
[0037] The above is only an overview of the technical solution of the present application. In order to more clearly understand the technical means of the present application so that it can be implemented in accordance with the contents of the specification, and to make the above and other purposes, features and advantages of the present application more obvious and easy to understand, the following is a detailed description of the preferred embodiments of the present application in conjunction with the accompanying drawings as follows.
[0038] Based on the detailed description of the specific embodiments of the present application in combination with the accompanying drawings below, those skilled in the art will become more aware of the above and other objects, advantages and features of the present application. BRIEF DESCRIPTION OF THE DRAWINGS
[0039] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the prior art, the drawings required for use in the embodiments or the prior art descriptions are briefly introduced below. Obviously, the drawings described below are some embodiments of the present application. For ordinary technicians in this field, other drawings can also be obtained based on these drawings without creative work. In all drawings, similar elements or parts are generally identified by similar reference numerals. In the drawings, each element or part is not necessarily drawn according to the actual scale.
[0040] Figure 1 This is a schematic diagram of a flow chart of a method for modeling aquatic biological integrity index based on random forests according to an embodiment of the present invention;
[0041] Figure 2 This is a graph of the output results of a random forest model according to an embodiment of the present invention;
[0042] Figure 3This is a box plot analysis diagram using a random forest model according to an embodiment of the present invention;
[0043] Figure 4 is a comparison diagram of IBI distribution of reference points and damaged points of a traditional evaluation calculation method and the evaluation calculation method of the present application according to an embodiment of the present invention; DETAILED DESCRIPTION
[0044] To make the purpose, technical scheme and advantages of the embodiment of the present application clearer, the technical scheme in the embodiment of the present application will be clearly and completely described below in conjunction with the drawings in the embodiment of the present application. Obviously, the described embodiment is a part of the embodiment of the present application, rather than all the embodiments. In the following description, specific details such as specific configurations and components are provided only to help fully understand the embodiments of the present application. Therefore, it should be clear to those skilled in the art that various changes and modifications can be made to the embodiments described herein without departing from the scope and spirit of the present application. In addition, for clarity and brevity, the description of known functions and structures is omitted in the embodiment. It should be understood that "one embodiment" or "this embodiment" mentioned throughout the specification means that the specific features, structures or characteristics related to the embodiment are included in at least one embodiment of the present application. Therefore, "one embodiment" or "this embodiment" appearing in various places throughout the specification may not necessarily refer to the same embodiment. In addition, these specific features, structures or characteristics can be combined in one or more embodiments in any suitable manner.
[0045] In addition, the present application may repeat reference numerals and / or letters in different examples. This repetition is for the purpose of simplicity and clarity, and does not in itself indicate the relationship between the various embodiments and / or settings discussed.
[0046] The term "and / or" in this article is only a description of the association relationship of associated objects, indicating that there can be three relationships. For example, A and / or B can mean: A exists alone, B exists alone, and A and B exist at the same time. The term " / and" in this article describes another type of association relationship between associated objects, indicating that there can be two relationships. For example, A / and B can mean: A exists alone, and A and B exist alone. In addition, the character " / " in this article generally indicates that the associated objects before and after are in an "or" relationship.
[0047] It should also be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusions.
[0048] Example 1
[0049] See also Figure 1 , is a flow chart of a random forest-based aquatic biological integrity index modeling method provided in an embodiment of the present invention. This embodiment provides a method for evaluating the integrity of a biological community by using a random forest-based aquatic biological integrity index modeling, and the system flow includes:
[0050] S1. Establish a candidate indicator system. Use a Büchner funnel and a vacuum filtration pump for rapid filtration to collect plankton samples. Use a water sampler to quantitatively collect 1L to 2L of water into a quantitative sampling bottle. Immediately add Lugol's solution for fixation. Collect phytoplankton data. According to relevant basin literature and the collected phytoplankton data, select and establish corresponding candidate indicators, and organize and establish data. In this embodiment, M1-Mn are used to mark candidate indicators for subsequent screening.
[0051] S2. Reference points are selected based on the following criteria: the sampled river section basically maintains a natural state, there are no water conservancy or hydropower projects or sand mining operations in the sampled river section, the river section has relatively complete floodplains and riparian vegetation, there are no residents or industrial and mining enterprises around the river section, and there is no point source or non-point source pollution in the upper reaches of the river section. Reference points are selected in combination with the physical and chemical characteristics of the water body, the environmental quality of the habitat, and historical data.
[0052] Furthermore, in ArcGIS software, reference points with good habitat environment quality are screened according to the land use data and the reference point selection criteria. In this embodiment, W1, W4, J1 and L1 are finally selected as reference points.
[0053] S3. Calculation and screening of candidate biological index values. Calculate the index values of each candidate biological according to the reference point data, analyze the distribution range of each index value, and screen. Eliminate the following two types of indexes: the index whose value decreases as the interference increases and the index value distribution is relatively scattered. The candidate biological index values calculated in this embodiment are shown in Table 1 below, and the indexes M9, M12-18, M50, M55, M58, M59, M60, and M61 are deleted according to the changes in the indexes.
[0054] Table 1 Calculation of candidate biological index values
[0055]
[0056]
[0057]
[0058] S4, PCA candidate index acquisition, PCA analysis of candidate biological index values after distribution range screening, and selection of candidate indexes containing most variation information;
[0059] S5. Obtaining P-IBI parameters: Performing discrimination ability test and redundancy test on the index after the distribution range is screened to obtain P-IBI parameters.
[0060] Furthermore, the discrimination ability test refers to using the damaged point data to calculate the index value after the distribution range is screened, using the box plot method to analyze the distribution of the index value between the reference point and the damaged point, retaining the indicators whose overlapping parts do not exceed the median line of the two boxes, and retaining the indicators M11, M31, and M76.
[0061] Furthermore, the redundancy test refers to performing Peasron correlation analysis, retaining the index with |r| < 0.75, and retaining one of the two indexes if the correlation coefficient |r| > 0.75. The Peasron correlation analysis results are shown in Table 2 below:
[0062] Table 2 Peasron correlation analysis results
[0063]
[0064] *P<0.05, **P<0.01
[0065] From this table, according to the principle of discarding the index when |R|>0.75, although the indexes M11, M31, and M76 are related, the three indexes represent different physical meanings, so all the indexes can be retained.
[0066] The ratio method is used to unify the dimensions of the indicators and calculate the P-IBI value of each indicator:
[0067] Reduced reference point P-IBI value = index value / 95% quantile
[0068] Increased P-IBI value = (maximum value - index value) / (maximum value - 5% quantile)
[0069] In this embodiment, M11: (83.158-M11) / (83.158-1.053)
[0070] M31: (145.26-M31) / (145.26-1.053)
[0071] M76: (48.07-M76) / (48.07-1.053) The calculated sampling point P-IBI parameter values are as shown in Table 3:
[0072] Table 3 P-IBI parameter values at sampling points
[0073]
[0074]
[0075] S6. Model the aquatic biological integrity index based on the random forest model and output the results. Perform random forest modeling and repeatedly remodel according to the output results. Keep the indicator combination with the largest model explanation rate. After performing person correlation analysis on the indicator combination, calculate and establish the evaluation interval and obtain the evaluation results.
[0076] Furthermore, the PCA candidate index is used as the explanatory variable of the random forest model, and the P-IBI parameter is used as the response variable of the random forest model to perform random forest modeling. The specific modeling process is as follows:
[0077] S61. Randomly extract the training set with replacement, calculate the out-of-bag error rate, adjust the number of binary tree variables, and generate a decision tree
[0078] S62. Use random forest to calculate feature importance based on the Gini index. The impurity GI calculation formula is as follows:
[0079]
[0080] The probability distribution of a node class;
[0081] The importance is calculated as follows:
[0082]
[0083] n: the number of trees;
[0084] M: the number of times a specific feature appears in a single tree;
[0085] GIm: Gini index of the node before splitting;
[0086] GIl: Gini index of the left node after splitting;
[0087] GIr: Gini index of the right node after splitting;
[0088] S63. After obtaining the importance index results, calculate the model explanation rate, screen out the top 90% of the importance indicators, and repeat the modeling until the model explanation rate no longer increases. The model output results are as follows: Figure 2 .
[0089] In this embodiment, the model explanation rate is finally obtained according to the above steps, which is 85%. The box plot method is used for analysis, and the results are as follows: Figure 3 (a), (b), (c), and (d) are the box plots of the final retained indicators M11, M35, M48, and M76, respectively. Correlation analysis is performed on the above indicators. The results of the correlation analysis of the retained indicators are shown in Table 4:
[0090] Table 4. Results of correlation analysis of retention indicators
[0091]
[0092] *P<0.05, **P<0.01
[0093] From this table, according to the principle of discarding the indicator when |R|>0.75, all indicators can be retained.
[0094] The reference point P-IBI is standardized using the ratio method:
[0095] Reduced reference point P-IBI index value = index value / 95% quantile
[0096] The rising reference point P-IB index value = (maximum value - index value) / (maximum value - 5% quantile)
[0097] The PF-IBI value range is 0-1. If it is greater than 1, it is recorded as 1. The P-IBI index is calculated as follows:
[0098] M11: (83.158-M11) / (83.158-1.053)
[0099] M35: (145.26-M31) / (145.26-1.053)
[0100] M48: M48 / 0.73
[0101] M76: (48.07-M76) / (48.07-1.053)
[0102] Taking the 25% quantile of the reference point PF-IBI value distribution as the standard, it is divided into four equal parts, and a total of 5 intervals are obtained, representing different health levels. The calculation results are shown in Table 5:
[0103] Table 5 PF-IBI evaluation interval RF-IBI evaluation interval
[0104]
[0105] The PF-IBI calculation results of all sampling points are shown in Table 6:
[0106]
[0107]
[0108] Furthermore, by screening the candidate indexes for distribution range, analyzing the discrimination ability, and analyzing the correlation, the ratio method was used to unify the dimensions of the indexes, and the calculation results of the traditional biological integrity index evaluation index were obtained, which were compared with the calculation results of the biological integrity index evaluation of the present invention. Figure 4, comparing the IBI distribution diagrams of the reference point and damaged point of the traditional evaluation method calculation result (a) and the evaluation method of the present invention calculation result (b), the Figure 4 It can be seen that the difference between the reference point and the damaged point in the improved evaluation calculation results is significantly more significant, proving that the improved calculation method has discovered indicators that are more sensitive to environmental changes and constructed an evaluation system that can better characterize the impact of environmental pressure changes on sampling points.
[0109] Technical effect of this embodiment: The present invention can solve the problems that the traditional biological integrity index screening process is too subjective, has limited applicability, and is not sensitive enough. It can more scientifically identify the protection indicators of aquatic organisms, rather than just calculating based on simple mathematical linear analysis. This modeling method is more sensitive to changes in environmental pressure.
[0110] The above description is only the preferred embodiment of the present invention, which does not limit the protection scope of the present invention. For those skilled in the art, the present invention can be modified and varied in various ways. Within the spirit and principle of the present invention, any change, modification, replacement, integration and parameter change of these embodiments by conventional substitution or capable of achieving the same function without departing from the principle and spirit of the present invention shall fall within the protection scope of the present invention.
Claims
1. A random forest-based aquatic biological integrity index modeling method, characterized in that: The following steps are involved: S1. Establish a candidate indicator system, use a Büchner funnel and a vacuum filter pump to quickly filter and collect plankton samples, use a water sampler to quantitatively collect 1L to 2L of water into a quantitative sampling bottle, immediately add Lugol's solution to fix it, collect phytoplankton data, select and establish candidate indicators based on relevant basin literature and collected phytoplankton data, and organize and establish data; S2. Select reference points. Select reference points based on the reference point selection criteria, combined with the physical and chemical characteristics of water bodies, habitat environmental quality and historical data; S3. Calculation and screening of candidate biological index values: Calculate the index values of each candidate biological according to the reference point data, analyze the distribution range of each index value, and screen; S4, PCA candidate index acquisition, PCA analysis of candidate biological index values after distribution range screening, and selection of candidate indexes containing most variation information; S5, P-IBI parameter acquisition, the indicators after the distribution range is screened, the discrimination ability test and redundancy test are performed, and the P-IBI parameters of each indicator are calculated; S6. Model the aquatic biological integrity index based on the random forest model and output the results. Perform random forest modeling and repeatedly re-model according to the output results, retain the indicator combination with the largest model explanation rate, and obtain multiple indicators that have a comprehensive impact on a single indicator or biological integrity index.
2. According to the random forest-based aquatic biological integrity index modeling method described in claim 1, the reference point selection criteria in step S1 are as follows: the sampled river section basically maintains a natural state, there are no water conservancy and hydropower projects or sand mining operations in the sampled river section, the river section has relatively complete floodplains and riverbank plants, there are no residents or industrial and mining enterprises around the river section, and there is no point source and non-point source pollution upstream of the river section.
3. The random forest-based aquatic biological integrity index modeling method according to claim 1 is characterized in that: The step S2 selects reference points with good habitat environment quality according to the land use data and the reference point selection criteria in ArcGIS software.
4. The random forest-based aquatic biological integrity index modeling method according to claim 1 is characterized in that: The distribution range screening in step S3 refers to screening out the following two types of indexes: an index whose value decreases as the interference increases and an index whose distribution is relatively scattered.
5. The random forest-based aquatic biological integrity index modeling method according to claim 1 is characterized in that: The discrimination ability test in step S5 refers to using the damaged point data to calculate the index value after the distribution range screening, using the box plot method to analyze the distribution of the index value between the reference point and the damaged point, and retaining the index whose overlapping part does not exceed the median line of the two boxes; The redundancy test refers to performing Peasron correlation analysis, retaining the index with |r|<0.75, and if the correlation coefficient between two indexes |r|>0.75, retaining one of them; The ratio method is used to unify the dimensions of the indicators and calculate the P-IBI value of each indicator: The stronger the interference, the lower the parameter value. P-IBI value = index value / 95% quantile The stronger the interference, the higher the P-IBI value = (maximum value - index value) / (maximum value - 5% quantile) The P-IBI value distribution range of each indicator is 0-1. If it is greater than 1, it is recorded as 1.
6. A random forest-based aquatic biological integrity index modeling method according to any one of claims 1 to 5, characterized in that: In step S6, the PCA candidate index is used as the explanatory variable of the random forest model, and the P-IBI parameter is used as the response variable of the random forest model to perform random forest modeling. The specific modeling process is as follows: S61, randomly extracting the training set with replacement, calculating the out-of-bag error rate, adjusting the number of binary tree variables, and generating a decision tree; S62. Use random forest to calculate feature importance based on the Gini index. The impurity GI calculation formula is as follows: The probability distribution of a node class; The importance is calculated as follows: n: the number of trees; M: the number of times a specific feature appears in a single tree; GIm: Gini index of the node before splitting; GIl: Gini index of the left node after splitting; GIr: Gini index of the right node after splitting; S63. After obtaining the importance index results, calculate the model explanation rate, screen out the top 90% of the importance indicators, and repeat the modeling until the model explanation rate no longer increases.
Citation Information
Patent Citations
Plateau river ecological health evaluation method based on random forest optimization microbial index
CN110675036A
Cited By
Self-adaptive diagnosis method, device, equipment and medium for water ecology problem
CN122242973A
An aquatic ecological problem adaptive diagnosis method, device, equipment and medium
CN122242973B