Sea area phytoplankton biodiversity index prediction method and system based on multi-model integration and feature engineering
By employing multi-model ensemble and feature engineering methods, nonlinear interactive features were constructed and marine environmental data was filtered. Combined with various machine learning models, the accuracy and adaptability issues of traditional methods in predicting phytoplankton biodiversity indices in marine environments were resolved, achieving more efficient prediction results.
Patent Information
- Application Number
- CN202510846831.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-24
- Publication Date
- 2025-10-17
AI Technical Summary
Traditional methods for predicting phytoplankton biodiversity indices struggle to delve into data features when faced with the complexity and variability of the marine environment. These methods suffer from poor model adaptability and a lack of effective feature interpretation mechanisms, resulting in unsatisfactory prediction outcomes.
We employ a multi-model ensemble and feature engineering approach. By constructing nonlinear interactive features, variance thresholding, and a multi-model ensemble framework, we combine linear regression, gradient boosting, random forest, and support vector regression models, and select the output of the support vector regression model as the prediction result.
The prediction accuracy of the phytoplankton biodiversity index and the generalization ability of the model have been improved, adapting to the complexity and variability of the marine environment, reducing the limitations of a single model, and improving the reliability and interpretability of the prediction.
Smart Images

Figure CN120805098A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The application belongs to the technical field of marine ecological environment monitoring and data analysis, and particularly relates to a marine phytoplankton biodiversity index prediction method and system based on multi-model integration and feature engineering. BACKGROUND
[0002] As the primary producers of marine ecosystems, the biodiversity index of phytoplankton is a key indicator for measuring the health of marine ecological environments. Accurate prediction of the biodiversity index of phytoplankton is of great significance for marine ecological environment protection, scientific management of fishery resources, and effective early warning of marine disasters.
[0003] However, the marine environment is highly complex and variable, which poses many challenges to traditional prediction methods in practical applications, making it difficult to achieve ideal prediction results. Specifically, the current common prediction methods have the following significant defects: first, the data features are not thoroughly and comprehensively mined, often only considering a single environmental factor or a simple linear relationship, while ignoring the complex interactions between environmental factors; second, the adaptability of the model is poor, making it difficult to effectively cope with the dynamic changes and uncertainties of marine environmental data; third, there is a lack of perfect and effective feature interpretation mechanism, which cannot deeply analyze the specific influence of environmental factors on the biodiversity of phytoplankton.
[0004] Therefore, there is an urgent need for a marine phytoplankton biodiversity index prediction method and system based on multi-model integration and feature engineering to solve the above problems. SUMMARY
[0005] The purpose of the present application is to provide a marine phytoplankton biodiversity index prediction method based on multi-model integration and feature engineering, comprising the following steps:
[0006] Obtain a marine environmental data set of a target sea area, wherein the marine environmental data set contains basic environmental factors and station information;
[0007] Preprocess the marine environmental data set, including converting time columns to date-time type, deleting columns with weak relevance to the prediction target, performing one-hot encoding on station information, converting non-numeric columns to numeric type, sorting and resetting the index according to the time column;
[0008] Construct four groups of nonlinear interaction features based on environmental factors: temperature-salinity relationship features, oxygen-salinity balance features, chlorophyll-chemical oxygen demand coupling features, and nitrogen-phosphorus ratio features;
[0009] Generate station features by one-hot encoding the station information, and merge them with the basic environmental factors and interaction features;
[0010] The merged feature set is subjected to variance threshold screening to remove low-variance features;
[0011] The screened feature set is input into a multi-model integration framework for prediction, which includes a linear regression model, a gradient boosting model, an extreme gradient boosting tree model, a random forest model, and a support vector regression model;
[0012] The output of the support vector regression model is selected as the prediction result of the phytoplankton biodiversity index according to the model performance index.
[0013] Further, the step of constructing four groups of nonlinear interaction features based on environmental factors includes:
[0014] The temperature-salinity relationship feature is generated by multiplying water temperature and pH value;
[0015] The oxygen-salinity balance feature is generated by the ratio of dissolved oxygen to salinity;
[0016] The chlorophyll-chemical oxygen demand coupling feature is generated by multiplying the natural logarithm value of chlorophyll a and chemical oxygen demand plus one;
[0017] The nitrogen-phosphorus ratio feature is generated by the ratio of total inorganic nitrogen to phosphate.
[0018] Further, the step of removing low-variance features from the merged feature set by variance threshold screening includes:
[0019] A fixed variance threshold of 0.01 is set;
[0020] The variance values of all features in the feature set are calculated;
[0021] Features with a variance below the threshold and empty columns are removed;
[0022] Standardization conversion processing is performed on the retained features.
[0023] Further, the step of inputting the screened feature set into a multi-model integration framework for prediction includes:
[0024] The historical data set is divided into a training set and a test set in chronological order;
[0025] A time series segmentation strategy is adopted: the training set is divided into consecutive subsets, with the former subset training the model and the latter adjacent subset verifying;
[0026] The five types of models are parameter-optimized;
[0027] The regularization strength is adjusted by the linear regression model;
[0028] The number, learning rate and depth of decision trees are adjusted by the gradient boosting model, and the support vector regression model is used to adjust the penalty coefficient and kernel function parameters.
[0029] Furthermore, the step of selecting the output of the support vector regression model as the phytoplankton biodiversity index prediction result according to the model performance index includes:
[0030] Calculate the coefficient of determination of each model in the test set;
[0031] When the coefficient of determination of the support vector regression model is greater than 0.8, its output value is directly used;
[0032] When the performance of the support vector regression model is insufficient, the prediction mean of the gradient boosting model and the extreme gradient boosting tree model is selected.
[0033] Furthermore, after selecting the output of the support vector regression model as the prediction result of the phytoplankton biodiversity index according to the model performance index:
[0034] Perform feature contribution analysis on gradient boosting, extreme gradient boosted trees, and random forest models;
[0035] The contribution of dissolved oxygen characteristics was calculated and ranged from 34% to 47.7%;
[0036] The contribution of the chlorophyll-chemical oxygen demand coupling feature was calculated and ranged from 13.3% to 19.1%.
[0037] The present invention also discloses a prediction system for marine phytoplankton biodiversity index based on multi-model integration and feature engineering, comprising:
[0038] An acquisition module is used to acquire a marine environment dataset of a target sea area, wherein the marine environment dataset includes basic environmental factors and station information;
[0039] a processing module for preprocessing the marine environment dataset, including converting the time column into a date and time type, deleting columns that are weakly correlated with the prediction target, performing one-hot encoding on the station information, converting non-numeric columns into numeric types, sorting by the time column, and resetting the index;
[0040] A construction module is used to construct four sets of nonlinear interaction features based on environmental factors: temperature-salinity relationship feature, oxygen-salt balance feature, chlorophyll chemical oxygen demand coupling feature, and nitrogen-phosphorus ratio feature;
[0041] The generation module is used to perform one-hot encoding on the station information to generate station features and merge them with basic environmental factors and interaction features;
[0042] The screening module is configured to perform variance threshold screening on the combined feature set to remove low-variance features.
[0043] The prediction module is configured to input the screened feature set into a multi-model integration framework to perform prediction, and the framework includes a linear regression model, a gradient boosting model, an extreme gradient boosting tree model, a random forest model, and a support vector regression model.
[0044] The output module is configured to select the output of the support vector regression model as the prediction result of the phytoplankton biodiversity index according to the model performance index.
[0045] Further, the prediction module includes:
[0046] The division unit is configured to divide the historical data set into a training set and a test set in chronological order.
[0047] The segmentation unit is configured to adopt a time series segmentation strategy, i.e., dividing the training set into continuous subsets, training the model with the front subset, and verifying with the rear adjacent subset.
[0048] The first adjustment unit is configured to adjust the parameters of the five types of models.
[0049] The second adjustment unit is configured to adjust the regularization strength through the linear regression model.
[0050] The third adjustment unit is configured to adjust the number of decision trees, the learning rate, and the depth through the gradient boosting type model, and adjust the penalty coefficient and the kernel function parameter through the support vector regression model.
[0051] The application further provides a computer device including a memory and a processor, wherein the memory stores a computer program, and the processor implements the steps of the above-mentioned method for predicting the phytoplankton biodiversity index in a sea area based on multi-model integration and feature engineering when executing the computer program.
[0052] The application further provides a computer-readable storage medium having a computer program stored thereon, and the computer program is executed by a processor to implement the steps of the above-mentioned method for predicting the phytoplankton biodiversity index in a sea area based on multi-model integration and feature engineering.
[0053] The application has the following beneficial effects:
[0054] The present invention can fully tap the potential information of marine environmental data based on the data distribution characteristics of environmental factors, combined with feature engineering and multi-model integration methods, effectively improving the prediction accuracy of the phytoplankton biodiversity index. By integrating multiple different types of machine learning models, it can fully adapt to the complexity and variability of marine environmental data and significantly improve the generalization ability and stability of the model. Different models can model and analyze data from different perspectives. By integrating the prediction results of multiple models, the limitations of a single model can be effectively reduced and the reliability of the prediction can be improved. BRIEF DESCRIPTION OF THE DRAWINGS
[0055] Figure 1 This is a flowchart of a method proposed in one embodiment of the present application.
[0056] Figure 2 FIG. 1 is a schematic diagram of a system structure according to an embodiment of the present invention.
[0057] The realization of the objectives, functional features and advantages of this application will be further explained in conjunction with embodiments and with reference to the accompanying drawings. DETAILED DESCRIPTION
[0058] It should be understood that the specific embodiments described herein are only used to explain the present invention and are not intended to limit the present invention.
[0059] like Figure 1 As shown, this application provides a method for predicting the marine phytoplankton biodiversity index based on multi-model integration and feature engineering, comprising the following steps:
[0060] S1, obtaining a marine environment dataset of a target sea area, wherein the marine environment dataset includes basic environmental factors and station information;
[0061] S2, preprocessing the marine environment dataset, including converting the time column into a date and time type, deleting columns that are weakly correlated with the prediction target, performing one-hot encoding on the station information, converting non-numeric columns into numeric types, sorting by the time column, and resetting the index;
[0062] It is worth noting that first, the file is read and the corresponding time column is converted to date-time type, which aims to lay the foundation for subsequent accurate processing of time series data, facilitate time-related analysis and feature engineering, then the data is preliminarily screened, and columns with weak correlation with the prediction target, such as the number of species, dominant species, etc. are deleted. These columns have relatively small influence on the target variable (phytoplankton biodiversity index) in this prediction task, deleting them can effectively reduce data redundancy and improve model training efficiency. Then the station column is processed by one-hot encoding to convert it into a numerical feature to meet the input requirements of machine learning models. One-hot encoding can convert categorical variables into binary vectors, each vector representing a specific category, thereby avoiding inappropriate numerical calculations of the model on categorical variables. All columns except the month column are forcibly converted to numerical types to ensure data consistency and accuracy. In actual data, there may be some non-numeric types of data, such as strings, null values, etc. By forced conversion, these data can be converted into processable numerical types. Finally, the data is sorted according to the month column and the index is reset to ensure the time sequence of the data and provide a standardized and ordered data basis for subsequent feature engineering and modeling.
[0063] S3, based on environmental factors, four groups of nonlinear interaction features are constructed: temperature-salinity relationship features, oxygen-salinity balance features, chlorophyll-chemical oxygen demand coupling features, and nitrogen-phosphorus ratio features.
[0064] S4, one-hot encoding is performed on the station information to generate station features, and the station encoded features are merged with the basic environmental factors and interaction features. The station encoded features are merged with the basic features and interaction features to fully consider the influence of different station marine environment differences on phytoplankton biodiversity. The water depth, water flow, and light conditions of different stations may differ significantly, and these factors will have an important impact on the distribution and growth of phytoplankton. Therefore, including station features in the model can effectively improve the prediction accuracy.
[0065] S5, variance threshold screening is performed on the merged feature set to remove low-variance features.
[0066] S6, the screened feature set is input into a multi-model integration framework for prediction, which includes linear regression model, gradient boosting model, extreme gradient boosting tree model, random forest model, and support vector regression model.
[0067] It is worth noting that before conducting formal modeling work, a comprehensive and detailed preliminary exploratory analysis of the data possessed should be conducted and a suitable model should be selected.
[0068] It mainly calculates the correlation coefficient between each environmental physicochemical index and the phytoplankton biodiversity index through the Pearson correlation coefficient analysis method, and can directly show the correlation between each variable by drawing a correlation matrix heat map. It can help to find out which indicators have a strong linear relationship, and which indicators may have a more significant impact on the phytoplankton biodiversity index. Based on the above analysis, it can be preliminarily judged that there is a linear and nonlinear relationship between the environmental physicochemical indexes, and there is a nonlinear relationship between the environmental physicochemical indexes and the phytoplankton biodiversity index.
[0069] However, due to the significant data distribution bias, discontinuous time series, dramatic fluctuations, obvious nonlinear characteristics, and limited sample size of the current environmental data set, traditional deep learning models that rely on large-scale data, as well as LSTM models that are good at capturing temporal patterns, are difficult to adapt. Therefore, during the model selection stage, linear models with strong generalization ability (Ridge regression) and algorithms with nonlinear fitting advantages such as gradient boosting trees (GBM), extreme gradient boosting (XGBoost), random forests (Random Forest), and support vector regression (SVR) are preferred to balance model complexity and data adaptability, and improve prediction performance.
[0070] S7, according to the model performance index, the output of the support vector regression model is selected as the prediction result of the phytoplankton biodiversity index.
[0071] As described in steps S1-S7 above, the present application can fully exploit the potential information of marine environmental data according to the data distribution characteristics of environmental factors, combined with feature engineering and multi-model integration method, effectively improve the prediction accuracy of phytoplankton biodiversity index, and through the integration of multiple different types of machine learning models, it can fully adapt to the complexity and variability of marine environmental data, significantly improve the generalization ability and stability of the model. Different models can model and analyze data from different angles, and by integrating the prediction results of multiple models, the limitations of single models can be effectively reduced, and the reliability of prediction can be improved.
[0072] In one embodiment, the step of constructing four groups of nonlinear interaction features based on environmental factors comprises:
[0073] It is worth mentioning that the environmental columns closely related to the growth and survival of phytoplankton are extracted from the preprocessed data as basic features, including water temperature, dissolved oxygen, pH, salinity, COD, chlorophyll a, NO3-N, NO2-N, NH4-N, TIN, SiO3-Si, PO4-P, etc. These environmental factors are important factors affecting phytoplankton biodiversity, providing basic data for subsequent feature construction.
[0074] S31, wherein the temperature-salinity feature is generated by multiplying water temperature and pH value, water temperature directly affects the metabolic rate of phytoplankton, and pH value affects the absorption and utilization efficiency of nutrients by phytoplankton, and the interaction of the two may have an important impact on the growth and reproduction of phytoplankton.
[0075] S32, wherein the oxygen-salinity balance feature is generated by the ratio of dissolved oxygen to salinity, dissolved oxygen is necessary for phytoplankton to perform respiration, and salinity affects the osmotic pressure regulation mechanism of phytoplankton, and the ratio of the two can reflect the combined effect of oxygen supply and salinity conditions in the marine environment on phytoplankton.
[0076] S33, wherein the chlorophyll-COD coupling feature is generated by multiplying chlorophyll-a and the natural logarithm value of COD plus one, chlorophyll-a is a key pigment for phytoplankton photosynthesis, reflecting the biomass of phytoplankton, and COD reflects the content of organic matter in the water body, and the combination of the two can reflect the relationship between phytoplankton and water organic matter.
[0077] S34, wherein the nitrogen-phosphorus ratio feature is generated by the ratio of total inorganic nitrogen to phosphate, nitrogen and phosphorus are key nutrients necessary for phytoplankton growth, and their ratio directly affects the community structure and biodiversity of phytoplankton.
[0078] As described in steps S31-S34 above, through the dimensionality processing of transforming single factors into interactive features, the isolated factors such as water temperature, salinity, and dissolved oxygen in the marine environment are transformed into composite features that can reflect synergistic effects and ecological mechanisms, so that the model can not only accurately capture data patterns, but also conform to the growth logic of phytoplankton, making the prediction both accurate (improving the R 2 ) and adaptable to ecology (explaining environmental impact mechanisms), so that the algorithm can adapt to marine ecological scenarios.
[0079] In one embodiment, the step of performing variance threshold screening on the merged feature set to remove low-variance features includes:
[0080] S51, setting a fixed variance threshold of 0.01;
[0081] S52, calculating the variance values of all features in the feature set;
[0082] S53, removing features with a variance below the threshold and empty columns;
[0083] S54, performing standardization conversion processing on the retained features.
[0084] As described in steps S51-S54, the generated features are screened to remove all empty columns and avoid invalid features interfering with model training. In actual data, some columns may be all NaN due to data missing or other reasons, which have no actual value for model training and thus need to be removed.
[0085] In one embodiment, the step of inputting the screened feature set into the multi-model integration framework for prediction includes:
[0086] S61, divide the historical data set into a training set and a test set in chronological order. The preprocessed data is divided into a training set and a test set in a ratio of 8:2. In the division process, random_state is set to 42 to ensure the repeatability of the results. The purpose of this division is to allow the model to learn and adjust parameters on the training set, and then evaluate on the test set to verify the generalization ability of the model on unseen data.
[0087] S62, adopt a time series segmentation strategy: divide the training set into consecutive subsets, train the model with the previous subset and validate with the adjacent subset, and normalize the data before model training. StandardScaler is used to convert the data to a standard normal distribution with a mean of 0 and a standard deviation of 1, eliminating the dimension difference between different features and improving the training effect of the model. VarianceThreshold is used for feature selection to remove features with a variance below a threshold (which can be set to 0.01 in this embodiment). Features with small variance may not contribute much to the model, and removing these features can reduce the feature dimension, reduce the complexity of the model, and avoid overfitting.
[0088] S63, parameter tuning for five types of models;
[0089] S64, adjust the regularization strength through a linear regression model;
[0090] S65, adjust the number of decision trees, learning rate and depth through gradient boosting type models, and adjust the penalty coefficient and kernel function parameters through a support vector regression model.
[0091] As described in steps S61-S65, refer to Table 1, define the parameter grid for each model,
[0092]
[0093]
[0094] Table 1
[0095] As shown in Table 1, the training set data is input into each model for training, parameter search and cross-validation are performed using GridSearchCV, the optimal model parameters are selected, then the trained model is strictly evaluated using the test set data, the mean square error (MSE) and the determination coefficient (R 2 ) and other evaluation indicators are calculated to comprehensively evaluate the prediction performance of the model, and the evaluation results of each model are recorded in detail, including MSE, R 2 and optimal parameters, and a comparison chart of prediction results is drawn to intuitively show the prediction effect of the model. By comparing the evaluation results of different models, the optimal model can be selected for prediction of phytoplankton biodiversity index.
[0096] The evaluation results of each model are shown in Table 2:
[0097] Model Name MSE [R 2 ]] Ridge Model 0.0446 0.4910 GBM Model 0.2529 0.5753 XGBoost Model 0.2308 0.6124 RandomForest Model 0.3169 0.4679 SVR Model 0.1008 0.8306
[0098] Table 2
[0099] In one embodiment, the step of selecting the output of the support vector regression model as the prediction result of the phytoplankton biodiversity index according to the model performance index comprises:
[0100] S71, calculating the determination coefficient index of each model on the test set;
[0101] S72, when the determination coefficient of the support vector regression model is greater than 0.8, directly using its output value;
[0102] S73, when the performance of the support vector regression model is insufficient, selecting the prediction mean value of the gradient boosting model and the extreme gradient boosting tree model.
[0103] As described in steps S71-S73 above, the application of support vector machine (SVM) in regression problems, the goal of SVR is to find a hyperplane such that the distance from all sample points to the hyperplane is less than a predetermined error range, while minimizing the complexity of the hyperplane, SVR has good performance in handling high-dimensional data, it can map the input features to high-dimensional space through kernel function, and find the optimal hyperplane in high-dimensional space, in the present application, the environmental physicochemical indicators may have high dimension, SVR can effectively handle this case, SVR can balance between model complexity and fitting error by introducing slack variables and penalty parameters, thereby improving the generalization ability of the model.
[0104] Preferably, R 2The SVR model that meets the standard uses its advantages in processing non-linear and small samples (suitable for complex factor relationships in marine environments). If the SVR model is not suitable, the mean of the GBM+XGBoost model should be used as a backup to avoid the problem of poor processing results of a single model, improve the reliability of the prediction results as a whole, and adapt to different data distributions (such as seasonal changes leading to changes in factor relationships) to make the prediction more stable.
[0105] In one embodiment, after selecting the output of the support vector regression model as the phytoplankton biodiversity index prediction result according to the model performance index, the following steps are further included:
[0106] S81, performing feature contribution analysis on the gradient boosting model, the extreme gradient boosting tree model and the random forest model;
[0107] S82, calculating the contribution degree of the dissolved oxygen feature, which ranges from 34% to 47.7%;
[0108] S83, calculating the contribution degree of the chlorophyll chemical oxygen demand coupling feature, which ranges from 13.3% to 19.1%.
[0109] As described in steps S81-S83 above, for tree models (GBM, XGBoost, RandomForest), the present embodiment uses SHAP analysis method to deeply analyze the influence degree of each feature on the model prediction result, and the specific steps are as follows:
[0110] Sample selection stage: dynamically determine the sample size, and select no more than 100 samples for SHAP analysis. This approach effectively reduces the amount of calculation and improves the analysis efficiency on the premise of ensuring the analysis effect.
[0111] Explanation generation stage: use shap.TreeExplainer to generate SHAP explanation and accurately calculate the contribution value of each feature to the model prediction result. SHAP value can accurately measure the influence size and direction of each feature on the model output. Positive value indicates that the feature has a positive impact on the model prediction result, and negative value indicates that it has a negative impact.
[0112] Visualization stage: draw SHAP feature importance chart to intuitively show the importance and influence direction of each feature. The top five influential features of each model are selected for display. Radar chart is used to visualize the SHAP contribution degree distribution of the top five features of the three models. The median value (41.2%) of the contribution degree of dissolved oxygen in the three models is marked as a reference line.
[0113]
[0114] Table 3
[0115] Referring to Table 3, that is, the shap analysis influence feature importance ranking, by analyzing the SHAP value of each feature, it can be accurately determined which environmental factors have greater influence on the phytoplankton biodiversity, and whether the influence is positive or negative, to provide scientific and accurate decision basis for marine ecological environment protection and management, through multi-model interpretability analysis, the biological rationality of the feature construction strategy of the scheme in the embodiment can be verified, which helps researchers to comprehensively understand the influence mechanism of environmental factors on the phytoplankton biodiversity, and the above description reveals the synergistic effect of organic matter degradation (COD) and primary productivity (chlorophyll a). Not only the biological rationality of the feature construction strategy is verified, but also scientific basis for marine ecological environment research and management is provided.
[0116] Dissolved oxygen ranks the first influencing factor (SHAP contribution 34.0%-47.7%) in the three models (GBM / XGBoost / RF), which is highly consistent with the phytoplankton respiration mechanism, and verifies the basic regulation effect of dissolved oxygen concentration on biodiversity, and through the feature chla_cod (chlorophyll a x ln(COD+1) in GBM / XGBoost model, the contribution degree is 13.3%-19.1%, which can reveal the synergistic effect of organic matter degradation (COD) and primary productivity (chlorophyll a).
[0117] Active phosphate (PO4-P) enters the top five influencing factors in the three models, and the SHAP value direction analysis shows that the concentration increase presents a negative effect on the diversity index (r=-0.32, p<0.01), which is consistent with the ecological response law of phosphorus-limited sea area, and nitrite (NO2-N) has significant contribution in GBM / RF model (4.4%-4.6%), indicating the potential influence of nitrogen cycle intermediates on the phytoplankton community structure.
[0118] The XGBoost model specifically identifies the single-factor contribution degree of chlorophyll a (11.8%), which reflects the sensitivity of the model to the biomass of primary producers, and the random forest model shows weak response to the composite feature chla_cod (5.2%), which highlights the adaptive analysis advantage of tree models for nonlinear relationships.
[0119] As Figure 2 shown, the application also discloses a marine phytoplankton biodiversity index prediction system based on multi-model integration and feature engineering, comprising:
[0120] An acquisition module is configured to acquire a marine environment data set of a target sea area, wherein the marine environment data set comprises basic environmental factors and station information;
[0121] a processing module, configured to preprocess the marine environment dataset, including converting a time column into a date-time type, deleting columns with weak relevance to a prediction target, performing one-hot encoding on station information, converting non-numeric columns into numeric types, sorting and resetting indexes according to time columns;
[0122] a construction module, configured to construct four groups of nonlinear interaction features based on environmental factors: temperature-salinity relationship features, oxygen-salinity balance features, chlorophyll-chemical oxygen demand coupling features, and nitrogen-phosphorus ratio features;
[0123] a generation module, configured to perform one-hot encoding on the station information to generate station features, and combine the station features with the basic environmental factors and the interaction features;
[0124] a screening module, configured to perform variance threshold screening processing on the combined feature set to remove low-variance features;
[0125] a prediction module, configured to input the screened feature set into a multi-model integration framework for prediction, the framework including a linear regression model, a gradient boosting model, an extreme gradient boosting tree model, a random forest model, and a support vector regression model;
[0126] an output module, configured to select an output of the support vector regression model as a prediction result of the phytoplankton biodiversity index according to a model performance index.
[0127] In one embodiment, the prediction module includes:
[0128] a division unit, configured to divide the historical dataset into a training set and a test set in chronological order;
[0129] a segmentation unit, configured to adopt a time series segmentation strategy: dividing the training set into continuous subsets, training the model with the former subsets, and verifying with the latter adjacent subsets;
[0130] a first adjustment unit, configured to adjust parameters of the five types of models;
[0131] a second adjustment unit, configured to adjust the regularization strength through the linear regression model;
[0132] a third adjustment unit, configured to adjust the number of decision trees, the learning rate, and the depth through the gradient boosting type models, and adjust the penalty coefficient and the kernel function parameters through the support vector regression model.
[0133] The application further provides a computer device including a memory and a processor, the memory storing a computer program, and the processor implementing the steps of the above-mentioned marine phytoplankton biodiversity index prediction method based on multi-model integration and feature engineering when executing the computer program.
[0134] The application further provides a computer readable storage medium, which stores a computer program, and the computer program is executed by a processor to implement the steps of the method for predicting a marine phytoplankton biodiversity index based on multi-model integration and feature engineering.
[0135] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by a computer program instructing related hardware, and the computer program can be stored in a non-volatile computer readable storage medium. When the computer program is executed, the computer program can include the processes of the above-mentioned embodiments of the method. Any reference to memory, storage, value library or other medium provided by the application and used in the embodiments can include non-volatile and / or volatile memory. Non-volatile memory can include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM) or flash memory. Volatile memory can include random access memory (RAM) or external cache memory. As an illustration but not limitation, RAM is available in various forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (SSRSDRAM), enhanced SDRAM (ESDRAM), synchronous link (Synchlink) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM).
[0136] It should be noted that in this document, the terms "comprising", "containing", or any other similar term are intended to encompass non-exclusive inclusions, so that a process, device, article or method that includes a series of elements includes not only those elements, but also other elements not explicitly listed, or elements inherent to such a process, device, article or method. Without more limitations, the element defined by the statement "comprising a" does not exclude the presence of other identical elements in the process, device, article or method that includes the element.
[0137] The above only describes the preferred embodiments of the application, and does not limit the scope of the application. Any equivalent results or equivalent process transformations obtained by using the content of the specification and drawings, or direct or indirect application in other related technical fields, are also included in the protection scope of the application.
Claims
1. A method for predicting marine phytoplankton biodiversity index based on multi-model integration and feature engineering, characterized by: The following steps are involved: Acquire a marine environment dataset of the target sea area, wherein the marine environment dataset includes basic environmental factors and station information; Preprocessing the marine environment dataset includes converting the time column into a date and time type, deleting columns that are weakly correlated with the prediction target, performing one-hot encoding on the station information, converting non-numeric columns into numeric types, sorting by the time column, and resetting the index; Four groups of nonlinear interaction characteristics were constructed based on environmental factors: temperature-salinity relationship characteristics, oxygen-salt balance characteristics, chlorophyll chemical oxygen demand coupling characteristics, and nitrogen-phosphorus ratio characteristics. Perform one-hot encoding on the station information to generate station features, and merge them with basic environmental factors and interaction features; Perform variance threshold screening on the merged feature set to remove low-variance features; The filtered feature set is input into a multi-model ensemble framework for prediction, wherein the framework includes a linear regression model, a gradient boosting model, an extreme gradient boosting tree model, a random forest model, and a support vector regression model; The output of the support vector regression model was selected as the prediction result of the phytoplankton biodiversity index based on the model performance indicators.
2. The method for predicting marine phytoplankton biodiversity index based on multi-model integration and feature engineering according to claim 1, characterized in that: The step of constructing four sets of nonlinear interaction features based on environmental factors includes: The temperature-salinity relationship characteristic is generated by multiplying the water temperature and the pH value; The oxygen-salt balance characteristic is generated by the ratio of dissolved oxygen to salinity; The chlorophyll-chemical oxygen demand coupling characteristic is generated by multiplying the natural logarithm of chlorophyll a and the chemical oxygen demand plus one; The nitrogen to phosphorus ratio profile is generated from the ratio of total inorganic nitrogen to phosphate.
3. The method for predicting marine phytoplankton biodiversity index based on multi-model integration and feature engineering according to claim 1, characterized in that: The step of performing variance threshold screening on the merged feature set to remove low-variance features includes: Set a fixed variance threshold of 0.01; Calculate the variance values of all features in the feature set; Remove features with variance below the threshold and all empty columns; Performs a normalization transformation on the retained features.
4. The method for predicting marine phytoplankton biodiversity index based on multi-model integration and feature engineering according to claim 1, characterized in that: The step of inputting the filtered feature set into the multi-model integration framework for prediction includes: Divide the historical data set into training set and test set in chronological order; Adopt the time series segmentation strategy: divide the training set into continuous subsets, train the model with the first subset, and verify it with the next adjacent subset; Parameter tuning for five types of models; Adjust the regularization strength through the linear regression model; The number, learning rate and depth of decision trees are adjusted by the gradient boosting model, and the support vector regression model is used to adjust the penalty coefficient and kernel function parameters.
5. The method for predicting marine phytoplankton biodiversity index based on multi-model integration and feature engineering according to claim 1, characterized in that: The step of selecting the output of the support vector regression model as the phytoplankton biodiversity index prediction result according to the model performance index includes: Calculate the coefficient of determination of each model in the test set; When the coefficient of determination of the support vector regression model is greater than 0.8, its output value is directly used; When the performance of the support vector regression model is insufficient, the prediction mean of the gradient boosting model and the extreme gradient boosting tree model is selected.
6. The method for predicting marine phytoplankton biodiversity index based on multi-model integration and feature engineering according to claim 1, characterized in that: It also includes the following after selecting the output of the support vector regression model as the prediction result of the phytoplankton biodiversity index based on the model performance indicators: Perform feature contribution analysis on gradient boosting, extreme gradient boosted trees, and random forest models; The contribution of dissolved oxygen characteristics was calculated and ranged from 34% to 47.7%; The contribution of the chlorophyll-chemical oxygen demand coupling feature was calculated and ranged from 13.3% to 19.1%.
7. A prediction system for marine phytoplankton biodiversity index based on multi-model integration and feature engineering, characterized by: include: An acquisition module is used to acquire a marine environment dataset of a target sea area, wherein the marine environment dataset includes basic environmental factors and station information; a processing module for preprocessing the marine environment dataset, including converting the time column into a date and time type, deleting columns that are weakly correlated with the prediction target, performing one-hot encoding on the station information, converting non-numeric columns into numeric types, sorting by the time column, and resetting the index; A construction module is used to construct four sets of nonlinear interaction features based on environmental factors: temperature-salinity relationship feature, oxygen-salt balance feature, chlorophyll chemical oxygen demand coupling feature, and nitrogen-phosphorus ratio feature; The generation module is used to perform one-hot encoding on the station information to generate station features and merge them with basic environmental factors and interaction features; The screening module is used to perform variance threshold screening on the merged feature set to remove low-variance features; A prediction module is used to input the filtered feature set into a multi-model integration framework for prediction, which includes a linear regression model, a gradient boosting model, an extreme gradient boosting tree model, a random forest model, and a support vector regression model; The output module is used to select the output of the support vector regression model as the prediction result of the phytoplankton biodiversity index according to the model performance index.
8. A marine phytoplankton biodiversity index prediction system based on multi-model integration and feature engineering, characterized by: The prediction module includes: A partitioning unit is used to divide the historical data set into a training set and a test set in chronological order; The segmentation unit is used to adopt the time series segmentation strategy: the training set is divided into continuous subsets, the model is trained on the first subset, and the model is verified on the second adjacent subset; The first adjustment unit is used to tune the parameters of the five types of models; A second adjustment unit is used to adjust the regularization strength through a linear regression model; The third adjustment unit is used to adjust the number, learning rate and depth of decision trees through the gradient improvement model, and the support vector regression model is used to adjust the penalty coefficient and kernel function parameters.
9. A computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 6 are implemented.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 6 are implemented.
Citation Information
Cited By
Method for predicting abundance of plankton by using marine ecological observation data
CN121257876A
A method for predicting plankton abundance using marine ecological observation data
CN121257876B
Method and device for identifying evolution of functional groups of marine phytoplankton
CN121858928A