Estuary chlorophyll concentration inversion method based on multi-model fusion
Through ESTARFM fusion of MODIS and Landsat remote sensing images, combined with the fusion of random forest and GBR models, the TPE search weight method is used to solve the problem that remote sensing images cannot achieve high spatiotemporal resolution and the difficulty of accurately inversion of chlorophyll a concentration in a single machine learning model. High-precision estuary chlorophyll a concentration inversion is achieved.
Patent Information
- Application Number
- CN202411451888.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-17
- Publication Date
- 2025-02-11
- Estimated Expiration
- 2044-10-17
AI Technical Summary
Existing remote sensing images cannot achieve high spatial and temporal resolution at the same time, resulting in poor inversion accuracy of chlorophyll a concentration in the estuary, and a single machine learning model is difficult to accurately use estuary remote sensing data to invert chlorophyll a concentration.
ESTARFM is used to fuse MODIS and Landsat remote sensing images to obtain high spatial and temporal resolution remote sensing images, and to fusion inversion model is established by fusion of random forest model and GBR model using the TPE search weight method.
Remote sensing image acquisition with high spatial and temporal resolution is achieved, the accuracy and accuracy of chlorophyll a concentration inversion in the estuary is improved, and it is adapted to the complex environmental conditions of the estuary.
Smart Images

Figure CN119418218A_ABST
Abstract
Description
Technical Field
[0001] The invention belongs to the technical field of water quality monitoring and relates to an estuary chlorophyll a concentration inversion method based on multi-model fusion. Background Art
[0002] In recent years, with the development of economy and population growth, eutrophication has occurred frequently in estuaries, which seriously affects the livable environment and sustainable development of human beings. As an important indicator of eutrophication of water bodies, chlorophyll a concentration can directly reflect the eutrophication degree of water bodies and evaluate the health of water bodies. Therefore, it is very necessary to invert the chlorophyll a concentration in estuaries. There are generally two methods for inverting chlorophyll a concentration: one is the measurement method, which obtains accurate water quality data through field sampling and laboratory analysis. Although the results are more accurate, the operation process is time-consuming and laborious when monitoring water quality over a large area. The second is remote sensing inversion, which infers the distribution of chlorophyll a in water through observation data and mathematical models. It has low time and economic costs and is widely used. Currently, commonly used inversion methods include empirical methods, analytical methods, semi-empirical and semi-analytical methods, and machine learning methods.
[0003] However, existing remote sensing images cannot achieve high temporal and spatial resolution at the same time: images with low spatial resolution will cause deviations in the inversion results of chlorophyll a, while remote sensing images with high spatial resolution are often accompanied by low temporal resolution, that is, it takes more than ten days or even a month to obtain a remote sensing image, and most images will be disturbed by weather conditions such as clouds and rain, resulting in few usable remote sensing images. In addition, existing technologies use machine learning models to simulate the relationship between remote sensing data and chlorophyll a concentration for inverting chlorophyll a concentration. However, it is difficult to accurately invert chlorophyll a concentration using estuarine remote sensing data using a single machine learning model, mainly because of the heterogeneity and complexity of data in the estuarine area, including the influence of multiple environmental factors. There is usually a nonlinear relationship between chlorophyll a concentration and remote sensing reflectivity, which is difficult to fully capture with a single model. In addition, the efficiency of feature selection and extraction, overfitting problems, and differences in feature distribution caused by spatiotemporal changes will affect the accuracy of predictions. The lack of flexibility and adaptability of a single model often cannot meet the needs of estuarine data analysis. Summary of the invention
[0004] The present invention provides an estuarine chlorophyll a concentration inversion method based on multi-model fusion, aiming to use ESTARFM to fuse pre-processed MODIS and Landsat remote sensing images to obtain remote sensing images with high temporal and spatial resolution, so as to solve the problem that existing remote sensing images cannot simultaneously achieve high temporal and spatial resolution; the reflectivity of the band combination screened out from the remote sensing image is used as input, and the corresponding monitored chlorophyll a concentration is used as output, and a random forest model and a GBR model are respectively constructed; the TPE search weight method is used to establish a fusion model of the random forest model and the GBR model, so as to solve the problem that the single machine learning model in the prior art has poor inversion accuracy for estuarine chlorophyll a.
[0005] The purpose of the present invention can be achieved through the following technical solutions:
[0006] The present application provides a method for inverting chlorophyll a concentration in an estuary based on multi-model fusion, comprising the following steps:
[0007] S1. Acquire estuary monitoring data for a specific time period, wherein the estuary monitoring data includes chlorophyll a concentration and MODIS remote sensing images and Landsat8 remote sensing image data for a corresponding time period;
[0008] S2. Use ESTARFM to fuse MODIS remote sensing images and Landsat8 remote sensing images to obtain high temporal and spatial resolution remote sensing images;
[0009] S3, obtaining the reflectance of different band combinations of high temporal and spatial resolution remote sensing images, and calculating the Pearson correlation coefficient between the reflectance and chlorophyll a concentration;
[0010] S4. Determine the band combination with significant correlation between reflectance and chlorophyll a concentration according to the Pearson correlation coefficient, and record it as a highly correlated band combination;
[0011] S5, taking the reflectance of the highly correlated band combination as the explanatory variable and the chlorophyll a concentration as the response variable, respectively establishing a random forest model and a GBR model;
[0012] S6. Use TPE search weight method to establish a fusion inversion model of random forest model and GBR model;
[0013] S7. Obtain high temporal and spatial resolution remote sensing images of the estuary to be monitored, input the reflectivity of the highly correlated band combination into the fusion inversion model, and invert the chlorophyll a concentration of the estuary to be monitored.
[0014] Furthermore, the MODIS remote sensing image is downloaded from NASA's official website and preprocessed, including:
[0015] Screening of remote sensing images: Download MODIS remote sensing images from NASA's official website and select remote sensing images with little cloud cover and no more than 7 days from the monitoring time;
[0016] Remote sensing image radiometric calibration and geometric correction: Download the MODIS processing plug-in MTCK in ENVI, then import the MODIS remote sensing data in MTCK and select the WGS-84 coordinate system;
[0017] Water body extraction: Extract estuarine waters based on the NDWI water body index and perform band operations using Band math in ENVI.
[0018] Furthermore, the NDWI water index is calculated as follows:
[0019]
[0020] In the formula, Green represents the green band of MODIS remote sensing image, which corresponds to the 4th band among 36 bands; NIR represents the near infrared band of MODIS remote sensing image, which corresponds to the 2nd band among 36 bands; NDWI is the water body index.
[0021] Furthermore, the Landsat remote sensing image is acquired in the geospatial data cloud and preprocessed, including:
[0022] Screening of remote sensing images: Download Landsat8 remote sensing images from the Geospatial Data Cloud and select remote sensing images with less cloud cover and the closest time to MODIS remote sensing images;
[0023] Remote sensing image radiometric calibration: convert the DN value recorded by the sensor into a radiometric brightness value. The DN value is the grayscale value of the recorded object.
[0024] Atmospheric correction of remote sensing images: Perform atmospheric correction on Landsat8 remote sensing images in the FLAASH Atmospheric Correction tool in ENVI to eliminate the images produced by electromagnetic waves passing through the atmosphere and the impact of the reflection of atmospheric substances on ground objects.
[0025] Water body extraction: Extract estuarine waters based on the NDWI water body index and perform band operations using Band math in ENVI.
[0026] Furthermore, in step S2, the use of ESTARFM to fuse the MODIS remote sensing image and the Landsat8 remote sensing image to obtain a high temporal and spatial resolution remote sensing image includes the following steps:
[0027] Select reference images: select Landsat 8 remote sensing images as high-resolution images and MODIS remote sensing images as low-resolution images;
[0028] By constructing a spatiotemporal model, the spectral information of MODIS remote sensing images and the spatial information of Landsat 8 remote sensing images are fused;
[0029] Generate high temporal and spatial resolution images. The generated images retain the high spatial resolution of Landsat 8 remote sensing images while introducing the timeliness of MODIS remote sensing images.
[0030] Furthermore, in step S3, the Pearson correlation coefficient is calculated by the following formula:
[0031]
[0032] Where p represents the Pearson correlation coefficient between chlorophyll a concentration and reflectance of different band combinations of high temporal and spatial resolution remote sensing images; R(x i ) represents the ith sample value of chlorophyll a concentration; R(y i ) represents the i-th sample value of the reflectance of different band combinations of high temporal and spatial resolution remote sensing images; R(x) is the average value of all samples of chlorophyll a concentration; R(y) represents the average value of all samples of the reflectance of different band combinations of high temporal and spatial resolution remote sensing images.
[0033] Furthermore, in step S5, the random forest model includes the following construction steps:
[0034] Data preparation: Collect reflectance data and corresponding chlorophyll a concentration data of different band combinations of high temporal and spatial resolution remote sensing images; divide the data set into training set and test set;
[0035] Parameter setting: determine the number of decision trees in the random forest, set the maximum depth of the decision tree, and determine the minimum number of sample splits;
[0036] Model training: Use the training set data to train the random forest model, take the reflectance data of the highly correlated band combination as the input feature, and the chlorophyll a concentration data as the target variable to build a random forest model; during the model training process, multiple decision trees are built according to the set parameters. Each decision tree grows on a randomly selected sample set and randomly selected features to learn the relationship between reflectance and chlorophyll a concentration;
[0037] Model evaluation: The reflectance data in the test set is passed into the model to obtain the chlorophyll a concentration value predicted by the model; the evaluation indicators are calculated, including the mean square error, the mean absolute error and the determination coefficient.
[0038] Further, in step S5, the GBR model includes the following steps:
[0039] Data preparation: Collect reflectance data of different band combinations of high temporal and spatial resolution remote sensing images and the corresponding chlorophyll a concentration data; divide the data set into training set and test set;
[0040] Parameter initialization: Determine the initial values of model parameters, including learning rate, number of weak learners, maximum depth of decision tree and minimum number of sample splits;
[0041] Model training: Use the training set data to train the GBR model, take the reflectance data of the highly correlated band combination as the input feature, and the chlorophyll a concentration data as the target variable to build the GBR model; in each iteration, the model calculates the gradient of the loss function according to the current prediction error; train a new decision tree as a weak learner based on the gradient information to reduce the loss function; add the new decision tree to the GBR model, and work together with the previous weak learner to gradually improve the performance of the model; repeat the model training process until the preset number of iterations is reached or the stop condition is met;
[0042] Model evaluation: Use the test set data to evaluate the trained GBR model.
[0043] Further, in step S6, the TPE search weight method is used to establish a fusion inversion model of the random forest model and the GBR model, including the following steps:
[0044] Define objective function: define an objective function that receives a set of parameters, including the weights and hyperparameters of the random forest model and the GBR model; within the objective function, use the given weights to fuse the prediction results of the random forest model and the GBR model; use the training set to train the random forest model and the GBR model, and evaluate the performance of the fused model on the test set; return the value of the evaluation indicator as the output of the objective function;
[0045] Use TPE for parameter search: define the parameter space in Python, which includes the weights of the random forest model and the GBR model and the range of hyperparameters; use the fmin function of hyperopt for parameter search, specify the search algorithm as TPE, and set the maximum number of evaluations;
[0046] Construct a fusion inversion model: construct a fusion inversion model based on the optimal weight parameters obtained through the search; retrain the random forest model and the GBR model using the training set; during prediction, use the optimal weight parameters to fuse the prediction results of the two models;
[0047] Model evaluation and application: Use the test set data to evaluate the fusion inversion model, and analyze the performance of the model based on the evaluation results.
[0048] Furthermore, the hyperparameters include the number of decision trees in the random forest, the maximum depth of the decision tree, the minimum number of samples required for the decision tree to split, the minimum number of samples required for leaf nodes, the learning rate in the GBR model, the number of weak learners, the maximum depth of the decision tree, and the proportion of samples used in each iteration.
[0049] Furthermore, the prediction results of the random forest model and the GBR model are fused using given weights, specifically using a weighted average method.
[0050] Beneficial effects of the present invention:
[0051] (1) ESTARFM is used to fuse MODIS remote sensing images and Landsat8 remote sensing images to obtain high temporal and spatial resolution remote sensing images, solving the problem that existing remote sensing images cannot achieve high temporal and spatial resolution at the same time, resulting in poor inversion accuracy of chlorophyll a concentration in estuaries;
[0052] (2) The reflectivity of the band combination screened out from the high temporal and spatial resolution remote sensing images was used as input, and the corresponding monitored chlorophyll a concentration was used as output to construct a random forest model and a GBR model respectively. The TPE search weight method was used to establish a fusion model of the random forest model and the GBR model to solve the problem that a single machine learning model in the existing technology cannot adapt to the complex environmental conditions of the estuary, resulting in low accuracy in the inversion of chlorophyll a concentration in the estuary. BRIEF DESCRIPTION OF THE DRAWINGS
[0053] In order to facilitate understanding by those skilled in the art, the present invention is further described below with reference to the accompanying drawings.
[0054] Figure 1 The present invention is a flowchart of a method for inverting chlorophyll a concentration in an estuary based on multi-model fusion.
[0055] Figure 2 The present invention is a flowchart of obtaining high temporal and spatial resolution remote sensing images in one embodiment of the present invention.
[0056] Figure 3 The figure is a flow chart of constructing a fusion inversion model in one embodiment of the present invention. DETAILED DESCRIPTION
[0057] In order to further explain the technical means and effects adopted by the present invention to achieve the predetermined invention purpose, the specific implementation mode, structure, characteristics and effects of the present invention are described in detail below in combination with the accompanying drawings and preferred embodiments.
[0058] See also Figure 1-Figure 3 The present application provides a method for inverting chlorophyll a concentration in an estuary based on multi-model fusion, comprising the following steps:
[0059] S1. Acquire estuary monitoring data for a specific time period, wherein the estuary monitoring data includes chlorophyll a concentration and MODIS remote sensing images and Landsat8 remote sensing image data for a corresponding time period;
[0060] In this embodiment, the specific time period is at least one year or more, and the chlorophyll a concentration is obtained through the estuary water quality monitoring station. In order to improve the accuracy and quality of the data, the data needs to be preprocessed, including outlier processing, data normalization, etc. MODIS remote sensing images are downloaded from NASA's official website, and MODIS remote sensing images are preprocessed by radiometric calibration, geometric correction, cropping, etc., including the following steps:
[0061] (1) Screening of remote sensing images: Download MODIS remote sensing images from NASA's official website and select remote sensing images with little cloud cover and that are no more than 7 days old. You can directly check the cloud cover on NASA's official website and select appropriate images to download.
[0062] (2) Remote sensing image radiation calibration and geometric correction: Download the MODIS processing plug-in MTCK in ENVI, and then import the MODIS remote sensing data in MTCK. The parameter settings are as follows:
[0063] Output Type: Select Strict Georeferencing;
[0064] Processing Options: Select Remote Sensing Reflectance;
[0065] Resampling method: Select the nearest neighbor method to resample and try to retain the original data;
[0066] Use double precision format data: If you select Yes, the reflectivity data will have more decimal places;
[0067] Coordinate system: Select the WGS-84 coordinate system to facilitate the subsequent acquisition of the reflectance corresponding to the chlorophyll concentration of the monitoring station. After the preprocessing is completed, the pixel represents the reflectance.
[0068] (3) Water body extraction: After completing the above steps, the required remote sensing image is obtained. Then it is necessary to eliminate the non-water body area. The estuary water area can be extracted based on the NDWI water body index. This step requires band calculation in Bandmath in ENVI. The calculation formula is as follows:
[0069]
[0070] In the formula, Green represents the green band of MODIS remote sensing image, which corresponds to the 4th band among the 36 bands; NIR represents the near-infrared band of MODIS remote sensing image, which corresponds to the 2nd band among the 36 bands; NDWI is the water body index.
[0071] Landsat data is acquired in the geospatial data cloud, and remote sensing images are pre-processed by radiometric calibration, atmospheric correction, and cropping, including the following steps:
[0072] (1) Screening of remote sensing images: Download Landsat8 remote sensing images from the Geospatial Data Cloud and select remote sensing images with less cloud cover and the closest to MODIS time. Most of the data can be directly viewed for cloud cover, while a small part needs to be downloaded and viewed in ENVI.
[0073] (2) Remote sensing image radiometric calibration: This step mainly converts the DN value recorded by the sensor into a radiometric brightness value. The DN value is the grayscale value of the recorded object. This is done in the Radiometric Calibration tool of ENVI.
[0074] (3) Atmospheric correction of remote sensing images: This step is mainly to eliminate the images produced by electromagnetic waves passing through the atmosphere and the influence of atmospheric substances on the reflection of ground objects. It is performed in the FLAASH Atmospheric Correction tool in ENVI.
[0075] (4) Water body extraction: The water body method of Landsat8 is the same as that of MODIS. Band math in ENVI is used for band calculation. Due to the different satellites used, the green band and near-infrared band represent the 2nd and 4th bands in Landsat8, respectively.
[0076] S2. Use ESTARFM to fuse MODIS remote sensing images and Landsat8 remote sensing images to obtain high temporal and spatial resolution remote sensing images;
[0077] In this embodiment, ESTARFM (Enhanced Spatial and Temporal AdaptiveReflectance Fusion Model) is used to fuse MODIS and Landsat 8 remote sensing images to obtain remote sensing images with high temporal and spatial resolution. This process is implemented in the LDL workbench in ENVI. Before fusion, you first need to prepare the remote sensing image data of MODIS and Landsat 8 to ensure that the time and spatial ranges of the two data sets overlap. At the same time, pay attention to the format and band of the data. Landsat 8 images usually have a higher spatial resolution (30 meters), while MODIS images provide a higher temporal resolution (once a day) and a spatial resolution of 1000 meters. The ESTARFM model needs to calculate some basic parameters, including:
[0078] Spectral Reflectance: Extract spectral reflectance data from MODIS and Landsat 8.
[0079] Time Difference: Calculate the difference in acquisition time between MODIS and Landsat 8 images so as to interpolate the time when fusion is performed.
[0080] When performing an ESTARFM fusion, follow these steps:
[0081] (1) Select reference images: Select Landsat8 as the high-resolution image and MODIS as the low-resolution image.
[0082] (2) By constructing a spatiotemporal model, the spectral information of MODIS and the spatial information of Landsat 8 are integrated.
[0083] (3) Generate high spatial and temporal resolution images: The generated images will retain the high spatial resolution of Landsat 8 while introducing the timeliness of MODIS.
[0084] S3, obtaining the reflectance of different band combinations of high temporal and spatial resolution remote sensing images, and calculating the Pearson correlation coefficient between the reflectance and chlorophyll a concentration;
[0085] Obtaining the reflectance of different band combinations of high temporal and spatial resolution remote sensing images and calculating the Pearson correlation coefficient between them and chlorophyll a concentration is of great significance for studying water environment, etc. First, data preparation is carried out to collect high temporal and spatial resolution remote sensing image data and chlorophyll a concentration data of the corresponding area. Then the remote sensing image is preprocessed, including radiation correction to eliminate the influence of sensors and atmosphere, obtain accurate reflectance values, and geometric correction to ensure matching with the actual geographical location. Then different bands are selected for combination according to the research purpose, and the reflectance of each band combination is calculated. After that, the reflectance data and chlorophyll a concentration data are sorted out to make them correspond one by one. The Pearson correlation coefficient is calculated using statistical software or programming language, and its formula comprehensively considers the relationship between different data points and the average value. The correlation coefficient takes values between -1 and 1, close to 1 for positive correlation, close to -1 for negative correlation, and close to 0 for no linear relationship. This coefficient can be used to determine the degree of correlation between reflectance and chlorophyll a concentration, providing a strong basis for subsequent research and application, and helping to better understand the water ecosystem, etc.
[0086] Furthermore, the Pearson correlation coefficient is calculated as follows:
[0087]
[0088] Where p represents the Pearson correlation coefficient between chlorophyll a concentration and reflectance of different band combinations of high temporal and spatial resolution remote sensing images, R(x i ) represents the ith sample value of chlorophyll a concentration; R(y i ) represents the i-th sample value of the reflectance of different band combinations of high temporal and spatial resolution remote sensing images, R(x) is the average value of all chlorophyll a concentration samples; R(y) represents the average value of all reflectance samples of different band combinations of high temporal and spatial resolution remote sensing images.
[0089] S4. Determine the band combination with significant correlation between reflectance and chlorophyll a concentration according to the Pearson correlation coefficient, and record it as a highly correlated band combination;
[0090] Generally speaking, when the absolute value of the Pearson correlation coefficient reaches 0.7 or above, it can be considered to be highly correlated. A correlation coefficient between 0.7 and 1 indicates that there is a strong positive correlation between the variables; between -0.7 and -1, it indicates that there is a strong negative correlation. However, the definition of "high correlation" is not absolute. In different specific application scenarios, the threshold of the correlation coefficient may be adjusted according to the actual situation. In this embodiment, the enumeration method is used in python to combine the bands in the chlorophyll a inversion data, and double-band, three-band, and four-band combinations are created respectively, and a total of more than 2w combinations are obtained. Then, a Pearson correlation analysis is performed in SPSS, and it is found that the correlation between the three-band and four-band combinations and chlorophyll a is higher than that between the single-band and double-band combinations. Therefore, the three-band and four-band combinations with high correlation are selected for the establishment of the subsequent chlorophyll a concentration inversion.
[0091] S5, taking the reflectance of the highly correlated band combination as the explanatory variable and the chlorophyll a concentration as the response variable, respectively establishing a random forest model and a GBR model;
[0092] In the present embodiment, the random forest model plays an important role in the study of the relationship between the reflectance of the highly correlated band combination and the chlorophyll a concentration. The random forest is essentially an integrated learning model composed of many decision trees. In the data preparation stage, we use the reflectance of the highly correlated band combination as the explanatory variable, the chlorophyll a concentration as the response variable, and divide the data set into a training set and a test set. When constructing a random forest, firstly, multiple sample sets are extracted from the original data by random sampling, and each sample set is used to construct a decision tree. And in the process of constructing each decision tree, a part of the features are randomly selected from the numerous features for splitting, so that each decision tree has unique randomness and diversity. Finally, the prediction results of these decision trees are integrated, usually by taking the average or majority voting method to obtain the final prediction result.
[0093] The random forest model has many significant advantages. First, it is very resistant to overfitting. Because it is composed of multiple decision trees, even if a single decision tree may be overfitted, the results of multiple trees can greatly improve the generalization ability of the model. Second, it is insensitive to outliers and noise. When dealing with data containing outliers or noise, random forests are relatively stable and will not be easily affected by these interference factors. Third, it can handle high-dimensional data well. For data with a large number of features, such as the reflectivity of multiple highly correlated band combinations here, random forests can be effectively processed and can automatically perform feature selection to find the most important features for predicting chlorophyll a concentration. Fourth, it has good interpretability. Although random forest is a relatively complex model, we can understand the contribution of each feature to the prediction result by calculating feature importance.
[0094] In practical applications, data preparation is first performed, and then the parameters of the random forest model are determined, such as the number of trees, maximum depth, minimum number of sample splits, etc. The selection of these parameters will affect the performance of the model and can be optimized through methods such as cross-validation. The training set data is then used to train the random forest model to allow the model to learn the relationship between reflectance and chlorophyll a concentration. The test set data is then used to evaluate the performance of the random forest model. Common evaluation indicators include mean square error, mean absolute error, and coefficient of determination. Based on the evaluation results, parameters can be further adjusted or feature engineering can be performed to improve the performance of the model. Finally, the optimized and evaluated random forest model can be used to predict the chlorophyll a concentration of new remote sensing image data.
[0095] Furthermore, in step S5, the random forest model includes the following construction steps:
[0096] (1) Data preparation
[0097] Collect reflectance data and corresponding chlorophyll a concentration data of different band combinations of high temporal and spatial resolution remote sensing images to ensure the accuracy and completeness of the data, and cover different environmental conditions and regional ranges.
[0098] Divide the data set into a training set and a test set. Usually, the division can be done in a certain ratio, such as 80% of the data as a training set and 20% of the data as a test set. This ensures that the model can learn the laws of the data and can be effectively verified on unseen data in subsequent model training and evaluation.
[0099] (2) Parameter setting
[0100] Determine the number of decision trees in the random forest (n_estimators). Generally speaking, the more trees there are, the better the model performance may be, but the computational cost will also increase. You can try a small number to start with, such as 100, and then gradually adjust it based on the performance of the model.
[0101] Set the maximum depth of the decision tree (max_depth). Limiting the depth of the tree can prevent overfitting, but if the depth is too small, it may cause the model to underfit. A suitable maximum depth value can be determined by methods such as cross-validation.
[0102] Determine the minimum number of sample splits (min_samples_split). This parameter controls the minimum number of samples required for the decision tree to split. If it is set too small, it may cause overfitting; if it is set too large, the tree may not grow fully, affecting the performance of the model.
[0103] Other parameters can also be considered, such as the minimum number of leaf node samples (min_samples_leaf), feature selection methods, etc.
[0104] (3) Model training
[0105] Import random forest related libraries, such as RandomForestRegressor in scikit-learn.
[0106] The random forest model is trained using the training set data. The reflectance data of the highly correlated band combination is used as the input feature, and the chlorophyll a concentration data is used as the target variable, which are passed into the model's fit method.
[0107] During the training process, the model constructs multiple decision trees based on the set parameters. Each decision tree grows on a randomly selected sample set and randomly selected features to learn the relationship between reflectance and chlorophyll a concentration.
[0108] (4) Model evaluation
[0109] Use the test set data to evaluate the trained random forest model. Pass the reflectance data in the test set into the model's predict method to obtain the chlorophyll a concentration value predicted by the model.
[0110] Calculate evaluation indicators, common ones are mean square error (MSE), mean absolute error (MAE) and determination coefficient (R 2 ) etc. The mean square error and mean absolute error measure the error between the predicted value and the true value, and the coefficient of determination indicates how well the model fits the data.
[0111] Analyze the performance of the model based on the evaluation results. If the model performance is not ideal, you can adjust the parameters, retrain and evaluate, or perform feature engineering, such as selecting a more appropriate band combination, and performing data standardization.
[0112] (5) Application and Optimization
[0113] The optimized random forest model can be used to predict the chlorophyll a concentration of new remote sensing image data. The reflectance of the new data is input into the model to obtain the corresponding chlorophyll a concentration prediction value. The performance of the model is continuously monitored. As new data continues to accumulate, the model can be regularly updated and optimized to improve the accuracy and adaptability of the model.
[0114] In this embodiment, another deep learning model GBR model, i.e., the gradient boosting regression model, plays an important role in processing tasks with reflectivity of highly correlated band combinations as explanatory variables and chlorophyll a concentration as response variables. In principle, the GBR model gradually builds a strong learner in an iterative manner. It starts with an initial simple model, and in each iteration, a new weak learner is trained in a targeted manner according to the prediction error generated by the previous round of models. These weak learners are usually decision trees, and with continuous iterations, new weak learners are added to the model in turn, working together to gradually reduce the prediction error. The whole process is achieved by continuously optimizing the loss function, the purpose of which is to enable the model to fit the given data more accurately.
[0115] In terms of characteristics and advantages, the GBR model has shown many highlights. First of all, it is highly accurate, and it can often achieve relatively good prediction results for complex nonlinear relationships. By automatically learning the interactions between features, the GBR model can capture the intrinsic patterns in the data more deeply, thereby providing more accurate prediction results. Secondly, it has strong flexibility and can handle various types of data, including continuous and discrete variables. At the same time, no matter what distribution the data presents or what level of noise it has, the GBR model can adapt well. Furthermore, the model has a certain robustness to outliers and noise. This is because it is trained by gradually optimizing the loss function. In this process, it can resist the interference of outliers and noise in the data to a certain extent, ensuring the stability and reliability of the model. In addition, although it is not as intuitive as some simple models in terms of interpretability, the GBR model can still provide users with a certain degree of explanation by calculating the importance of features. This is very helpful for understanding the decision-making process of the model and determining the importance of each variable in the prediction.
[0116] In practical applications, data preparation is first required. Similar to the random forest model, reflectance data of highly correlated band combinations need to be prepared as explanatory variables and chlorophyll a concentration data as response variables, and the data set is divided into a training set and a test set. Next is the parameter setting link. It is crucial to determine the parameters of the GBR model, such as the learning rate, the number of trees, and the maximum depth. The learning rate controls the update step size of the model in each iteration, and the number of trees and the maximum depth determine the complexity of the weak learner. The reasonable selection of these parameters will directly affect the performance of the model, and can be optimized by grid search, random search, and other methods. Then comes the model training phase, where the GBR model is trained using the training set data. In each iteration, a new weak learner is trained based on the prediction error of the previous model and added to the model. This process continues until the preset number of iterations is reached or other stopping conditions are met. After that, the model is evaluated. The performance of the GBR model is evaluated using the test set data. Common evaluation indicators include mean square error, mean absolute error, and coefficient of determination. Based on the evaluation results, parameters can be further adjusted or feature engineering can be performed to improve the performance of the model. Finally, the optimized and evaluated GBR model can be used to predict the chlorophyll a concentration of new remote sensing image data.
[0117] Furthermore, the GBR model comprises the following steps:
[0118] (1) Data preparation
[0119] Collect reflectance data of different band combinations of high temporal and spatial resolution remote sensing images and corresponding chlorophyll a concentration data. Ensure the accuracy, completeness and representativeness of the data, covering different environmental conditions and regional ranges.
[0120] Divide the data set into a training set and a test set. Usually, the division can be based on a certain ratio, such as 80% of the data as a training set and 20% of the data as a test set. This ensures that the model can fully learn the laws of the data and can be effectively verified on unseen data during subsequent model training and evaluation.
[0121] (2) Parameter initialization
[0122] Determine the initial values of some important parameters. For example, the learning rate can be initialized to a small value, such as 0.1. The learning rate controls the update amplitude of the model in each iteration. A smaller learning rate usually makes the model training more stable, but more iterations may be required to achieve better performance.
[0123] Set the initial number of weak learners (usually the number of decision trees), starting with a relatively small value, such as 100.
[0124] Determine the maximum depth of the decision tree, the minimum number of sample splits, and other parameters. These parameters will affect the complexity and performance of the decision tree, and the initial values can be determined based on experience or through some preliminary experiments.
[0125] (3) Model training
[0126] Import GBR related libraries, such as GradientBoostingRegressor in scikit-learn.
[0127] The GBR model is trained using the training set data. The reflectance data of the highly correlated band combination is used as the input feature, and the chlorophyll a concentration data is used as the target variable, which are passed into the model's fit method.
[0128] In each iteration, the model calculates the gradient of the loss function based on the current prediction error. Then, a new decision tree is trained as a weak learner based on the gradient information to reduce the loss function. The new decision tree is added to the model and works together with the previous weak learner to gradually improve the performance of the model.
[0129] This process is repeated until the preset number of iterations is reached or other stopping conditions are met.
[0130] (4) Model evaluation
[0131] Use the test set data to evaluate the trained GBR model. Pass the reflectance data in the test set into the model's predict method to obtain the chlorophyll a concentration value predicted by the model.
[0132] Calculate evaluation indicators, common ones include mean square error (MSE), mean absolute error (MAE) and coefficient of determination (R2). MSE and MAE measure the error between the predicted value and the true value, while the coefficient of determination indicates how well the model fits the data.
[0133] Analyze the performance of the model based on the evaluation results. If the model performance is not ideal, you can adjust the parameters, retrain and evaluate, or perform feature engineering, such as selecting a more appropriate band combination, and performing data standardization.
[0134] (5) Application and Optimization
[0135] The optimized GBR model can be used to predict the chlorophyll a concentration of new remote sensing image data. The reflectance of the new data is input into the model to obtain the corresponding chlorophyll a concentration prediction value. The performance of the model is continuously monitored. As new data continues to accumulate, the model can be regularly updated and optimized to improve the accuracy and adaptability of the model.
[0136] S6. Use TPE search weight method to establish a fusion inversion model of random forest model and GBR model;
[0137] The TPE search weight method is an algorithm based on Bayesian optimization. Its core principle is to estimate the performance of different parameter combinations by building a probability model, and then select the next set of parameters for evaluation based on the model, and gradually optimize to find the best parameter combination. In the fusion inversion model, the definition of the parameter space is very critical. It includes the weights of the random forest model and the GBR model, and may also include other hyperparameters such as the number of trees in the random forest model and the learning rate in the GBR model. By reasonably defining the parameter space, different model combinations and hyperparameter settings can be fully explored, laying the foundation for finding the best fusion inversion model. During the search process, the TPE algorithm will gradually evaluate different parameter combinations in the parameter space. For each set of parameters, it uses the fusion inversion model to make predictions, and judges the quality of the parameter combination based on the performance indicators of the prediction results (such as mean square error, etc.). As the evaluation continues, the TPE algorithm continuously updates the probability model, gradually focusing on the parameter area with better performance and reducing the exploration of the area with poor performance.
[0138] The TPE search weight method has many advantages. The first is efficiency. Compared with traditional grid search or random search methods, TPE can explore the parameter space more effectively and avoid unnecessary parameter evaluation, thereby saving computing resources and time. The second is adaptability. It can automatically adapt to different problems and data sets without special preprocessing or assumptions on the parameter space. Finally, accuracy. By constructing a probabilistic model, TPE can more accurately estimate the performance of different parameter combinations, greatly increasing the possibility of finding the global optimal parameter combination. In short, the TPE search weight method provides a powerful and efficient means for finding the best model weights and hyperparameters for the fusion inversion model, which helps to significantly improve the performance and generalization ability of the model.
[0139] In this embodiment, the TPE search weight method is used to establish a fusion inversion model of the random forest model and the GBR model, which can fully combine the advantages of the two different models and improve the prediction accuracy of the target variable.
[0140] First, in the preparation stage, you need to ensure that the necessary Python libraries have been installed, such as scikit-learn for building random forest and GBR models, and hyperopt for parameter search. At the same time, prepare the reflectance data of different band combinations of high temporal and spatial resolution remote sensing images as explanatory variables and chlorophyll a concentration data as response variables. Next, defining the objective function is a key step. This objective function receives a set of parameters, including the weights of the random forest model and the GBR model and possible other hyperparameters. Inside the objective function, the prediction results of the random forest model and the GBR model are first fused according to the given weights, for example, by weighted averaging. Assuming that the random forest model rf and the GBR model gbr have been defined, on the test set, first let the two models make predictions separately to obtain rf_preds and gbr_preds, and then obtain the fused prediction result combined_preds by weighted averaging. Then, use a suitable evaluation metric such as mean square error (MSE) to measure the performance of the fused model, and the value of this evaluation metric will be returned as the output of the objective function.
[0141] Then, use the fmin function of the hyperopt library to search for parameters. In this process, it is necessary to define the parameter space, which includes the weight range of the random forest model and the GBR model. Usually, you can use functions such as hp.uniform provided by hyperopt to define continuous parameter ranges. In addition, other possible hyperparameter ranges can also be included, such as the number of trees in the random forest model, the learning rate in the GBR model, etc. Specify the search algorithm as TPE. TPE is an efficient parameter search algorithm that estimates the performance of different parameter combinations by building a probability model and gradually optimizes the parameter selection. At the same time, set parameters such as the maximum number of evaluations to control the search time and resource consumption.
[0142] Finally, a fusion inversion model is constructed based on the optimal weight parameters obtained through the search. First, the random forest model and the GBR model are retrained using the training set to ensure that the models can fully learn the characteristics and rules of the training data. When making predictions, the prediction results of the two models are fused using the optimal weights to obtain the final prediction value. In this way, the fusion inversion model can make full use of the advantages of the random forest model's ability to resist overfitting and the GBR model's high precision, improve the prediction performance of chlorophyll a concentration, and provide more accurate results for research and applications in related fields.
[0143] In summary, the TPE search weight method is used to establish a fusion inversion model of the random forest model and the GBR model, including the following steps:
[0144] (1) Define the objective function
[0145] Define an objective function that receives a set of parameters, including the weights of the random forest model and the GBR model, and possibly other hyperparameters.
[0146] Within the objective function, the prediction results of the random forest model and the GBR model are fused using given weights, such as weighted averaging.
[0147] Use the training set to train two models and evaluate the performance of the fused model on the test set. Usually, mean square error (MSE), mean absolute error (MAE), etc. can be used as evaluation indicators.
[0148] Returns the value of the evaluation metric as the output of the objective function.
[0149] (2) Parameter search using TPE
[0150] Import the hyperopt library, which is a library for hyperparameter optimization.
[0151] Define the parameter space, including the range of weights for the random forest model and the GBR model and possibly other hyperparameter ranges.
[0152] Use the fmin function of hyperopt to perform parameter search, specify the search algorithm as TPE, and set parameters such as the maximum number of evaluations.
[0153] (3) Constructing a fusion inversion model
[0154] According to the optimal weight parameters obtained by searching, a fusion inversion model is constructed.
[0155] Retrain the random forest model and GBR model using the training set.
[0156] When predicting, the prediction results of the two models are fused using the optimal weights.
[0157] (4) Model evaluation and application
[0158] Use the test set data to evaluate the fusion inversion model and calculate evaluation indicators such as mean square error, mean absolute error, determination coefficient, etc. Analyze the performance of the model based on the evaluation results. If the model performance is not ideal, adjust the parameters and retrain and search. The optimized fusion inversion model can be used to predict the chlorophyll a concentration of new remote sensing image data.
[0159] Furthermore, in the fusion inversion model of the random forest model and the GBR model established by the TPE search weight method, the hyperparameters that may be involved are mainly the following:
[0160] (1) Random Forest Model Hyperparameters
[0161] n_estimators: The number of decision trees in the random forest. A larger number may improve the performance of the model, but will also increase the computational cost and the risk of overfitting.
[0162] max_depth: The maximum depth of the decision tree. Limiting the depth can prevent overfitting, but if it is set too small, it may cause the model to underfit.
[0163] min_samples_split: The minimum number of samples required for a decision tree to split. Higher values can prevent overfitting but may prevent the tree from growing sufficiently.
[0164] min_samples_leaf: The minimum number of samples required for a leaf node. Again, higher values can prevent overfitting.
[0165] (2) GBR model hyperparameters
[0166] learning_rate: learning rate, which controls the update step size of the model in each iteration. A smaller learning rate usually makes the model training more stable, but more iterations may be required to achieve better performance.
[0167] n_estimators: The number of weak learners (decision trees). Similar to random forests, more estimators may result in better performance, but the computational cost will also increase.
[0168] max_depth: The maximum depth of the decision tree, which affects the complexity and performance of the model.
[0169] subsample: The sample ratio used in each iteration. A smaller value can increase the randomness of the model and prevent overfitting.
[0170] S7. Obtain high temporal and spatial resolution remote sensing images of the estuary to be monitored, input the reflectivity of the highly correlated band combination into the fusion inversion model, and invert the chlorophyll a concentration of the estuary to be monitored.
[0171] The above description is only a preferred embodiment of the present invention and does not limit the present invention in any form. Although the present invention has been disclosed as a preferred embodiment as above, it is not used to limit the present invention. Any technical personnel in this field can make some changes or modify the technical contents disclosed above into equivalent embodiments without departing from the scope of the technical solution of the present invention. However, any brief modifications, equivalent changes and modifications made to the above embodiments based on the technical essence of the present invention without departing from the content of the technical solution of the present invention are still within the scope of the technical solution of the present invention.
Claims
1. A method for inverting chlorophyll a concentration in estuaries based on multi-model fusion, characterized by: The following steps are involved: S1. Acquire estuary monitoring data for a specific time period, wherein the estuary monitoring data includes chlorophyll a concentration and MODIS remote sensing images and Landsat8 remote sensing image data for a corresponding time period; S2. Use ESTARFM to fuse MODIS remote sensing images and Landsat8 remote sensing images to obtain high temporal and spatial resolution remote sensing images; S3, obtaining the reflectance of different band combinations of high temporal and spatial resolution remote sensing images, and calculating the Pearson correlation coefficient between the reflectance and chlorophyll a concentration; S4. Determine the band combination with significant correlation between reflectance and chlorophyll a concentration according to the Pearson correlation coefficient, and record it as a highly correlated band combination; S5, taking the reflectance of the highly correlated band combination as the explanatory variable and the chlorophyll a concentration as the response variable, respectively establishing a random forest model and a GBR model; S6. Use TPE search weight method to establish a fusion inversion model of random forest model and GBR model; S7. Obtain high temporal and spatial resolution remote sensing images of the estuary to be monitored, input the reflectivity of the highly correlated band combination into the fusion inversion model, and invert the chlorophyll a concentration of the estuary to be monitored.
2. The method for inverting chlorophyll a concentration in an estuary based on multi-model fusion according to claim 1, characterized in that: The MODIS remote sensing images were downloaded from NASA's official website and preprocessed, including: Screening of remote sensing images: Download MODIS remote sensing images from NASA's official website and select remote sensing images with little cloud cover and no more than 7 days from the monitoring time; Remote sensing image radiometric calibration and geometric correction: Download the MODIS processing plug-in MTCK in ENVI, then import the MODIS remote sensing data in MTCK and select the WGS-84 coordinate system; Water body extraction: Extract estuarine waters based on the NDWI water body index and perform band operations using Band math in ENVI.
3. The method for inverting chlorophyll a concentration in an estuary based on multi-model fusion according to claim 2, characterized in that: The NDWI water index is calculated as follows: In the formula, Green represents the green band of MODIS remote sensing image, which corresponds to the 4th band among the 36 bands; NIR represents the near-infrared band of MODIS remote sensing image, which corresponds to the 2nd band among the 36 bands; NDWI is the water body index.
4. The method for inverting chlorophyll a concentration in an estuary based on multi-model fusion according to claim 1, characterized in that: The Landsat8 remote sensing images are acquired in the geospatial data cloud and pre-processed, including: Screening of remote sensing images: Download Landsat8 remote sensing images from the Geospatial Data Cloud and select remote sensing images with less cloud cover and the closest time to MODIS remote sensing images; Remote sensing image radiation calibration: convert the DN value recorded by the sensor into a radiation brightness value. The DN value is the gray value of the recorded object. Atmospheric correction of remote sensing images: Perform atmospheric correction on Landsat8 remote sensing images in the FLAASH Atmospheric Correction tool in ENVI to eliminate the images produced by electromagnetic waves passing through the atmosphere and the influence of atmospheric substances on the reflection of ground objects; Water body extraction: Extract estuarine waters based on the NDWI water body index and perform band operations using Band math in ENVI.
5. The method for inverting chlorophyll a concentration in an estuary based on multi-model fusion according to claim 1, characterized in that: In step S2, the use of ESTARFM to fuse the MODIS remote sensing image and the Landsat8 remote sensing image to obtain a high temporal and spatial resolution remote sensing image includes the following steps: Select reference images: select Landsat 8 remote sensing images as high-resolution images and MODIS remote sensing images as low-resolution images; By constructing a spatiotemporal model, the spectral information of MODIS remote sensing images and the spatial information of Landsat 8 remote sensing images are fused; Generate high temporal and spatial resolution images. The generated images retain the high spatial resolution of Landsat 8 remote sensing images while introducing the timeliness of MODIS remote sensing images.
6. The method for inverting chlorophyll a concentration in an estuary based on multi-model fusion according to claim 1, characterized in that: In step S3, the Pearson correlation coefficient is calculated using the following formula: Where p represents the Pearson correlation coefficient between chlorophyll a concentration and reflectance of different band combinations of high temporal and spatial resolution remote sensing images; R(x i ) represents the ith sample value of chlorophyll a concentration; R(y i ) represents the i-th sample value of the reflectance of different band combinations of high temporal and spatial resolution remote sensing images; R(x) is the average value of all samples of chlorophyll a concentration; R(y) represents the average value of all samples of the reflectance of different band combinations of high temporal and spatial resolution remote sensing images.
7. The method for inverting chlorophyll a concentration in an estuary based on multi-model fusion according to claim 1, characterized in that: In step S5, the random forest model includes the following construction steps: Data preparation: Collect reflectance data of different band combinations of high temporal and spatial resolution remote sensing images and the corresponding chlorophyll a concentration data; Divide the dataset into training and testing sets; Parameter setting: determine the number of decision trees in the random forest, set the maximum depth of the decision tree, and determine the minimum number of sample splits; Model training: Use the training set data to train the random forest model, take the reflectance data of the highly correlated band combination as the input feature, and the chlorophyll a concentration data as the target variable to build a random forest model; during the model training process, multiple decision trees are built according to the set parameters. Each decision tree grows on a randomly selected sample set and randomly selected features to learn the relationship between reflectance and chlorophyll a concentration; Model evaluation: The reflectance data in the test set is passed into the model to obtain the chlorophyll a concentration value predicted by the model; the evaluation indicators are calculated, including the mean square error, the mean absolute error and the determination coefficient.
8. The method for inverting chlorophyll a concentration in an estuary based on multi-model fusion according to claim 1, characterized in that: In step S5, the GBR model includes the following steps: Data preparation: Collect reflectance data of different band combinations of high temporal and spatial resolution remote sensing images and the corresponding chlorophyll a concentration data; divide the data set into training set and test set; Parameter initialization: Determine the initial values of model parameters, including learning rate, number of weak learners, maximum depth of decision tree and minimum number of sample splits; Model training: Use the training set data to train the GBR model, take the reflectance data of the highly correlated band combination as the input feature, and the chlorophyll a concentration data as the target variable to build the GBR model; in each iteration, the model calculates the gradient of the loss function according to the current prediction error; train a new decision tree as a weak learner based on the gradient information to reduce the loss function; add the new decision tree to the GBR model, and work together with the previous weak learner to gradually improve the performance of the model; repeat the model training process until the preset number of iterations is reached or the stop condition is met; Model evaluation: Use the test set data to evaluate the trained GBR model.
9. The method for inverting chlorophyll a concentration in an estuary based on multi-model fusion according to claim 1, characterized in that: In step S6, the TPE search weight method is used to establish a fusion inversion model of the random forest model and the GBR model, including the following steps: Define objective function: define an objective function that receives a set of parameters, including the weights and hyperparameters of the random forest model and the GBR model; within the objective function, use the given weights to fuse the prediction results of the random forest model and the GBR model; use the training set to train the random forest model and the GBR model, and evaluate the performance of the fused model on the test set; return the value of the evaluation indicator as the output of the objective function; Use TPE for parameter search: define the parameter space in Python, which includes the weights of the random forest model and the GBR model and the range of hyperparameters; use the fmin function of hyperopt for parameter search, specify the search algorithm as TPE, and set the maximum number of evaluations; Constructing a fusion inversion model: constructing a fusion inversion model based on the optimal weight parameters obtained through searching; retraining the random forest model and the GBR model using the training set; during prediction, using the optimal weight parameters to fuse the prediction results of the two models, specifically using the weighted average method; Model evaluation and application: Use the test set data to evaluate the fusion inversion model, and analyze the performance of the model based on the evaluation results.
10. The method for inverting chlorophyll a concentration in an estuary based on multi-model fusion according to claim 9, characterized in that: The hyperparameters include the number of decision trees in the random forest, the maximum depth of the decision tree, the minimum number of samples required for a decision tree to split, the minimum number of samples required for a leaf node, the learning rate in the GBR model, the number of weak learners, the maximum depth of the decision tree, and the proportion of samples used in each iteration.
Citation Information
Patent Citations
Shield equipment fault fusion prediction method based on ensemble learning
CN115859826A
Accurate inversion method and system for aboveground biomass of urban vegetations considering vegetation type
US20240312206A1
Cited By
Water body total phosphorus and total nitrogen indirect inversion system and method based on model optimization
CN121580859A