Random forest-based red tide early warning method for hornwort
Through the random forest model of the triceratops red tide warning method, combined with environmental factors and plankton data, key species and red tide indicator organisms were screened out, which solved the problem of low accuracy in dealing with complex red tide phenomena, and achieved more Accurate red tide warning.
Patent Information
- Application Number
- CN202410932955.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-12
- Publication Date
- 2024-11-15
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
The traditional red tide warning model cannot fully consider the nonlinear relationship and interaction between multiple factors when dealing with complex ecological phenomena, resulting in low prediction accuracy.
Using the stochalade triceratops red tide early warning method based on the random forest model, the organic pollution index was calculated by collecting and processing environmental factors and plankton community omics data, constructing a random forest model, screening out key species related to the organic pollution index, and conducting Pearson correlation analysis was performed to determine the red tide indicator organism of Triceratopsia.
It improves the accuracy of red tide warning, can send out early warning signals before the red tide has erupted, wins time for emergency management and prevention and control measures, and is applicable to different regions and types of red tides, with wide applicability and flexibility.
Smart Images

Figure CN118964919A_ABST
Abstract
Description
Technical Field
[0001] The invention relates to the technical field of marine red tide early warning, and in particular to a Ceratium triangularis red tide early warning method based on random forest. Background Art
[0002] Red tide is an ecological phenomenon caused by the massive reproduction of marine microalgae, which may cause serious damage to the marine ecosystem and have a significant impact on fisheries and public health. C. triangularis is one of the common red tide algae. Its outbreak can cause drastic changes in the marine environment, leading to fish deaths, accumulation of shellfish toxins, and ecological imbalances in other marine organisms. Therefore, timely and accurate warning of the occurrence of C. triangularis red tide is of great significance for marine ecological protection and fishery resource management.
[0003] Traditional red tide warning models mostly use statistical methods, such as regression analysis and time series analysis. These methods are effective when dealing with single variables and linear relationships. However, when faced with complex ecological phenomena such as red tides, they cannot fully consider the nonlinear relationships and interactions between multiple factors, resulting in low prediction accuracy. Summary of the invention
[0004] The purpose of the present invention is to solve the technical problems that most of the current red tide warnings use a single environmental factor to predict the outbreak of red tides, and only consider a single factor, which has limitations, and the prediction accuracy is low. A triangular horn algae red tide warning method based on a random forest model is proposed, which can determine the triangular horn algae red tide indicator species, better carry out red tide warnings, and improve prediction accuracy.
[0005] The present invention provides a triangular hornwort red tide early warning method based on a random forest model, comprising the following steps:
[0006] Step 1: Collect characteristic data of environmental factors in the predicted water area and perform standardization processing to obtain standardized environmental data;
[0007] Step 2, collecting plankton in the water area, identifying and counting the plankton samples in the water area, and obtaining the plankton community omics matrix data;
[0008] Step 3, calculating the organic pollution index based on standardized environmental data;
[0009] Step 4: construct a random forest model based on the bagging algorithm, and perform model training and optimization to obtain a prediction model;
[0010] Step 5, read in the plankton community omics matrix data and the organic pollution index, perform repeated cross-validation, and screen out key species related to the organic pollution index in the sampled waters;
[0011] Step 6, conduct Pearson correlation analysis between the key species related to the organic pollution index screened out in step 5 and Ceratium triangularis, output all correlation degrees and sort them, identify species with correlations less than the correlation threshold as species related to Ceratium triangularis, and then determine the indicator organisms of Ceratium triangularis red tide.
[0012] Furthermore, the environmental factors include, but are not limited to: temperature, dissolved oxygen, total nitrogen, inorganic nitrogen, nitrate nitrogen, inorganic phosphosilicate, total organic carbon, and chemical oxygen demand.
[0013] Furthermore, in step 1, the characteristic data of the collected environmental factors are standardized and the data are converted using the log function:
[0014]
[0015] Among them, X represents the characteristic data of the collected environmental factors, log 10 max represents the maximum characteristic value of the monitored environmental factor; X′ represents the characteristic data of the environmental factor after standardization.
[0016] Furthermore, in step 2, a conical plankton net is used to collect plankton in the water area; the samples are fixed using a methanol solution, and the laboratory uses a microscope to identify and count the plankton samples in the water area.
[0017] Further, in step 3, based on the standardized environmental data, the organic pollution index formula is calculated as follows:
[0018] OPI=COD / COD s +DIN / DIN s +DIP / DIP s +DO / DO s
[0019] Among them, COD, DIN, DIP, and DO represent chemical oxygen demand, inorganic nitrogen, inorganic phosphorus, and dissolved oxygen, respectively, and the unit is mg / L; COD S DIN S 、DIP S ,DO S It is the standard content of chemical oxygen demand, standard content of inorganic nitrogen, standard content of inorganic phosphorus, and standard content of dissolved oxygen.
[0020] Further, step 4 includes the following steps 401 to 402:
[0021] Step 401, dividing the plankton community omics matrix data into a training set and a test set;
[0022] Step 402: construct a random forest model based on the bagging algorithm, and use the training set to train the random forest model to obtain a prediction model.
[0023] Furthermore, after step 402, the method further includes steps 403 and 404:
[0024] Step 403, evaluating the prediction model using the test set;
[0025] Step 404: Use the out-of-bag error rate indicator to measure the model performance and draw an OOB error rate curve.
[0026] Further, step 5 includes the following steps 501 to 502:
[0027] Step 501, the importance of variables is expressed according to the MDA index, and the calculation formula of MDA is:
[0028]
[0029] Among them, feature j represents the jth dimension of the sample, T represents the number of random numbers in the random forest; X i ,y i Indicates a sample; Represents X i The j-th dimension of the sample is randomly exchanged; D t represents the out-of-bag (OOB) sample set of the random tree t, represents the sample set formed after the j-th dimension is exchanged; P(X i ) represents the prediction result of the sample; Represents the prediction result of the exchanged sample; MDA c (j) Variable importance of the j-th dimension sample; I(P(X i )==y i ) represents the indicator function, which returns 1 if the predicted result is the same as the true category, otherwise it returns 0;
[0030] Step 502: Output the OTUs of the species in descending order of importance, and then screen out the key species related to the organic pollution index in the sampled waters.
[0031] The present invention provides a method for early warning of red tide of Ceratium triangularis based on a random forest model, which has the following advantages over the prior art:
[0032] 1. The present invention provides a method for early warning of red tide of Ceratium triangularis based on a random forest model. In the season of red tide outbreak, by understanding the changes in environmental factors in the water environment, the organic pollution index is calculated to screen out key species related to the degree of water pollution, and the selected key species related to the organic pollution index are subjected to Pearson correlation analysis with Ceratium triangularis to screen out sensitive indicator organisms of red tide of Ceratium triangularis, and to carry out early warning of red tide, thereby improving the accuracy of prediction. The method of the present invention can send out early warning signals before the red tide breaks out, thus winning precious time for the timely implementation of emergency management and prevention and control measures.
[0033] 2. The present invention not only considers the diversity of plankton communities and the abundance reflected by the plankton community omics matrix data, but also combines the organic pollution index (OPI), an important water quality indicator. Through multi-factor comprehensive analysis, it can more comprehensively reflect the state and change trend of the marine ecosystem.
[0034] 3. The present invention applies a machine learning algorithm model to improve the accuracy of the model by constructing multiple decision trees and synthesizing their prediction results. Compared with the traditional single model, the method of the present invention can more accurately identify the key indicator species that may cause red tides, thereby improving the accuracy of red tide warnings.
[0035] 4. The method of the present invention is not only applicable to the early warning of C. tricornutum red tide, but also can adjust the model parameters and early warning indicators according to different regions and different red tide types, and has wide applicability and flexibility.
[0036] 5. The present invention adopts random forest. Compared with traditional statistical models, random forest can process high-dimensional and large-scale data, and is suitable for comprehensive analysis of various complex data such as zooplankton communities and environmental parameters. Random forest can capture nonlinear relationships and complex interactions between variables, and provide more accurate prediction results. Random forest can evaluate the importance of each feature, thereby screening out the most valuable indicators for red tide warning. Random forest has strong robustness to noise data and missing data, and has high model stability. BRIEF DESCRIPTION OF THE DRAWINGS
[0037] Figure 1 It is the overall flow chart provided by the present invention;
[0038] Figure 2 It is a schematic diagram of the process of the random forest-based Ceratium triangularis red tide early warning method provided by the present invention;
[0039] Figure 3 It is to screen out the key species related to zooplankton and organic pollution index (OPI);
[0040] Figure 4It is to screen out the key species related to phytoplankton and organic pollution index (OPI). DETAILED DESCRIPTION
[0041] like Figure 1-2 As shown, an example of the present invention provides a triangular hornwort red tide early warning method based on a random forest model, comprising the following process:
[0042] Step 1: Collect characteristic data of environmental factors in the predicted water area and perform standardization processing to obtain standardized environmental data.
[0043] The characteristic data of the collected environmental factors are standardized and the log function is used for data conversion:
[0044]
[0045] Among them, X represents the characteristic data of the collected environmental factors, log 10 max represents the maximum characteristic value of the monitored environmental factor; X′ represents the characteristic data of the environmental factor after standardization.
[0046] The environmental factors include, but are not limited to: temperature (T), dissolved oxygen (DO), total nitrogen (TN), inorganic nitrogen (DIN), nitrate nitrogen (NO3-N), inorganic phosphorus (DIP), silicate (SiO3-Si), total organic carbon (TOC), and chemical oxygen demand (COD).
[0047] The standardized environmental data includes characteristic data of environmental factors after standardization.
[0048] Step 2: Collect plankton from the water area, fix the samples with methanol solution, and use a microscope in the laboratory to identify and count the plankton samples from the water area to obtain the plankton community omics matrix data.
[0049] In step 2, a conical plankton net was used to collect plankton in the waters, including microzooplankton (37 cm diameter, mesh size 505 microns) and phytoplankton (37 cm diameter, mesh size 77 microns). Samples were collected by vertical trawl sampling multiple times from near the bottom to the water surface using a conical plankton net at each sampling point.
[0050] The samples were fixed with methanol solution, and the laboratory used a microscope to identify and count the plankton samples in the water.
[0051] Put one trawl net of each sampling point into a labeled plastic container and fix it with methanol solution. The final concentration of the methanol solution is 5%. In the laboratory, identify and count the samples fixed with methanol solution under a microscope. Subsequently, put the plankton trawl into a liquid nitrogen tank for biomass measurement. The liquid nitrogen samples are dried in an oven at 60 °C for 24 hours and then weighed to analyze the biomass (dry weight, DW) of planktonic microorganisms, obtaining the omics matrix data of the plankton community.
[0052] Step 3: Calculate the organic pollution index (OPI) according to the standardized environmental data;
[0053] In Step 3, the formula for calculating the organic pollution index (OPI) according to the standardized environmental data is as follows:
[0054] OPI = COD / COD s +DIN / DIN s +DIP / DIP s +DO / DO s
[0055] Among them, COD, DIN, DIP, and DO represent chemical oxygen demand, inorganic nitrogen, inorganic phosphorus, and dissolved oxygen respectively, and the unit is mg / L for all. COD S 、DIN S 、DIP S 、DO S are the standard contents of chemical oxygen demand, inorganic nitrogen, inorganic phosphorus, and dissolved oxygen, which are obtained according to the Chinese seawater quality standard content (GB3097 - 1997).
[0056] The result representation of the organic pollution index (OPI) value: 1 ≤ OPI ≤ 2 indicates low water pollution degree, 2 < OPI ≤ 4 indicates medium water pollution degree, and OPI > 4 indicates severe water pollution degree.
[0057] Table 1 Water pollution degree
[0058]
[0059] Step 4: Construct a random forest model based on the bagging algorithm, and perform model training and optimization to obtain a prediction model.
[0060] Step 401: Divide the omics matrix data of the plankton community into a training set and a test set.
[0061] Divide according to the ratio of the training set (70%) and the test set (30%). The random seed ensures that the results are repeatable; set the random seed to default to use 500 trees.
[0062] Step 402, construct a random forest model based on a bagging algorithm (bootstrap aggregating, Bagging), and use the training set to train the random forest model to obtain a prediction model.
[0063] Step 403: Evaluate the prediction model using the test set.
[0064] In step 402 and step 403, the train_predict parameter is set and the own data set is trained, and the training set is evaluated using the test set test_predict.
[0065] Step 404: Use the out-of-bag error rate (OOB) indicator to measure the model performance and draw an OOB error rate curve.
[0066] Step 5, read in the plankton community omics matrix data and the organic pollution index (OPI), perform repeated cross-validation, and screen out key species related to the organic pollution index (OPI) in the sampled waters.
[0067] Step 501, the variable importance is expressed according to the MDA (Mean Decrease Accuracy) index, and the calculation formula of MDA is:
[0068]
[0069] Among them, feature j represents the jth dimension of the sample, and T represents the number of random numbers in the random forest. i ,y i Represents a sample. Represents X i The j-th dimension of D is randomly exchanged. t represents the out-of-bag (OOB) sample set of the random tree t, represents the sample set formed after the j-th dimension is exchanged. i ) represents the prediction result of the sample. Represents the prediction result of the exchanged sample. MDA c (j) Variable importance of the j-th dimension sample. I(P(X i )==y i ) represents an indicator function that returns 1 if the predicted result is the same as the true category, otherwise it returns 0.
[0070] Step 502: Output the OTUs (Operational Taxonomy Units) of the species in descending order of importance, thereby screening out key species related to the organic pollution index in the sampled waters.
[0071] In step 5, the organic pollution index (OPI) and important species information were subjected to five repeated ten-fold cross validations to help screen out key species related to OPI. Figure 3 and Figure 4 As shown, the horizontal axis is the MDA importance index, and the vertical axis is the key species screened out that are related to OPI.
[0072] Step 6, conduct Pearson correlation analysis between the key species related to the organic pollution index screened out in step 5 and Ceratium triangularis, output all correlation degrees and sort them, identify species with correlations less than the correlation threshold as species related to Ceratium triangularis, and then determine the indicator organisms of Ceratium triangularis red tide.
[0073] The correlation threshold can be taken as 0.05, that is, species with correlation p < 0.05 are screened, which are indicator organisms of red tide of C. tricornutum.
[0074] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, a person of ordinary skill in the art should understand that modifying the technical solutions described in the aforementioned examples, or replacing some or all of the technical features therein by equivalents, does not cause the essence of the corresponding technical solutions to deviate from the scope of the various technical solutions of the present invention.
Claims
1. A triangular hornwort red tide early warning method based on a random forest model, characterized in that: The process includes: Step 1: Collect characteristic data of environmental factors in the predicted water area and perform standardization processing to obtain standardized environmental data; Step 2, collecting plankton in the water area, identifying and counting the plankton samples in the water area, and obtaining the plankton community omics matrix data; Step 3, calculating the organic pollution index based on standardized environmental data; Step 4: construct a random forest model based on the bagging algorithm, and perform model training and optimization to obtain a prediction model; Step 5, read in the plankton community omics matrix data and the organic pollution index, perform repeated cross-validation, and screen out key species related to the organic pollution index in the sampled waters; Step 6, conduct Pearson correlation analysis between the key species related to the organic pollution index screened out in step 5 and Ceratium triangularis, output all correlation degrees and sort them, identify species with correlations less than the correlation threshold as species related to Ceratium triangularis, and then determine the indicator organisms of Ceratium triangularis red tide.
2. The method for early warning of red tide of Ceratium triangularis based on random forest model according to claim 1, characterized in that: The environmental factors include, but are not limited to, temperature, dissolved oxygen, total nitrogen, inorganic nitrogen, nitrate nitrogen, inorganic phosphosilicate, total organic carbon, and chemical oxygen demand.
3. The method for early warning of red tide of Ceratium triangularis based on random forest model according to claim 2, characterized in that: In step 1, the characteristic data of the collected environmental factors are standardized and the log function is used for data conversion: Among them, X represents the characteristic data of the collected environmental factors, log 10 max represents the maximum characteristic value of the monitored environmental factor; X′ represents the characteristic data of the environmental factor after standardization.
4. The method for early warning of red tide of Ceratium triangularis based on random forest model according to claim 1, characterized in that: In step 2, a conical plankton net is used to collect plankton in the water area; the samples are fixed with a methanol solution, and the plankton samples in the water area are identified and counted using a microscope in the laboratory.
5. The method for early warning of red tide of Ceratium triangularis based on random forest model according to claim 1, characterized in that: In step 3, based on the standardized environmental data, the organic pollution index formula is calculated as follows: IPO=COD / COD s +DIN / DIN s +DIP / DIP s +DO / DO s Among them, COD, DIN, DIP, and DO represent chemical oxygen demand, inorganic nitrogen, inorganic phosphorus, and dissolved oxygen, respectively, and the unit is mg / L; COD S DIN S 、DIP S ,DO S It is the standard content of chemical oxygen demand, standard content of inorganic nitrogen, standard content of inorganic phosphorus, and standard content of dissolved oxygen.
6. The method for early warning of red tide of Ceratium triangularis based on random forest model according to claim 1, characterized in that: Step 4 includes the following steps 401 to 402: Step 401, dividing the plankton community omics matrix data into a training set and a test set; Step 402: construct a random forest model based on the bagging algorithm, and use the training set to train the random forest model to obtain a prediction model.
7. The method for early warning of red tide of Ceratium triangularis based on random forest model according to claim 6, characterized in that: After step 402, the method further includes steps 403 and 404: Step 403, evaluating the prediction model using the test set; Step 404: Use the out-of-bag error rate indicator to measure the model performance and draw an OOB error rate curve.
8. The method for early warning of red tide of Ceratium triangularis based on random forest model according to claim 7, characterized in that: Step 5 includes the following steps 501 to 502: Step 501, the importance of variables is expressed according to the MDA index, and the calculation formula of MDA is: Among them, feature j represents the jth dimension of the sample, T represents the number of random numbers in the random forest; X i ,y i Indicates a sample; Represents X i The j-th dimension of the sample is randomly exchanged; D t represents the out-of-bag (OOB) sample set of the random tree t, represents the sample set formed after the j-th dimension is exchanged; P(X i ) represents the prediction result of the sample; Represents the prediction result of the exchanged sample; MDA c (j) Variable importance of the j-th dimension sample; I(P(X i )==y i ) represents the indicator function, which returns 1 if the predicted result is the same as the true category, otherwise it returns 0; Step 502: Output the OTUs of the species in descending order of importance, and then screen out the key species related to the organic pollution index in the sampled waters.
Citation Information
Patent Citations
Quantitative prediction method for pollution degree of offshore water body based on pollution indicating flora
CN110308255A
Red tide early warning method for hornwort
CN115346600A
Method for screening red tide sensitive indicator organisms
CN115798597A
Ocean data processing and classifying method
CN117574272A
Cited By
Method for predicting seawater quality pollution degree based on sensitive phytoplankton
CN119884911A
