Chlorophyll concentration forecasting method and device based on AdaBoost and readable medium
By combining the AdaBoost algorithm and the LSTM model, a chlorophyll concentration prediction method integrating weak forecasting models is constructed, which solves the problem of insufficient prediction stability in the existing technology, and achieves higher forecast accuracy and stability, especially in high concentration areas. The forecasting capacity has been significantly improved.
Patent Information
- Application Number
- CN202411491921.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-24
- Publication Date
- 2025-02-18
AI Technical Summary
The prior art is susceptible to the problem of data noise and sample imbalance in chlorophyll concentration forecasting, resulting in insufficient stability of the prediction results.
Using AdaBoost-based method, the AdaBoost algorithm is combined with the LSTM model to build a chlorophyll concentration strong prediction model integrating several weak prediction models. By iteratively adjusting the distribution weight of the training data, the robustness and prediction accuracy of the model are improved.
It significantly improves the accuracy and stability of chlorophyll concentration forecasting, especially the forecasting ability in high-concentration chlorophyll areas, which can better capture the chlorophyll change trend before the red tide burst, and provide more accurate predictions for the early warning of red tide.
Smart Images

Figure CN119479876A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of chlorophyll concentration prediction, and in particular to a chlorophyll concentration prediction method, device and readable medium based on AdaBoost. Background Art
[0002] Chlorophyll (Chl) is a key indicator of marine primary productivity and can effectively reflect the biomass of phytoplankton in the water body. Abnormal changes in chlorophyll concentration are often one of the important signals of the health of the marine ecosystem, especially in coastal waters with severe eutrophication. The rapid increase in chlorophyll concentration usually indicates abnormal proliferation of algae, which may lead to the outbreak of red tides. The occurrence of red tides will not only seriously damage the coastal ecosystem, leading to a decline in biodiversity and the death of large numbers of marine organisms such as fish, but also have a huge impact on coastal economies such as fisheries and tourism. Therefore, accurate prediction of chlorophyll is not only a basic tool for scientifically assessing the status of phytoplankton in water bodies, but also an important means of early warning of red tide outbreaks.
[0003] Deep learning models, especially long short-term memory networks (LSTM), have shown high accuracy in chlorophyll and red tide forecasts due to their ability to process time series data, and have become the most commonly used deep learning models for red tide forecasts. However, when dealing with complex environmental variables, a single model is susceptible to data noise and sample imbalance, resulting in insufficient stability in the prediction results. Summary of the invention
[0004] The purpose of this application is to propose a chlorophyll concentration prediction method, device and readable medium based on AdaBoost to address the above-mentioned technical problems.
[0005] In a first aspect, the present invention provides a chlorophyll concentration prediction method based on AdaBoost, comprising the following steps:
[0006] The buoy observation data, meteorological data and tide data of the previous time step are obtained and preprocessed to obtain training samples. The training data are constructed based on the training samples and the measured chlorophyll concentration of the current time step. The buoy observation data include chlorophyll concentration, water temperature, dissolved oxygen and pH value. The meteorological data include average temperature, minimum temperature, maximum temperature, average air pressure, minimum air pressure, maximum air pressure, average 2-minute wind speed, maximum wind speed, precipitation and relative humidity.
[0007] A strong prediction model of chlorophyll concentration integrating several weak prediction models was constructed. The weak prediction model adopted the LSTM model. During the training process of the weak prediction model, the AdaBoost algorithm was used to iteratively adjust the distribution weights of the training data. The training data used in each iteration was used to train each weak prediction model to obtain several trained weak prediction models, and the weight of each trained weak prediction model was calculated.
[0008] The buoy observation data, meteorological data and tide data of the previous time step of the current time step to be forecasted are obtained and data preprocessing is performed to obtain input data, and the input data is input into each trained weak forecast model to obtain the forecast result of each trained weak forecast model, and the forecast result of the strong forecast model for chlorophyll concentration is obtained according to the forecast result of each trained weak forecast model and the weight calculation of the corresponding trained weak forecast model, and the forecast result of the strong forecast model for chlorophyll concentration is the chlorophyll concentration of the current time step to be forecasted.
[0009] Preferably, the distribution weights of the training data are iteratively adjusted using the AdaBoost algorithm, and each weak prediction model is trained using the training data used in each iteration to obtain a plurality of trained weak prediction models, and the weight of each trained weak prediction model is calculated, specifically including:
[0010] First, initialize the distribution weights of the training data to obtain the training data used in the first iteration;
[0011] In the t-th iteration process, the t-th weak prediction model is trained using the training data used in the t-th iteration to obtain the t-th trained weak prediction model;
[0012] The t-th trained weak prediction model is used to calculate the prediction error of the training data used in the t-th iteration, and the distribution weight of the training data used in the t-th iteration is adjusted based on the prediction error of the training data used in the t-th iteration to obtain the distribution weight of the training data used in the t+1-th iteration;
[0013] Calculating the error rate of the t-th trained weak prediction model according to the distribution weights of the training data used in the t-th iteration and the forecast error, and obtaining the unnormalized weight of the t-th trained weak prediction model according to the error rate of the t-th trained weak prediction model;
[0014] Repeat the above iterative process until t equals the preset number of iterations N;
[0015] Normalization is performed according to the unnormalized weight of each trained weak prediction model to obtain the weight of each trained weak prediction model.
[0016] Preferably, the distribution weights of the training data used in the first iteration are initialized non-uniformly, as shown in the following formula:
[0017]
[0018] Where D1(i) represents the weight of the i-th training sample in the training data used in the first iteration, m is the total number of training samples in the training data, and Chl(i) represents the measured chlorophyll concentration at the current time step corresponding to the i-th training sample.
[0019] Preferably, the prediction error of the training data used in the t-th iteration is calculated using the t-th trained weak prediction model, and the distribution weight of the training data used in the t-th iteration is adjusted based on the prediction error of the training data used in the t-th iteration to obtain the distribution weight of the training data used in the t+1-th iteration, specifically including:
[0020] Input the i-th training sample in the training data used in the t-th iteration into the t-th trained weak prediction model to obtain the prediction result O(i) of the t-th trained weak prediction model for the i-th training sample;
[0021] The prediction error e of the i-th training sample in the training data used in the t-th iteration is calculated using the following formula: t (i)
[0022] e t (i) = |Chl(i) - O(i)|;
[0023] The following formula is used to adjust the training data used in the tth iteration to obtain the unnormalized distribution weights of the training data used in the t+1th iteration:
[0024]
[0025] Among them, a represents the adjustment coefficient, a>1, b is the threshold, D t (i) represents the weight of the i-th training sample in the training data used in the t-th iteration, D' t+1 (i) represents the unnormalized weight of the i-th training sample in the training data used in the t+1-th iteration;
[0026] The unnormalized weight of the i-th training sample in the training data used in the t+1th iteration is normalized to obtain the weight of the i-th training sample in the training data used in the t+1th iteration, as shown in the following formula:
[0027]
[0028] Among them, D t+1(i) represents the weight of the i-th training sample in the training data used in the t+1-th iteration.
[0029] Preferably, the error rate of the t-th trained weak prediction model is calculated according to the distribution weight and forecast error of the training data used in the t-th iteration, and the unnormalized weight of the t-th trained weak prediction model is obtained according to the error rate of the t-th trained weak prediction model, specifically including:
[0030] The error rate E(t) of the tth trained weak prediction model is calculated using the following formula:
[0031]
[0032] The unnormalized weight a'(t) of the t-th trained weak prediction model is calculated using the following formula:
[0033]
[0034] The unnormalized weight of the t-th trained weak prediction model is normalized to obtain the weight of the t-th trained weak prediction model, as shown in the following formula:
[0035]
[0036] Where a(t) represents the weight of the tth trained weak prediction model.
[0037] As a preferred method, the prediction result of the chlorophyll concentration strong prediction model is calculated using the following formula:
[0038]
[0039] Among them, H represents the prediction result of the strong prediction model of chlorophyll concentration, a(t) represents the weight of the tth trained weak prediction model, and h(t) represents the prediction result of the tth trained weak prediction model.
[0040] In a second aspect, the present invention provides a chlorophyll concentration prediction device based on AdaBoost, comprising:
[0041] The data acquisition module is configured to obtain the buoy observation data, meteorological data and tide data of the previous time step and perform data preprocessing to obtain training samples, and construct training data based on the training samples and the measured chlorophyll concentration of the current time step. The buoy observation data includes chlorophyll concentration, water temperature, dissolved oxygen and pH value, and the meteorological data includes average temperature, minimum temperature, maximum temperature, average air pressure, minimum air pressure, maximum air pressure, average 2-minute wind speed, maximum wind speed, precipitation and relative humidity;
[0042] The model building module is configured to build a strong prediction model of chlorophyll concentration integrating several weak prediction models. The weak prediction model adopts the LSTM model. In the training process of the weak prediction model, the distribution weight of the training data is iteratively adjusted by the AdaBoost algorithm. The training data used in each iteration is used to train each weak prediction model to obtain several trained weak prediction models, and the weight of each trained weak prediction model is calculated.
[0043] The forecast module is configured to obtain the buoy observation data, meteorological data and tide data of the previous time step of the current time step to be forecasted and perform data preprocessing to obtain input data, input the input data to each trained weak forecast model, obtain the forecast result of each trained weak forecast model, and obtain the forecast result of the chlorophyll concentration strong forecast model according to the forecast result of each trained weak forecast model and the weight calculation of the corresponding trained weak forecast model, and the forecast result of the chlorophyll concentration strong forecast model is the chlorophyll concentration of the current time step to be forecasted.
[0044] In a third aspect, the present invention provides an electronic device comprising one or more processors; a storage device for storing one or more programs, wherein when the one or more programs are executed by the one or more processors, the one or more processors implement the method described in any implementation manner in the first aspect.
[0045] In a fourth aspect, the present invention provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the method described in any implementation manner in the first aspect.
[0046] In a fifth aspect, the present invention provides a computer program product, comprising a computer program, which, when executed by a processor, implements the method described in any implementation manner in the first aspect.
[0047] Compared with the prior art, the present invention has the following beneficial effects:
[0048] (1) The chlorophyll concentration prediction method based on AdaBoost proposed in the present invention combines the Adaboost algorithm with the LSTM model to construct a strong chlorophyll concentration prediction model that integrates several weak prediction models, which effectively addresses the nonlinear problems and complex and changeable environmental factors in the nearshore chlorophyll concentration prediction, and significantly improves the accuracy and stability of the nearshore chlorophyll concentration prediction, especially the prediction capability for high chlorophyll concentration areas.
[0049] (2) The chlorophyll concentration prediction method based on AdaBoost proposed in the present invention can better capture the chlorophyll change trend before the outbreak of red tide by assigning higher initial weights to high-value chlorophyll samples, thereby providing more accurate predictions for early warning of red tide.
[0050] (3) The Adaboost algorithm in the chlorophyll concentration prediction method based on AdaBoost proposed in the present invention adaptively adjusts the weights of the training data, making the model more robust in the face of complex spatiotemporal dynamic changes. BRIEF DESCRIPTION OF THE DRAWINGS
[0051] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0052] Figure 1 A schematic diagram of a flow chart of a chlorophyll concentration prediction method based on AdaBoost according to an embodiment of the present application;
[0053] Figure 2 A structural diagram of a chlorophyll concentration strong prediction model of a chlorophyll concentration prediction method based on AdaBoost according to an embodiment of the present application;
[0054] Figure 3 A schematic diagram of the training process of the chlorophyll concentration strong prediction model of the chlorophyll concentration prediction method based on AdaBoost in an embodiment of the present application;
[0055] Figure 4 A distribution diagram of the prediction error of one of the weak prediction models of the chlorophyll concentration prediction method based on AdaBoost in an embodiment of the present application;
[0056] Figure 5 A comparison diagram of correlation coefficients and root mean square errors of a strong chlorophyll concentration prediction model and a single weak prediction model of a chlorophyll concentration prediction method based on AdaBoost in an embodiment of the present application;
[0057] Figure 6 A schematic diagram of a chlorophyll concentration prediction device based on AdaBoost according to an embodiment of the present application;
[0058] Figure 7 A schematic diagram of the hardware structure of an electronic device provided in an embodiment of the present invention. DETAILED DESCRIPTION
[0059] In order to make the purpose, technical scheme and advantages of the present invention clearer, the present invention will be further described in detail below with reference to the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present invention, rather than all the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0060] Figure 1 A chlorophyll concentration prediction method based on AdaBoost provided in an embodiment of the present application is shown, comprising the following steps:
[0061] S1, obtain the buoy observation data, meteorological data and tide data of the previous time step and perform data preprocessing to obtain training samples. The training data is constructed based on the training samples and the measured chlorophyll concentration of the current time step. The buoy observation data include chlorophyll concentration, water temperature, dissolved oxygen and pH value. The meteorological data include average temperature, minimum temperature, maximum temperature, average air pressure, minimum air pressure, maximum air pressure, average 2-minute wind speed, maximum wind speed, precipitation and relative humidity.
[0062] Specifically, training data for training and testing are collected. The training samples in the training data mainly include the buoy observation data of the previous time step, and the collected variables include chlorophyll concentration, water temperature, dissolved oxygen, pH value, etc.; the meteorological data of the previous time step, and the parameters include wind speed, precipitation and temperature, etc.; and the tide data of the previous time step. The label in the training data is the measured chlorophyll concentration of the current time step. The data preprocessing method includes standardization, data cleaning, interpolation and noise reduction. All collected training samples are standardized and processed into an input format suitable for the LSTM model. After cleaning, interpolation and noise reduction, the training data is divided into a training set and a test set.
[0063] S2, construct a strong prediction model for chlorophyll concentration that integrates several weak prediction models. The weak prediction model adopts the LSTM model. During the training process of the weak prediction model, the AdaBoost algorithm is used to iteratively adjust the distribution weights of the training data. The training data used in each iteration is used to train each weak prediction model to obtain several trained weak prediction models, and the weight of each trained weak prediction model is calculated.
[0064] Specifically, refer to Figure 2The chlorophyll concentration strong prediction model of the embodiment of the present application is composed of a long short-term memory network (LSTM) optimized based on the Adaboost ensemble learning algorithm, wherein the Adaboost (Adaptive Boosting) algorithm is an adaptive iterative ensemble learning method, and its core idea is to gradually optimize the weak machine learning models by training multiple weak machine learning models on the same training set and adjusting the weight of each training sample according to the performance of the model, so as to form a strong machine learning model. At present, the Adaboost algorithm has been widely used to optimize machine learning models, especially in classification and regression tasks.
[0065] In a specific embodiment, the distribution weights of the training data are iteratively adjusted using the AdaBoost algorithm, and each weak prediction model is trained using the training data used in each iteration to obtain a plurality of trained weak prediction models, and the weight of each trained weak prediction model is calculated, specifically including:
[0066] First, initialize the distribution weights of the training data to obtain the training data used in the first iteration;
[0067] In the t-th iteration process, the t-th weak prediction model is trained using the training data used in the t-th iteration to obtain the t-th trained weak prediction model;
[0068] The t-th trained weak prediction model is used to calculate the prediction error of the training data used in the t-th iteration, and the distribution weight of the training data used in the t-th iteration is adjusted based on the prediction error of the training data used in the t-th iteration to obtain the distribution weight of the training data used in the t+1-th iteration;
[0069] Calculating the error rate of the t-th trained weak prediction model according to the distribution weights of the training data used in the t-th iteration and the forecast error, and obtaining the unnormalized weight of the t-th trained weak prediction model according to the error rate of the t-th trained weak prediction model;
[0070] Repeat the above iterative process until t equals the preset number of iterations N;
[0071] Normalization is performed according to the unnormalized weight of each trained weak prediction model to obtain the weight of each trained weak prediction model.
[0072] In a specific embodiment, the distribution weights of the training data used in the first iteration are initialized non-uniformly, as shown in the following formula:
[0073]
[0074] Where D1(i) represents the weight of the i-th training sample in the training data used in the first iteration, m is the total number of training samples in the training data, and Chl(i) represents the measured chlorophyll concentration at the current time step corresponding to the i-th training sample.
[0075] Specifically, refer to Figure 3 In the traditional Adaboost algorithm, the initial weights of the training data are usually uniformly distributed, that is, the initial weights of all training samples are the same. That is, the weight of the i-th training sample of the first weak prediction model is:
[0076] D1(i)=1 / m.
[0077] However, since the main goal of the embodiment of the present application is to achieve early warning of red tides through the prediction of chlorophyll concentration, accurate prediction of high chlorophyll values is particularly important. In order to enhance the prediction effect of the model on samples with high chlorophyll values, the embodiment of the present application adopts non-uniform initial weights. Specifically, samples with higher chlorophyll concentrations are given larger initial weights to improve the model's learning ability on these important data.
[0078] In a specific embodiment, the prediction error of the training data used in the t-th iteration is calculated using the t-th trained weak prediction model, and the distribution weight of the training data used in the t-th iteration is adjusted based on the prediction error of the training data used in the t-th iteration to obtain the distribution weight of the training data used in the t+1-th iteration, which specifically includes:
[0079] Input the i-th training sample in the training data used in the t-th iteration into the t-th trained weak prediction model to obtain the prediction result O(i) of the t-th trained weak prediction model for the i-th training sample;
[0080] The prediction error e of the i-th training sample in the training data used in the t-th iteration is calculated using the following formula: t (i)
[0081] e t (i) = |Chl(i) - O(i)|;
[0082] The following formula is used to adjust the training data used in the tth iteration to obtain the unnormalized distribution weights of the training data used in the t+1th iteration:
[0083]
[0084] Among them, a represents the adjustment coefficient, a>1, b is the threshold, D t (i) represents the weight of the i-th training sample in the training data used in the t-th iteration, D' t+1(i) represents the unnormalized weight of the i-th training sample in the training data used in the t+1-th iteration;
[0085] The unnormalized weight of the i-th training sample in the training data used in the t+1th iteration is normalized to obtain the weight of the i-th training sample in the training data used in the t+1th iteration, as shown in the following formula:
[0086]
[0087] Among them, D t+1 (i) represents the weight of the i-th training sample in the training data used in the t+1-th iteration.
[0088] Specifically, the LSTM model is used as a weak prediction model and trained by using the training data of each iteration. The LSTM model has excellent ability to process time series data, so it is particularly suitable for the prediction of dynamically changing chlorophyll concentration. By learning the time series pattern in historical data, the LSTM model can better capture the trend of chlorophyll concentration changing over time.
[0089] After the training of the tth weak prediction model is completed, the training samples are predicted using the tth trained weak prediction model to obtain the prediction result O(i) for each training sample. Based on these prediction results, the subsequent steps will calculate the error rate of the tth trained weak prediction model and adjust the distribution weights of the training data to further optimize the model performance.
[0090] In each iteration, the prediction error of each training sample needs to be calculated. By calculating the prediction error e of each sample t (i) The prediction accuracy of the t-th trained weak prediction model for each training sample can be measured.
[0091] According to the requirements of the AdaBoost algorithm, it is necessary to judge the accuracy of the forecast results. In the classification model, the model performance is usually evaluated by judging whether the classification is correct. For the weak prediction model, the embodiment of the present application sets a threshold value, that is, when the absolute error between the forecast result of the training sample and the measured chlorophyll concentration is less than the threshold value, it is regarded as a correct forecast, otherwise it is regarded as a wrong forecast. In one embodiment, the threshold b is set to 0.05μg / L. When the forecast error of a certain training data is lower than this value, the sample is regarded as a correct forecast, otherwise it is regarded as a wrong forecast. Figure 4The prediction results of the LSTM model on the training data are shown, and the results show that the probability that the absolute value of the error is less than 0.05μg / L is about 83.8%. Although the LSTM model performs well on the training data, there are still some samples with errors greater than 0.05μg / L. In order to further reduce the prediction error of these samples, the embodiment of the present application optimizes the model through the AdaBoost algorithm.
[0092] In each iteration, according to the prediction error e of each training sample t (i) Adjust its weights. Samples with incorrect predictions will be assigned higher weights in the next iteration (t+1 iteration), which means that the model needs to pay more attention to these difficult-to-predict samples. For training samples with incorrect predictions, their weights will be multiplied by a constant a based on the weights of the previous iteration to obtain the unnormalized weights of the training data used in the next iteration, so as to increase the weights of the next iteration and enable subsequent models to better fit these training samples. In one embodiment, a=1.1.
[0093] In order to ensure that the distribution weights of each training sample remain within the same scale, the unnormalized distribution weights of the training data used in the next iteration need to be normalized. The purpose of this process is to adjust the weights to a probability distribution, that is, the sum of the weights is equal to 1. This process can prevent the model from giving too high a weight to a specific data point in subsequent iterations, thereby maintaining the balance of the training data set and ensuring the stability and effectiveness of subsequent model training.
[0094] In a specific embodiment, the error rate of the t-th trained weak prediction model is calculated according to the distribution weight and prediction error of the training data used in the t-th iteration, and the unnormalized weight of the t-th trained weak prediction model is calculated according to the error rate of the t-th trained weak prediction model, specifically including:
[0095] The error rate E(t) of the tth trained weak prediction model is calculated using the following formula:
[0096]
[0097] The unnormalized weight a'(t) of the t-th trained weak prediction model is calculated using the following formula:
[0098]
[0099] The unnormalized weight of the t-th trained weak prediction model is normalized to obtain the weight of the t-th trained weak prediction model, as shown in the following formula:
[0100]
[0101] Where a(t) represents the weight of the tth trained weak prediction model.
[0102] Specifically, the unnormalized weight a'(t) of each trained weak prediction model depends on the error rate of the trained weak prediction model. Specifically, the trained weak prediction model with a smaller error rate will be assigned a higher weight, and its influence on the overall forecast will be greater. The error rate E(t) is the sum of the distribution weights of all training samples with incorrect forecasts. An incorrect forecast of a training sample with a high distribution weight will result in a higher error rate. Training samples with high weights are generally samples with higher chlorophyll concentrations in the training samples and training samples whose distribution weights have been amplified due to the incorrect forecast of the weak prediction model. In this way, the subsequent weak prediction model with a low error rate is reflected in its better performance in high chlorophyll samples and previous training samples with incorrect forecasts.
[0103] When the error rate of the trained weak prediction model is smaller, the a'(t) value is larger, indicating that the performance of the trained weak prediction model is better. In ensemble learning, in this way, the better performing models can be effectively given greater weights, making the final strong prediction model more accurate.
[0104] After obtaining the unnormalized weights of all trained weak prediction models, normalization is performed to ensure that the sum of the weights of all trained weak prediction models is 1. This step can balance the contribution of each trained weak prediction model to the final strong prediction model and avoid some models having too much or too little impact on the overall forecast.
[0105] After the training is completed, all weak prediction models are used to predict the test samples of the test set. Each weak prediction model will give a prediction result. The final prediction result of the strong prediction model is obtained by weighted integration of the prediction results of all weak prediction models. Specifically, the weight a(t) of each weak prediction model and its corresponding prediction result are weighted summed to generate the final prediction result H of the strong prediction model test data.
[0106] The chlorophyll concentration strong prediction model after training is applied to the test set data for performance evaluation. The embodiment of the present application uses the correlation coefficient (r) and the root mean square error (RMSE) as evaluation indicators. The correlation coefficient is used to measure the correlation between the prediction results of the chlorophyll concentration strong prediction model and the actual observation results (measured chlorophyll concentration). The closer to 1, the more accurate the prediction; the root mean square error is used to measure the difference between the predicted value and the actual value. The smaller the root mean square error, the smaller the error.
[0107] The weak forecast model was trained using the chlorophyll observation data from the Xiamen Bay buoy from 2008 to 2018, and the data from September 2020 to June 2021 were used for model testing. Figure 5 The comparison of correlation coefficient and root mean square error of weak prediction model and strong prediction model before and after optimization is given. The results show that the correlation coefficient of the strong prediction model of chlorophyll concentration optimized by Adaboost algorithm is significantly higher than the average value of each weak prediction model, and the root mean square error is also significantly reduced, indicating that the prediction accuracy of the strong prediction model of chlorophyll concentration has been significantly improved.
[0108] Further analysis shows that the optimized chlorophyll concentration strong forecast model has significantly improved the prediction accuracy of high chlorophyll value areas. By setting non-uniform initial weights, the model can better capture the changing trend of high chlorophyll concentration areas, making the model more accurate in warning of sudden events such as red tides.
[0109] S3, obtain the buoy observation data, meteorological data and tide data of the previous time step of the current time step to be predicted and perform data preprocessing to obtain input data, input the input data to each trained weak prediction model, obtain the forecast result of each trained weak prediction model, and calculate the forecast result of the chlorophyll concentration strong prediction model according to the forecast result of each trained weak prediction model and its corresponding trained weak prediction model weight. The forecast result of the chlorophyll concentration strong prediction model is the chlorophyll concentration of the current time step to be predicted.
[0110] In a specific embodiment, the prediction result of the chlorophyll concentration strong prediction model is calculated using the following formula:
[0111]
[0112] Among them, H represents the prediction result of the strong prediction model of chlorophyll concentration, a(t) represents the weight of the tth trained weak prediction model, and h(t) represents the prediction result of the tth trained weak prediction model.
[0113] Specifically, after AdaBoost optimization, the parameters and weights of the trained weak prediction model have been determined, so they can be integrated to form a strong prediction model for chlorophyll concentration. By deploying the strong prediction model for chlorophyll concentration of the embodiment of the present application, the chlorophyll concentration can be accurately predicted.
[0114] In the field of chlorophyll forecasting, the model based on the Adaboost ensemble learning method can effectively deal with the nonlinear problems and complex and changeable environmental factors in the nearshore chlorophyll concentration forecast by integrating multiple weak forecast models. This method can combine the advantages of different models and improve the overall forecast accuracy of the model through adaptive adjustment, especially when dealing with noise data and abnormal data. Therefore, the present invention applies the Adaboost algorithm to the optimization of the LSTM chlorophyll forecast model, which can further improve the prediction accuracy of nearshore chlorophyll concentration and provide more accurate and effective forecast support for the health management and environmental protection of marine ecosystems.
[0115] Further references Figure 6 As an implementation of the methods shown in the above figures, the present application provides an embodiment of a chlorophyll concentration prediction device based on AdaBoost. Figure 1 Corresponding to the method embodiment shown, the device can be specifically applied to various electronic devices.
[0116] The embodiment of the present application provides a chlorophyll concentration prediction device based on AdaBoost, comprising:
[0117] The data acquisition module 1 is configured to obtain the buoy observation data, meteorological data and tide data of the previous time step and perform data preprocessing to obtain training samples, and construct training data based on the training samples and the measured chlorophyll concentration of the current time step. The buoy observation data includes chlorophyll concentration, water temperature, dissolved oxygen and pH value, and the meteorological data includes average temperature, minimum temperature, maximum temperature, average air pressure, minimum air pressure, maximum air pressure, average 2-minute wind speed, maximum wind speed, precipitation and relative humidity;
[0118] The model building module 2 is configured to build a strong prediction model of chlorophyll concentration integrating several weak prediction models. The weak prediction model adopts the LSTM model. In the training process of the weak prediction model, the distribution weight of the training data is iteratively adjusted by the AdaBoost algorithm. The training data used in each iteration is used to train each weak prediction model to obtain several trained weak prediction models, and the weight of each trained weak prediction model is calculated.
[0119] The forecast module 3 is configured to obtain the buoy observation data, meteorological data and tide data of the previous time step of the current time step to be forecasted and perform data preprocessing to obtain input data, input the input data to each trained weak forecast model, obtain the forecast result of each trained weak forecast model, and calculate the forecast result of the chlorophyll concentration strong forecast model according to the forecast result of each trained weak forecast model and its corresponding trained weak forecast model weight. The forecast result of the chlorophyll concentration strong forecast model is the chlorophyll concentration of the current time step to be forecasted.
[0120] Figure 7 Schematic diagram of the hardware structure of the electronic device provided by the embodiment of the present invention. Figure 7 As shown, the electronic device of this embodiment includes: a processor 701 and a memory 702; wherein the memory 702 is used to store computer-executable instructions; the processor 701 is used to execute the computer-executable instructions stored in the memory to implement the various steps performed by the electronic device in the above embodiment. For details, please refer to the relevant description in the above method embodiment.
[0121] Optionally, the memory 702 may be independent or integrated with the processor 701 .
[0122] When the memory 702 is independently provided, the electronic device further includes a bus 703 for connecting the memory 702 and the processor 701 .
[0123] The embodiment of the present invention further provides a computer storage medium, in which computer execution instructions are stored. When the processor 701 executes the computer execution instructions, the above method is implemented.
[0124] The embodiment of the present invention further provides a computer program product, including a computer program. When the computer program is executed by the processor 701, the above method is implemented.
[0125] In the embodiments provided by the present invention, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic, for example, the division of modules is only a logical function division, and there may be other division methods in actual implementation, such as multiple modules can be combined or integrated into another system, or some features can be ignored or not executed. Another point, the mutual coupling or direct coupling or communication connection shown or discussed can be an indirect coupling or communication connection through some interfaces, devices or modules, which can be electrical, mechanical or other forms.
[0126] The modules described as separate components may or may not be physically separated, and the components shown as modules may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the modules may be selected according to actual needs to implement the solution of this embodiment.
[0127] In addition, each functional module in each embodiment of the present invention may be integrated into one processing unit, each module may exist physically separately, or two or more modules may be integrated into one unit. The unit formed by the above modules may be implemented in the form of hardware or in the form of hardware plus software functional units.
[0128] The above-mentioned integrated module implemented in the form of a software function module can be stored in a computer-readable storage medium. The above-mentioned software function module is stored in a storage medium, including a number of instructions for causing a computer device (which can be a personal computer, a server, or a network device, etc.) or a processor 701 to perform some steps of the methods of various embodiments of the present application.
[0129] It should be understood that the processor 701 may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), etc. A general-purpose processor may be a microprocessor or the processor 701 may be any conventional processor 701, etc. The steps of the method disclosed in the invention may be directly embodied in the execution of the hardware processor 701, or may be executed by a combination of hardware and software modules in the processor 701.
[0130] The memory 702 may include a high-speed RAM memory, and may also include a non-volatile storage NVM, such as at least one disk memory, and may also be a USB flash drive, a mobile hard disk, a read-only memory, a magnetic disk, or an optical disk.
[0131] The bus 703 may be an Industry Standard Architecture (ISA), a Peripheral Component Interconnect (PCI) bus, or an Extended Industry Standard Architecture (EISA) bus, etc. The bus 703 may be divided into an address bus, a data bus, a control bus, etc. For ease of representation, the bus 703 in the drawings of the present application is not limited to only one bus 703 or one type of bus 703.
[0132] The above storage medium can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic disk or optical disk. The storage medium can be any available medium that can be accessed by a general or special purpose computer.
[0133] An exemplary storage medium is coupled to the processor 701, so that the processor 701 can read information from the storage medium and write information to the storage medium. Of course, the storage medium can also be a component of the processor 701. The processor 701 and the storage medium can be located in an application specific integrated circuit (Application Specific Integrated Circuits, referred to as ASIC). Of course, the processor 701 and the storage medium can also exist as discrete components in an electronic device or a main control device.
[0134] Those skilled in the art can understand that all or part of the steps of implementing the above-mentioned method embodiments can be completed by hardware related to program instructions. The aforementioned program can be stored in a computer-readable storage medium. When the program is executed, the steps of the above-mentioned method embodiments are executed; and the aforementioned storage medium includes: ROM, RAM, disk or optical disk and other media that can store program codes.
[0135] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or replace some or all of the technical features therein with equivalents. However, these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present invention.
Claims
1. A chlorophyll concentration prediction method based on AdaBoost, characterized in that: The following steps are involved: Acquire the buoy observation data, meteorological data and tide data of the previous time step and perform data preprocessing to obtain training samples, and construct training data based on the training samples and the measured chlorophyll concentration of the current time step, wherein the buoy observation data includes chlorophyll concentration, water temperature, dissolved oxygen and pH value, and the meteorological data includes average temperature, minimum temperature, maximum temperature, average air pressure, minimum air pressure, maximum air pressure, average 2-minute wind speed, maximum wind speed, precipitation and relative humidity; A strong prediction model for chlorophyll concentration integrating several weak prediction models is constructed, wherein the weak prediction model adopts an LSTM model, and during the training process of the weak prediction model, an AdaBoost algorithm is used to iteratively adjust the distribution weights of the training data, and each weak prediction model is trained using the training data used in each iteration to obtain several trained weak prediction models, and the weight of each trained weak prediction model is calculated; The buoy observation data, meteorological data and tide data of the previous time step of the current time step to be forecasted are obtained and data preprocessing is performed to obtain input data, the input data is input into each of the trained weak forecast models to obtain the forecast result of each trained weak forecast model, and the forecast result of the strong forecast model for chlorophyll concentration is obtained according to the forecast result of each trained weak forecast model and the weight calculation of the corresponding trained weak forecast model, and the forecast result of the strong forecast model for chlorophyll concentration is the chlorophyll concentration of the current time step to be forecasted.
2. The chlorophyll concentration prediction method based on AdaBoost according to claim 1, characterized in that: The distribution weights of the training data are iteratively adjusted using the AdaBoost algorithm, and each weak prediction model is trained using the training data used in each iteration to obtain a plurality of trained weak prediction models, and the weight of each trained weak prediction model is calculated, specifically including: Initialize the distribution weights of the training data to obtain the training data used in the first iteration; In the t-th iteration process, the t-th weak prediction model is trained using the training data used in the t-th iteration to obtain the t-th trained weak prediction model; The t-th trained weak prediction model is used to calculate the prediction error of the training data used in the t-th iteration, and the distribution weight of the training data used in the t-th iteration is adjusted based on the prediction error of the training data used in the t-th iteration to obtain the distribution weight of the training data used in the t+1-th iteration; Calculating the error rate of the t-th trained weak prediction model according to the distribution weights of the training data used in the t-th iteration and the forecast error, and obtaining the unnormalized weight of the t-th trained weak prediction model according to the error rate of the t-th trained weak prediction model; Repeat the above iterative process until t equals the preset number of iterations N; Normalization is performed according to the unnormalized weight of each trained weak prediction model to obtain the weight of each trained weak prediction model.
3. The chlorophyll concentration prediction method based on AdaBoost according to claim 2, characterized in that: The distribution weights of the training data used in the first iteration are initialized non-uniformly, as shown in the following formula: Where D1(i) represents the weight of the i-th training sample in the training data used in the first iteration, m is the total number of training samples in the training data, and Chl(i) represents the measured chlorophyll concentration at the current time step corresponding to the i-th training sample.
4. The chlorophyll concentration prediction method based on AdaBoost according to claim 2, characterized in that: The prediction error of the training data used in the t-th iteration is calculated using the t-th trained weak prediction model, and the distribution weight of the training data used in the t-th iteration is adjusted based on the prediction error of the training data used in the t-th iteration to obtain the distribution weight of the training data used in the t+1-th iteration, specifically including: Inputting the i-th training sample in the training data used in the t-th iteration into the t-th trained weak prediction model to obtain the prediction result O(i) of the t-th trained weak prediction model for the i-th training sample; The prediction error e of the i-th training sample in the training data used in the t-th iteration is calculated using the following formula: t (i) e t (i)=|Chl(i)-O(i)|; The following formula is used to adjust the training data used in the tth iteration to obtain the unnormalized distribution weights of the training data used in the t+1th iteration: Among them, a represents the adjustment coefficient, a>1, b is the threshold, D t (i) represents the weight of the i-th training sample in the training data used in the t-th iteration, D' t+1 (i) represents the unnormalized weight of the i-th training sample in the training data used in the t+1-th iteration; The unnormalized weight of the i-th training sample in the training data used in the t+1th iteration is normalized to obtain the weight of the i-th training sample in the training data used in the t+1th iteration, as shown in the following formula: Among them, D t+1 (i) represents the weight of the i-th training sample in the training data used in the t+1-th iteration.
5. The chlorophyll concentration prediction method based on AdaBoost according to claim 4, characterized in that: The error rate of the t-th trained weak prediction model is calculated according to the distribution weight of the training data used in the t-th iteration and the forecast error, and the unnormalized weight of the t-th trained weak prediction model is calculated according to the error rate of the t-th trained weak prediction model, specifically including: The error rate E(t) of the tth trained weak prediction model is calculated using the following formula: The unnormalized weight a'(t) of the t-th trained weak prediction model is calculated using the following formula: The unnormalized weight of the t-th trained weak prediction model is normalized to obtain the weight of the t-th trained weak prediction model, as shown in the following formula: Where a(t) represents the weight of the tth trained weak prediction model.
6. The chlorophyll concentration prediction method based on AdaBoost according to claim 1, characterized in that: The prediction result of the chlorophyll concentration strong prediction model is calculated using the following formula: Wherein, H represents the prediction result of the strong prediction model of chlorophyll concentration, a(t) represents the weight of the tth trained weak prediction model, and h(t) represents the prediction result of the tth trained weak prediction model.
7. A chlorophyll concentration prediction device based on AdaBoost, characterized in that: include: A data acquisition module is configured to acquire the buoy observation data, meteorological data and tide data of the previous time step and perform data preprocessing to obtain training samples, and construct training data based on the training samples and the measured chlorophyll concentration of the current time step, wherein the buoy observation data includes chlorophyll concentration, water temperature, dissolved oxygen and pH value, and the meteorological data includes average temperature, minimum temperature, maximum temperature, average air pressure, minimum air pressure, maximum air pressure, average 2-minute wind speed, maximum wind speed, precipitation and relative humidity; A model building module is configured to build a strong prediction model of chlorophyll concentration integrating several weak prediction models, wherein the weak prediction model adopts an LSTM model, and in the training process of the weak prediction model, an AdaBoost algorithm is used to iteratively adjust the distribution weight of the training data, and each weak prediction model is trained using the training data used in each iteration to obtain several trained weak prediction models, and the weight of each trained weak prediction model is calculated; The forecast module is configured to obtain the buoy observation data, meteorological data and tide data of the previous time step of the current time step to be forecasted and perform data preprocessing to obtain input data, input the input data into each of the trained weak forecast models to obtain the forecast result of each trained weak forecast model, and obtain the forecast result of the chlorophyll concentration strong forecast model according to the forecast result of each trained weak forecast model and the weight calculation of the corresponding trained weak forecast model, the forecast result of the chlorophyll concentration strong forecast model is the chlorophyll concentration of the current time step to be forecasted.
8. An electronic device, comprising: one or more processors; a storage device for storing one or more programs, When the one or more programs are executed by the one or more processors, the one or more processors implement the method according to any one of claims 1 to 6.
9. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the method according to any one of claims 1 to 6 is implemented.
10. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the method according to any one of claims 1 to 6 is implemented.
Citation Information
Patent Citations
PM2.5 forecasting method based on ensemble learning
CN103955742A
Method for predicting concentration of chlorophyll in water body
CN114417227A
Neural network water quality parameter prediction modeling method based on AdaBoost improvement
CN115953049A
Automatic word alignment
US20120226489A1
BP_adaboost model-based method and system for predicting credit card user default
WO2018090657A1
Cited By
Sea surface chlorophyll concentration prediction method and system based on remote sensing and deep learning
CN120067872A