Runoff prediction method and model explanation method based on machine learning model

By dividing the runoff variation period into the snowmelt influence period and the precipitation-dominant period, and by using rolling forecasts and SHAP interpretation methods, the problems of low accuracy and uninterpretability of runoff forecasts in existing technologies have been solved, achieving higher accuracy and reliability in runoff forecasting.

CN117556947BActive Publication Date: 2025-12-26XIAN UNIV OF TECH
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202311495296.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-11-09
Publication Date
2025-12-26
Estimated Expiration
2043-11-09

AI Technical Summary

Technical Problem

Existing machine learning models in runoff forecasting often use a single model to handle runoff at different stages of hydrological processes in a general way, resulting in insufficient accuracy of forecast results. Moreover, most of them are "black box" models, which cannot explain the prediction process, thus reducing the reliability and application scope of the models.

Method used

The runoff variation period was divided into the snowmelt influence period and the precipitation-dominated period. Forecast factors for each period were determined, and a rolling forecast method was used to train the machine learning model. At the same time, the SHAP value interpretation method was used to interpret the model. The input-output relationship of the model was explained by calculating the SHAP value, interaction effect value and main effect value of the forecast factors.

Benefits of technology

It improves the accuracy and reliability of runoff forecasting, enhances the model's adaptability, explains the correlations within the model, and improves the credibility of forecast results.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117556947B_ABST
    Figure CN117556947B_ABST
Patent Text Reader

Abstract

The application discloses a runoff prediction method and model explanation method based on a machine learning model, and comprises the following steps: dividing a runoff variation period into a snowmelt influence period and a precipitation dominant period, and determining a plurality of snowmelt runoff prediction factors of the snowmelt influence period and a plurality of precipitation runoff prediction factors of the precipitation dominant period respectively; obtaining a snowmelt influence period data set and a precipitation dominant period data set, and training a snowmelt influence period machine learning model and a precipitation dominant period machine learning model by using the snowmelt influence period data set and the precipitation dominant period data set respectively; inputting the plurality of snowmelt runoff prediction factors and the plurality of precipitation runoff prediction factors into the snowmelt influence period machine learning model and the precipitation dominant period machine learning model respectively, and obtaining a runoff prediction result of the snowmelt influence period and a runoff prediction result of the precipitation dominant period. The runoff prediction method improves the accuracy of the prediction result by establishing runoff prediction models in different hydrological variation periods.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of hydrological forecasting, and particularly relates to a runoff forecasting method and model interpretation method based on a machine learning model. BACKGROUND

[0002] As an important technical method for rational utilization of water resources, runoff forecasting has important guiding significance and value for improving the flood control capability of a river basin, the safe and economic operation efficiency of a cascade hydropower station group, and the decision-making level of multi-energy complementary optimization scheduling. However, due to the high complexity of hydrological processes and numerous influencing factors, the runoff characteristics under different hydro-meteorological conditions and different stages of hydrological processes are different, so runoff forecasting is a challenging task.

[0003] With the development of computer technology, machine learning models have shown excellent performance in runoff forecasting. Machine learning models mainly establish a mapping relationship between historical runoff data and hydro-meteorological forecasting factors to forecast future runoff.

[0004] However, existing machine learning models usually use a single runoff forecasting model to generally forecast runoff at different stages of the hydrological process, and the prediction results often do not meet the accuracy requirements. In addition, current machine learning mostly belongs to a "black box" model, that is, it can give accurate predictions according to inputs, but cannot give explanations for model predictions, which reduces the credibility and application range of machine learning. SUMMARY

[0005] To solve the above problems, the present application discloses a runoff forecasting method and model interpretation method based on a machine learning model.

[0006] The present application discloses a runoff forecasting method based on a machine learning model, comprising the following steps:

[0007] dividing the runoff change period into a snowmelt influence period and a precipitation dominant period, and determining a plurality of snowmelt runoff forecasting factors for the snowmelt influence period and a plurality of precipitation runoff forecasting factors for the precipitation dominant period;

[0008] obtaining a snowmelt influence period data set and a precipitation dominant period data set, and training a snowmelt influence period machine learning model and a precipitation dominant period machine learning model using the snowmelt influence period data set and the precipitation dominant period data set, respectively;

[0009] inputting the plurality of snowmelt runoff forecasting factors and the plurality of precipitation runoff forecasting factors into the snowmelt influence period machine learning model and the precipitation dominant period machine learning model, respectively, to obtain runoff forecasting results for the snowmelt influence period and the precipitation dominant period.

[0010] Preferably, the runoff variation period is divided into a snowmelt influence period and a precipitation dominant period, specifically:

[0011] The historical average snow cover rate of a plurality of preset time periods and the historical average snowmelt water equivalent elasticity coefficient of the corresponding time period are obtained;

[0012] The snowmelt influence period and the precipitation dominant period are divided according to the historical average snow cover rate and the historical average snowmelt water equivalent elasticity coefficient.

[0013] Preferably, the snowmelt influence period and the precipitation dominant period are divided according to the historical average snow cover rate and the historical average snowmelt water equivalent elasticity coefficient, specifically:

[0014] If the historical average snow cover rate of the current preset time period is less than the historical average snow cover rate of the immediately preceding preset time period, and the historical average precipitation elasticity coefficient of the current preset time period is greater than a threshold value, the current preset time period is divided into a snowmelt influence period;

[0015] Otherwise, the current preset time period is divided into a precipitation dominant period.

[0016] Preferably, the snowmelt influence period dataset includes a historical sequence of a plurality of prediction factors and their corresponding optimal lag time runoff sequence;

[0017] The precipitation dominant period dataset includes a historical sequence of a plurality of precipitation runoff prediction factors and their corresponding optimal lag time runoff sequence.

[0018] Preferably, both the snowmelt influence period machine learning model and the precipitation dominant period machine learning model use a rolling prediction method during training.

[0019] Preferably, the snowmelt influence period dataset and the precipitation dominant period dataset are used to train a snowmelt influence period machine learning model and a precipitation dominant period machine learning model, respectively, specifically:

[0020] The snowmelt influence period machine learning model / precipitation dominant period machine learning model is parameter-optimized, and a snowmelt hyperparameter combination / precipitation hyperparameter combination is obtained accordingly;

[0021] The snowmelt influence period machine learning model / precipitation dominant period machine learning model is trained using the snowmelt influence period dataset / precipitation dominant period dataset, in combination with the snowmelt hyperparameter combination / precipitation hyperparameter combination.

[0022] Preferably, a plurality of snowmelt runoff prediction factors for the snowmelt influence period and a plurality of precipitation runoff prediction factors for the precipitation dominant period are determined, respectively, specifically:

[0023] The point-to-point mutual information method is used to determine a plurality of snowmelt runoff prediction factors of the snowmelt influence period and a plurality of precipitation runoff prediction factors of the precipitation dominant period.

[0024] The parameter optimization specifically comprises: performing parameter optimization by using an SCEUA algorithm.

[0025] The application further discloses a machine learning model interpretation method, comprising the following steps:

[0026] The first SHAP value, the first SHAP interaction effect value of each snowmelt runoff prediction factor on the runoff prediction data of the snowmelt influence period and the second SHAP effect value, the second SHAP interaction effect value of each precipitation runoff prediction factor on the runoff prediction data of the precipitation dominant period are obtained in the runoff prediction method based on the machine learning model.

[0027] The machine learning model of the snowmelt influence period is interpreted according to the plurality of first SHAP values / first SHAP interaction effect values.

[0028] The machine learning model of the precipitation dominant period is interpreted according to the plurality of second SHAP values / second SHAP interaction effect values.

[0029] Preferably, after the first SHAP value, the first SHAP interaction effect value of each snowmelt runoff prediction factor on the runoff prediction data of the snowmelt influence period and the second SHAP effect value, the second SHAP interaction effect value of each precipitation runoff prediction factor on the runoff prediction data of the precipitation dominant period are obtained, the method further comprises:

[0030] The first SHAP main effect value is determined according to each first SHAP value and the corresponding first SHAP interaction effect value.

[0031] The second SHAP main effect value is determined according to each second SHAP value and the corresponding second SHAP interaction effect value.

[0032] The machine learning model of the snowmelt influence period is interpreted according to the plurality of first SHAP main effect values.

[0033] The machine learning model of the precipitation dominant period is interpreted according to the plurality of second SHAP main effect values.

[0034] Compared with the prior art, the application has the following beneficial effects:

[0035] (1) The present application divides the runoff change period into a snowmelt influence period and a precipitation dominant period, determines different prediction factors for the snowmelt influence period and the precipitation dominant period, and then predicts the runoff sequence according to the determined prediction factors. Therefore, the runoff prediction method of the present application considers the runoff production time of precipitation and snowmelt, can better simulate the medium and long term runoff process in the hydrological change process, and establishes a runoff prediction model for different hydrological change periods to predict the runoff in the future period, so that the prediction result accuracy of the present application is higher.

[0036] (2) The present application uses a rolling prediction model, and the prediction result of the present prediction period is input as the next prediction period, which improves the self-adaptive ability of the model to the changing environment and improves the prediction accuracy of the model to the medium and long term runoff.

[0037] (3) The present application explains the decision mechanism of the machine learning model by calculating the SHAP value, SHAP interaction effect value and SHAP main effect value of the prediction factor on the model prediction result based on the SHAP machine learning explanation method, to a certain extent, explains the problem that the correlation between the input and output of the machine learning model is not clear, achieves the technical effect of enhancing the explainability of the machine learning model, and further improves the accuracy and reliability of the runoff prediction method of the present application. BRIEF DESCRIPTION OF DRAWINGS

[0038] Figure 1 is a flow chart of the runoff prediction method of the present application based on the machine learning model;

[0039] Figure 2 is a flow chart of the machine learning model explanation method of the present application;

[0040] Figure 3 is a process schematic diagram of the runoff prediction method and the model explanation method of the present application based on the machine learning model;

[0041] Figure 4 is a schematic diagram of constructing a two-dimensional coordinate system by using the SHAP main effect value in one embodiment of the present application, so as to explain the model. DETAILED DESCRIPTION

[0042] In the following description, specific details are set forth such as particular system architectures, techniques, etc. in order to provide a thorough understanding of the embodiments of the present application. However, it will be apparent to those skilled in the art that the present application can be practiced in other embodiments that depart from these specific details. In other instances, detailed descriptions of well-known systems, apparatuses, circuits, and methods are omitted in order to not obscure the description of the present application with unnecessary detail.

[0043] As Figure 1 , Figure 3As shown, the application discloses a runoff prediction method based on a machine learning model, comprising the following steps:

[0044] Step S1, dividing the runoff change period into a snowmelt influence period and a precipitation dominant period, and determining a plurality of snowmelt runoff prediction factors of the snowmelt influence period and a plurality of precipitation runoff prediction factors of the precipitation dominant period, respectively;

[0045] In the application, a set of all runoff prediction factors in the runoff change process is obtained, and the runoff change period is divided into a snowmelt influence period and a precipitation dominant period; the plurality of snowmelt runoff prediction factors of the snowmelt influence period and the plurality of precipitation runoff prediction factors of the precipitation dominant period both belong to a subset of the set of all runoff prediction factors, but the specific types of the runoff prediction factors contained are not necessarily the same.

[0046] Preferably, in step S1, the runoff change period is divided into a snowmelt influence period and a precipitation dominant period, specifically:

[0047] S11, obtaining historical average snow cover rate and historical average snowmelt water equivalent elasticity coefficient of a plurality of preset time periods on a time sequence;

[0048] In this embodiment, a seasonal snow area is taken as a research basin, and the runoff component analysis based on the annual average snowmelt water equivalent elasticity coefficient of each month and the annual average snow cover rate of each month are taken as the main basis for dividing the runoff snowmelt influence period and the precipitation dominant period of the basin. The annual average snow cover rate of each month and the annual average snowmelt water equivalent elasticity coefficient of each month are obtained, and the plurality of years herein refer to preset historical years.

[0049] The calculation process of the annual average snowmelt water equivalent elasticity coefficient is as follows:

[0050] The monthly snowmelt water equivalent is obtained by establishing a mathematical statistical model between the degree-day factor and the positive accumulated temperature. The expression of the degree-day model is:

[0051]

[0052] In the formula, M represents the snowmelt water equivalent (mm) of a month; DDF represents the degree-day factor of snow (mm·d -1 ·℃ -1 ), which is mainly related to the latitude and altitude of the region; PDD represents the positive accumulated temperature in the month; H t is a logical variable, H t = 1 when T t > 0, and H t = 0 when T t ≤ 0; T t is the daily average temperature (℃) of a day (t), and n represents the number of days in the month.

[0053] After obtaining the snowmelt water equivalent of each month in the historical years, the average value of each month in the year is calculated to obtain the multi-year average snowmelt water equivalent of each month in the year.

[0054] Under the framework of Budyko hypothesis, the multi-year average snowmelt water equivalent elasticity coefficient of each month in the year is derived based on the water-heat coupling balance equation. According to the water balance principle, the water balance formula of the closed basin considering snowmelt is as follows:

[0055] R = P + M - ET (2)

[0056] In the formula, R represents the multi-year average runoff depth (mm) of each month in the year; P represents the multi-year average precipitation (mm) of each month in the year; M represents the multi-year average snowmelt water equivalent (mm) of each month in the year; and ET represents the multi-year average actual evapotranspiration (mm) of each month in the year.

[0057] According to the water-heat coupling balance equation of the basin, the multi-year average actual evapotranspiration ET of each month in the year can be calculated by the following formula:

[0058]

[0059] In the formula, ET is the multi-year average actual evapotranspiration (mm) of each month in the year; P is the multi-year average precipitation (mm) of each month in the year; M represents the multi-year average snowmelt water equivalent (mm) of each month in the year; ET0 is the multi-year average potential evapotranspiration (mm) of each month in the year; and n is a lower surface parameter, which is mainly related to the land use, vegetation and soil of the basin.

[0060] The data in formulas (1)-(3) can be directly obtained or calculated through meteorological observation stations and published satellite remote sensing data. By simultaneously solving formulas (1)-(3) and deriving the snowmelt water equivalent M, the expression of the multi-year average snowmelt water equivalent elasticity coefficient of each month in the year is as follows:

[0061]

[0062] In the formula, ε M is the multi-year average snowmelt water equivalent elasticity coefficient of each month in the year; φ represents the dryness index, which is calculated by ET0 / P; and r represents the proportion of the multi-year average snowmelt water runoff of each month in the year in the total runoff.

[0063] In other embodiments, the model of the historical snowmelt water equivalent can also be constructed through hydrological models such as SWAT and HBV, and the snowmelt water equivalent M is obtained. A new calculation method of the multi-year average snowmelt water equivalent elasticity coefficient of each month in the year is obtained through other water-heat balance hypotheses and the water balance formula of the basin considering snowmelt, so as to be used for time period division.

[0064] Further, the embodiment obtains the multi-year average snow cover rate of each month in a year through satellite remote sensing data.

[0065] S12, dividing the snowmelt influencing period and the precipitation dominated period according to the multi-year average snow cover rate of each month in a year and the multi-year average snowmelt water equivalent elasticity coefficient of each month in a year.

[0066] In the embodiment, if the multi-year average snow cover rate of each month in a current preset month is less than the multi-year average snow cover rate of each month in a historical preset month adjacent to the current preset month, and the multi-year average snowmelt water equivalent elasticity coefficient of each month in the current preset month is greater than a threshold value, the current preset month is divided into the snowmelt influencing period.

[0067] Otherwise, the current preset month segment is divided into the precipitation dominated period.

[0068] Preferably, in S1, a plurality of snowmelt runoff prediction factors of the snowmelt influencing period and a plurality of precipitation runoff prediction factors of the precipitation dominated period are determined respectively, and specifically:

[0069] The plurality of snowmelt runoff prediction factors of the snowmelt influencing period and the plurality of precipitation runoff prediction factors of the precipitation dominated period are determined by using the point mutual information method.

[0070] Before using the point mutual information method, the embodiment first obtains a plurality of prediction factor sequences in the runoff change period and corresponding runoff sequences, and the obtaining manner is specifically:

[0071] Based on the hydro-meteorological data observed by the meteorological observation station in the runoff change period (i.e. the snowmelt influencing period and the precipitation dominated period) and the atmospheric circulation data published by the relevant research institutions, a sequence of a plurality of prediction factors such as precipitation, air temperature, evaporation, wind speed, relative humidity, air pressure, El Niño-Southern Oscillation index, Arctic Oscillation index, Pacific Decadal Oscillation index, etc. in the runoff change period is obtained, and a runoff sequence corresponding to the above prediction factor sequence in the period is also obtained.

[0072] Then, the embodiment uses the point mutual information method to screen the snowmelt runoff prediction factor from the plurality of prediction factors in the snowmelt influencing period, and to screen the precipitation runoff prediction factor from the plurality of prediction factors in the precipitation dominated period.

[0073] The point mutual information method (PMI) specifically includes the following steps:

[0074] The point mutual information value of each prediction factor and the corresponding runoff sequence in the runoff change period is calculated.

[0075] Taking the process of determining the plurality of snowmelt runoff prediction factors by using the point mutual information method as an example:

[0076] The point mutual information value of a certain prediction factor in the snowmelt influencing period and the runoff in the snowmelt influencing period is obtained, and the calculation formula is:

[0077]

[0078] In the formula, X is a sequence of a forecast factor in the snowmelt influencing period, Y is a sequence of runoff in the snowmelt influencing period, x is a forecast factor value at a time, and y is a runoff value at a time.

[0079] According to the above formula, the point-by-point mutual information value of each forecast factor sequence and the runoff sequence in the snowmelt influencing period is calculated, and a set of point-by-point mutual information values in the snowmelt influencing period is obtained.

[0080] Similarly, according to the above formula, the point-by-point mutual information value of each forecast factor sequence and the runoff sequence in the precipitation dominant period in the runoff variation period is calculated, and a set of point-by-point mutual information values in the precipitation dominant period is obtained.

[0081] A plurality of snowmelt runoff forecast factors are determined according to the set of point-by-point mutual information values in the snowmelt influencing period, and a plurality of precipitation runoff forecast factors are determined according to the set of point-by-point mutual information values in the precipitation dominant period.

[0082] A preset number of forecast factors corresponding to the point-by-point mutual information values in the snowmelt influencing period from large to small are obtained from the set of point-by-point mutual information values in the snowmelt influencing period as snowmelt runoff forecast factors.

[0083] Similarly, a preset number of forecast factors corresponding to the point-by-point mutual information values in the precipitation dominant period from large to small are obtained from the set of point-by-point mutual information values in the precipitation dominant period as precipitation runoff forecast factors.

[0084] Further, since the snowmelt runoff forecast factors and the precipitation runoff forecast factors have a certain lag on the runoff, for example, the runoff of the current month is most significantly responsive to the snowmelt water equivalent of the previous month, and at this time, the best lag time of the forecast factor of the snowmelt water equivalent corresponding to the runoff is one month. Therefore, the best lag time of each snowmelt runoff forecast factor and each precipitation runoff forecast factor on the runoff is determined by the correlation coefficient method.

[0085] The process of obtaining the best lag time sequence of the snowmelt runoff forecast factor is as follows.

[0086] In this embodiment, the correlation coefficient of the runoff sequence and the snowmelt runoff forecast factor with a lag time of 1-12 months is calculated by the correlation coefficient method, and the calculation formula is as follows:

[0087]

[0088] In the formula, X m represents a sequence of a snowmelt runoff forecast factor with a lag time of m, and the value range of m is 1-12 months; and Y represents a sequence of runoff in the snowmelt influencing period.

[0089] Using the above formula, the correlation of each snowmelt runoff prediction factor with the runoff sequence in the snowmelt influence period is calculated for a lag time of 1-12 months, and the lag time corresponding to the strongest correlation (i.e., the largest absolute value of p) is taken as the optimal lag time of the snowmelt runoff prediction factor.

[0090] Correspondingly, the optimal lag time of various precipitation runoff prediction factors is obtained by using the correlation coefficient method.

[0091] In other embodiments, the historical sequence of the snowmelt runoff prediction factor and its corresponding runoff sequence, the historical sequence of the precipitation runoff prediction factor and its corresponding runoff sequence under multiple optimal lag times can also be obtained by partial correlation analysis, stepwise regression, etc.

[0092] S2, obtain a snowmelt influence period data set and a precipitation dominant period data set, and train a snowmelt influence period machine learning model and a precipitation dominant period machine learning model using the snowmelt influence period data set and the precipitation dominant period data set, respectively;

[0093] Preferably, the sequence of the snowmelt runoff prediction factor under multiple optimal lag times and its corresponding runoff sequence are taken as the snowmelt influence period data set, and the sequence of the precipitation runoff prediction factor under multiple optimal lag times and its corresponding runoff sequence are taken as the precipitation dominant period data set.

[0094] Preferably, S2 specifically comprises:

[0095] S21, performing parameter optimization on the snowmelt influence period machine learning model / precipitation dominant period machine learning model using the snowmelt influence period data set / precipitation dominant period data set, to obtain a snowmelt influence period machine learning model hyperparameter combination / precipitation dominant period machine learning model hyperparameter combination;

[0096] S22, training the snowmelt influence period machine learning model / precipitation dominant period machine learning model under the snowmelt influence period machine learning model hyperparameter combination / precipitation dominant period machine learning model hyperparameter combination using the snowmelt influence period data set / precipitation dominant period data set.

[0097] S3, inputting multiple snowmelt runoff prediction factors in the snowmelt influence period and multiple precipitation runoff prediction factors in the precipitation dominant period into the snowmelt influence period machine learning model and the precipitation dominant period machine learning model, respectively, to obtain runoff prediction results in the snowmelt influence period and the precipitation dominant period.

[0098] In this embodiment, the multiple snowmelt runoff forecast factors input into the corresponding model are combinations of multiple snowmelt runoff forecast factors corresponding to the time period of runoff data within a preset prediction time period. For example, in S1, three snowmelt forecast factors—precipitation, temperature, and evaporation—are calculated, with optimal lag times of 1, 2, and 3 months for runoff, respectively. The preset runoff prediction time is April. Therefore, the combination of snowmelt runoff forecast factors formed by November precipitation data, October temperature data, and September evaporation data is input into the snowmelt impact period machine learning model to obtain the runoff data for April. All multiple snowmelt runoff forecast factors are based on observations from meteorological stations.

[0099] The model input process and acquisition method for multiple precipitation runoff forecasting factors are the same as described above.

[0100] In this example, rolling forecasts are used to improve forecast accuracy during the training of both the snowmelt impact period machine learning model and the precipitation-dominant period machine learning model.

[0101] In this embodiment, the Limiting Gradient Boosting Tree (XGBoost) model is used as the runoff forecasting model during the snowmelt impact period, and the Long Short-Term Memory Neural Network (LSTM) is used as the runoff forecasting model during the precipitation-dominant period. In other embodiments, any machine learning or deep learning model can also be used as the runoff forecasting model.

[0102] Taking the training of a machine learning model for the snowmelt impact period and the prediction of runoff in the i-th time period as an example, the process is shown in the following formula:

[0103] c i =O[M i (X i ,Y i )]

[0104]

[0105]

[0106] In the formula: c i X represents the hyperparameter combination of the model in the i-th time period; O represents the model hyperparameter optimization method; X i Y represents the set of snowmelt runoff forecasting factor sequences input to the model; i Represents the relationship between the input model and X i The corresponding runoff sequence; M i (X i ,Y i ) represents model M i With X i and Y i As training data; This indicates that when the hyperparameter combination is c i Model Mi parameters of the model; denotes the combination of hyperparameters as c i , parameters of the model; The snowmelt runoff prediction factor combination x i of the i-th period is taken as input for prediction; denotes the prediction result of the model corresponding to x i . The model hyperparameter optimization is realized using the SCEUA algorithm.

[0107] The corresponding text process of the above formula is as follows:

[0108] The snowmelt influence period data set (X i , Y i ) is input into the extreme gradient boosting tree model, and the model hyperparameter is optimized using the hyperparameter optimization method O to obtain the snowmelt model hyperparameter combination c i .

[0109] Using the snowmelt influence period data set (X i , Y i ) under the hyperparameter combination c i , the parameters of the model with good performance are obtained and the model

[0110] The snowmelt runoff prediction factor combination x i of the i-th period to be predicted is obtained, and x i is input into the model to obtain the runoff prediction result of the model

[0111] In the rolling prediction process of the present embodiment, the snowmelt runoff prediction factor sequence of the snowmelt influence period data set includes the runoff value of the last preset period; the snowmelt runoff prediction factor combination also includes the runoff prediction result of the last prediction period.

[0112] Thus, in the present embodiment, the snowmelt influence period machine learning model and the precipitation dominant period machine learning model continuously add the prediction result of the last period to the prediction of the next period model in the prediction process. When the prediction accuracy of the base model significantly decreases in the process, it is necessary to continuously adjust the model parameters using the optimization algorithm until the model accuracy threshold is reached to realize model correction.

[0113] The process of realizing model correction by reusing the optimization algorithm to optimize parameters in the snowmelt influence period is shown in the following formula:

[0114] c i+1 = O[M i+1 (X i +x​i i i

[0115]

[0116] The corresponding text process of the formula is as follows:

[0117] The snowmelt influence period data set (X i i ), the snowmelt runoff prediction factor combination x i , and the corresponding measured runoff y i are input into the extreme gradient boosting tree model, the model hyperparameters are optimized by using the hyperparameter optimization model, and the snowmelt hyperparameter combination c i+1 is obtained.

[0118] The snowmelt influence period data set (X i i ), the snowmelt runoff prediction factor combination x i , and the corresponding measured runoff y i are input into the extreme gradient boosting tree model, the model hyperparameters are optimized by using the hyperparameter optimization model, and the snowmelt hyperparameter combination c i+1 is obtained.

[0119] Further, the prediction process of the next time period using the rectified model is shown in the following formula:

[0120]

[0121] The corresponding text process of the formula is as follows:

[0122] The snowmelt runoff prediction factor x i+1 of the i+1th period to be predicted is obtained, and the snowmelt runoff prediction factor combination x i+1 of the i+1th period is input into the model , and the runoff prediction result of the model is obtained.

[0123] Correspondingly, the snowmelt influence period data set in the snowmelt influence period runoff prediction data process is replaced by the precipitation dominant period data set; the snowmelt runoff prediction factor combination is replaced by the precipitation runoff prediction factor combination, the snowmelt influence period runoff sequence is replaced by the precipitation dominant period runoff sequence, and the precipitation runoff prediction factor of the prediction period is input into the machine learning model in the same way, so that the corresponding precipitation dominant period runoff prediction result is obtained.

[0124] ​​​​​The application constructs a runoff machine learning model for the snow-melting influence period and the precipitation dominant period, and the prediction mode of the model is rolling prediction, that is, the prediction result of the current prediction period is taken as an input value to perform prediction of the next period.

[0125] As shown in Figure 2 , Figure 3 , the application further discloses a machine learning model explanation method, which comprises the following steps:

[0126] The application has the same explanation mechanism for the snow-melting influence period machine model and the precipitation dominant period machine model, and thus in the following embodiments, the snow-melting influence period machine model and the precipitation dominant period machine model are collectively referred to as a machine learning model, and the snow-melt runoff prediction factor and the precipitation runoff prediction factor are also collectively referred to as a prediction factor, so as to avoid tedious description.

[0127] In this embodiment, the SHAP machine learning explanation method is used to calculate the SHAP value, SHAP interaction effect value and SHAP main effect value of each prediction factor on the model prediction result, so as to explain the machine learning "black box" model.

[0128] Preferably, the SHAP value, SHAP interaction effect value and SHAP main effect value of each prediction factor on the runoff prediction result are obtained, and specifically, the SHAP value, SHAP interaction effect value and SHAP main effect value of each prediction factor on the runoff prediction result are calculated.

[0129] The SHAP value, SHAP interaction effect value and SHAP main effect value of each prediction factor on the runoff prediction result are calculated.

[0130] Taking the calculation process of the SHAP value as an example, in this embodiment, the SHAP value is used to represent the contribution rate of the prediction factor to the runoff prediction data of the period corresponding to the prediction factor.

[0131] In the prediction factor, any prediction factor i, the formula for calculating the corresponding SHAP value is as follows:

[0132]

[0133] In the formula, φ i represents the SHAP value of a prediction factor i; M represents the set of all prediction factors input into the model; |M| represents the number of all prediction factors; S represents an arbitrary subset of the set of prediction factors not containing the prediction factor i; |S| represents the number of factor types in the arbitrary subset of the set of prediction factors not containing the prediction factor i; S∪{i} represents an arbitrary prediction factor subset containing the prediction factor i; f S∪{i} (x S∪{i} ) and f S (x Srepresents the model prediction result fitted by the predictor set s∪{i}; f s (x s represents the model prediction result fitted by the predictor set s.

[0134] Further, according to the numerical value of the SHAP value, the influence strength and positive or negative effect of each predictor on the model prediction data can be evaluated.

[0135] The greater the absolute value of the SHAP value of the predictor i is, the stronger the influence ability of the predictor i on the prediction result is; if the SHAP value of the predictor i is positive, it means that the predictor i is positively correlated with the runoff prediction result, otherwise, it is negatively correlated.

[0136] The SHAP interaction effect value between each two predictors is calculated.

[0137] In this embodiment, the SHAP interaction effect value is used to represent the interaction between two predictors. Taking the calculation process of the SHAP interaction effect value of the predictor i and the predictor j as an example, the SHAP interaction value calculation formula is as follows:

[0138]

[0139] In the formula, φ i,j represents the SHAP interaction effect value between the predictor i and the predictor j; M represents the set of all predictors of the model; |M| represents the number of all predictor types; S represents an arbitrary subset of the predictor set not containing the predictors i and j; |S| represents the number of factor types in the arbitrary subset of the predictor set not containing the predictors i and j; S∪{i,j} represents an arbitrary predictor subset containing the predictors i and j; f s∪{i} (x s∪{i} represents the model prediction result fitted by the predictor set s∪{i,j}; f s (x s represents the model prediction result fitted by the predictor set s.

[0140] A two-dimensional coordinate system is constructed based on the obtained SHAP interaction effect value, the horizontal axis is the numerical value of the predictor i, the vertical axis is the SHAP interaction effect value of the predictor i, and the sample color on the two-dimensional coordinate system represents the SHAP interaction effect value of the predictor j. According to the spatial distribution law of all samples on the two-dimensional coordinate system, the interaction (linear or nonlinear, response threshold, etc.) between the predictor i and the predictor j is identified, so as to interpret the machine learning model.

[0141] The SHAP main effect value is determined according to the SHAP value and the SHAP interaction effect value.

[0142] The SHAP main effect value is used in the embodiment to represent the contribution degree of the prediction factor to the prediction result after removing the interaction effect, and the calculation formula of the SHAP main effect value is as follows:

[0143]

[0144] In the formula, φ i represents the SHAP value of a certain prediction factor i; φ i,j represents the SHAP interaction value of any two prediction factors i and j.

[0145] Based on the spatial distribution law of the obtained SHAP main effect value on the two-dimensional coordinate system, the complex dependence relationship between the prediction factor and the model output result is identified, so that the machine learning model is explained.

[0146] As Figure 4 shown, a two-dimensional coordinate system is constructed based on the obtained SHAP main effect value, the horizontal axis is the value range of the prediction factor i, and the vertical axis is the SHAP main effect value. According to the spatial distribution law of all samples on the two-dimensional coordinate system, the complex dependence relationship (linear or nonlinear, response threshold, etc.) between the prediction factor and the model output result is identified, so that the machine learning model is explained.

[0147] The SHAP machine learning explanation method is used to calculate the SHAP value, the SHAP interaction effect value and the SHAP main effect value of the prediction factor to the model output, so as to explain the decision mechanism of the machine learning model. To some extent, the problem that the correlation between the input and the output of the machine learning model is not clear is explained, the technical effect of enhancing the explainability of the machine learning model is achieved, and the accuracy of the runoff prediction method of the present application is improved, and the reliability of the result is enhanced.

[0148] Compared with the prior art, the present application has the following beneficial effects:

[0149] (1) The runoff change period is divided into a snowmelt influence period and a precipitation dominant period in the present application, different prediction factors for the snowmelt influence period and the precipitation dominant period are determined, and then the runoff sequence is predicted according to the determined prediction factors. Therefore, the runoff prediction method of the present application considers the runoff production time of precipitation and snowmelt, can better simulate the medium and long term runoff process in the hydrological change process, and establishes a runoff prediction model for different hydrological change periods to predict the runoff in the future period, so that the prediction result accuracy of the present application is higher.

[0150] (2) The rolling prediction model is used in the present application, the prediction result of the present prediction period is used as the input of the next prediction period, the self-adaptation ability of the model to the changing environment is improved, and the prediction accuracy of the model to the medium and long term runoff is improved.

[0151] (3) The SHAP machine learning explanation method is used for calculating SHAP values, SHAP interaction effect values and SHAP main effect values of prediction factors on model prediction results, so that the decision mechanism of the machine learning model is explained, the problem that the correlation between the input and the output of the machine learning model is not clear is explained to a certain extent, the technical effect of enhancing the explainability of the machine learning model is achieved, and the runoff prediction method is further improved in accuracy and reliability.

[0152] The above is only several embodiments of the application, and does not limit the application in any form. Although the preferred embodiments are disclosed above, the application is not limited thereto. Any person skilled in the art can make some changes or modifications to the disclosed technical content without departing from the scope of the application, and the equivalent embodiments are equivalent to the equivalent embodiments, which are within the scope of the technical solution.

Claims

1. A method of runoff prediction based on a machine learning model, characterized by, The method comprises the following steps: dividing the runoff change period into a snowmelt influence period and a precipitation dominant period, and determining a plurality of snowmelt runoff prediction factors in the snowmelt influence period and a plurality of precipitation runoff prediction factors in the precipitation dominant period by using a point-to-point mutual information method; obtaining a snowmelt influence period data set and a precipitation dominant period data set, and training a snowmelt influence period machine learning model and a precipitation dominant period machine learning model by using the snowmelt influence period data set and the precipitation dominant period data set respectively; inputting the plurality of snowmelt runoff prediction factors and the plurality of precipitation runoff prediction factors into the snowmelt influence period machine learning model and the precipitation dominant period machine learning model respectively to obtain a runoff prediction result in the snowmelt influence period and a runoff prediction result in the precipitation dominant period; both the snowmelt influence period machine learning model and the precipitation dominant period machine learning model adopt a rolling prediction mode in the prediction process. 2.The machine learning model based runoff forecasting method according to claim 1, characterized in that, The runoff change period is divided into a snowmelt influence period and a precipitation dominant period, and the division is as follows: obtaining historical average snow cover rates in a plurality of preset time periods and historical average snowmelt water equivalent elastic coefficients corresponding to the time periods; dividing the snowmelt influence period and the precipitation dominant period according to the historical average snow cover rates and the historical average snowmelt water equivalent elastic coefficients. 3.The machine learning model based runoff forecasting method according to claim 2, characterized in that, The snowmelt influence period and the precipitation dominant period are divided according to the historical average snow cover rates and the historical average snowmelt water equivalent elastic coefficients, and the division is as follows: if the historical average snow cover rate of a current preset time period is less than the historical average snow cover rate of a historical preset time period adjacent to the current preset time period, and the historical average snowmelt water equivalent elastic coefficient of the current preset time period is greater than a threshold value, the current preset time period is divided into the snowmelt influence period; otherwise, the current preset time period is divided into the precipitation dominant period. 4.The method of claim 1, wherein, The snowmelt influence period data set comprises historical sequences of a plurality of snowmelt runoff prediction factors with optimal lag time and corresponding runoff sequences thereof; The precipitation dominant period data set comprises historical sequences of a plurality of precipitation runoff prediction factors with optimal lag time and corresponding runoff sequences thereof. 5.The machine learning model based runoff forecasting method according to claim 1, wherein, The snowmelt influence period machine learning model and the precipitation dominant period machine learning model are trained by using the snowmelt influence period data set and the precipitation dominant period data set respectively, and the training is as follows: parameters of the snowmelt influence period machine learning model / precipitation dominant period machine learning model are optimized, and a snowmelt hyperparameter combination / precipitation hyperparameter combination is obtained correspondingly; the snowmelt influence period machine learning model / precipitation dominant period machine learning model is trained by using the snowmelt influence period data set / precipitation dominant period data set, and the snowmelt hyperparameter combination / precipitation hyperparameter combination is combined correspondingly. 6.The method of claim 5, wherein, The parameter optimization is as follows: model hyperparameters are optimized by using an SCEUA algorithm.

7. A machine learning model explanation method, characterized by, The method comprises the following steps: obtaining first SHAP values, first SHAP interaction effect values of each snowmelt runoff prediction factor on a runoff prediction result in the snowmelt influence period, and second SHAP effect values, second SHAP interaction effect values of each precipitation runoff prediction factor on a runoff prediction result in the precipitation dominant period in the runoff prediction method based on the machine learning model in any one of claims 1-6; According to the first SHAP value / first SHAP interaction effect value, the snowmelt influence period machine learning model is explained; According to the second SHAP value / second SHAP interaction effect value, the precipitation dominant period machine learning model is explained. 8.The machine learning model explanation method of claim 7, wherein, After obtaining the first SHAP value, the first SHAP interaction effect value of each snowmelt runoff prediction factor on the runoff prediction result of the snowmelt influence period, and the second SHAP effect value, the second SHAP interaction effect value of each precipitation runoff prediction factor on the runoff prediction result of the precipitation dominant period in the machine learning model-based runoff prediction method of any one of claims 1-6, further comprising: According to each first SHAP value and the corresponding first SHAP interaction effect value, a first SHAP main effect value is determined; According to each second SHAP value and the corresponding second SHAP interaction effect value, a second SHAP main effect value is determined; According to the first SHAP main effect value, the snowmelt influence period machine learning model is explained; According to the second SHAP main effect value, the precipitation dominant period machine learning model is explained.

Citation Information

Patent Citations

  • Snow melting runoff forecasting method based on multi-factor similarity

    CN117556223A

  • Synchronous analysis method and application of available cadmium and available arsenic in soil

    CN118136158A

  • Medium and long term hydrological probability forecasting method and system considering interpretable deep learning model nested combination

    CN119204350A