A short-term temperature measuring resistance value prediction method and system based on AdaBoost ensemble learning
Through the AdaBoost integrated learning method, the problem of poor temperature measurement resistance value prediction caused by insufficient feature extraction in the existing technology is solved, and more accurate prediction and lower failure risk are achieved, ensuring the stable operation of the hydropower generator set .
Patent Information
- Application Number
- CN202411614985.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-13
- Publication Date
- 2025-02-07
- Estimated Expiration
- 2044-11-13
AI Technical Summary
The existing temperature measurement resistance value prediction method is insufficient to predict the fault due to insufficient feature extraction.
Using AdaBoost integrated learning method, a temperature measurement resistance value prediction framework is constructed by obtaining the unit's historical temperature measurement resistance value data, and selecting characteristic factors related to the strong temperature measurement resistance value, and adjusting the sample weight through the iterative process to obtain the final The strong learner makes predictions.
It improves the accuracy of the prediction of temperature measurement resistance value, reduces the risk of unit failure, and ensures the stable operation of unit.
Smart Images

Figure CN119128531B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of equipment fault maintenance, and in particular to a short-term temperature measuring resistance value prediction method and system based on AdaBoost ensemble learning. Background Art
[0002] The temperature of the hydro-turbine generator set will change constantly during operation. The temperature will continue to rise with the growth of time. If the abnormal temperature rise reaches a certain level, it will cause great harm to the hydro-turbine generator set. During the operation of the hydro-turbine generator set, the temperature values of the air cooler, stator, upper guide bearing, thrust bearing and water guide bearing are abnormal from time to time. If the operation and maintenance personnel fail to discover it in time, it will cause hidden dangers to the stable operation of the unit. Therefore, if the resistance value of the temperature measuring resistor in the future can be predicted based on the historical temperature measuring resistor resistance data in the past, the unit parts that may have abnormalities can be checked in advance. This is of great significance to reduce the risk of unit failure and ensure the stable operation of the unit.
[0003] At present, most parts of the generator set use PT100 platinum thermal resistors for temperature measurement. Pt100 platinum thermal resistors are a common temperature sensor with high precision and good linearity, and are usually combined with temperature measurement circuits for high-precision measurement. Its operating temperature range is -200~850℃. When the external temperature changes, the resistance value and temperature of the resistor satisfy a linear relationship. The standard resistance value of the thermal resistor at 0℃ is 100Ω, and it has a good linear relationship at 0~100℃. Therefore, by measuring the change in resistance value at any two temperatures, the temperature characteristics of the thermal resistor can be obtained. The existing machine learning-based resistance value prediction of temperature measuring resistors mainly includes decision trees, neural networks, support vector machines, etc. The data collected in the prediction of temperature measuring resistor values generally have the characteristics of low feature dimensions and unclear relationships between features. In addition, a single model algorithm is basically used for regression prediction, and the use of a single model will lead to insufficient feature extraction and affect the prediction results. Summary of the invention
[0004] In view of the above existing problems, the present invention is proposed.
[0005] Therefore, the present invention provides a short-term temperature measuring resistor value prediction method and system based on AdaBoost ensemble learning to solve the problem that the existing temperature measuring resistor resistance prediction has poor fault prediction results due to insufficient feature extraction.
[0006] In order to solve the above technical problems, the present invention provides the following technical solutions:
[0007] In a first aspect, an embodiment of the present invention provides a method for predicting a short-term temperature measuring resistance value based on AdaBoost ensemble learning, comprising:
[0008] Acquire historical temperature measurement resistance value data of the unit, and construct a temperature measurement resistance value prediction framework based on AdaBoost ensemble learning based on the historical temperature measurement resistance value data of the unit;
[0009] Based on the time characteristic factors, the correlation between each characteristic factor and the temperature measuring resistance value at the current moment is analyzed through the maximum information coefficient, and the characteristic factors with strong correlation with the temperature measuring resistance value are screened out;
[0010] Combined with the temperature resistance value data of the unit and the characteristic factors strongly correlated with the temperature resistance value, each individual learner of the temperature resistance value prediction framework is trained, and the sample weights are adjusted through an iterative process to obtain a final strong learner;
[0011] The temperature measuring resistor value is predicted according to the strong learner and a prediction result is obtained.
[0012] As a preferred solution of the short-term temperature-measuring resistor value prediction method based on AdaBoost ensemble learning described in the present invention, wherein: the temperature-measuring resistor prediction framework based on AdaBoost includes: a plurality of individual learners;
[0013] Dividing the acquired historical unit temperature resistance value data into a temperature resistance prediction training sample set, a validation set and a test set according to the time period, and inputting the training sample data into an initial individual learner after initializing the weight distribution and training the learner;
[0014] Calculate the sample deviation and the regression error rate of the individual learner, update the sample weight distribution of the training set and calculate the weight coefficient of the initial individual learner;
[0015] According to the individual learners with calculated weight coefficients, a linear combination of individual learners is constructed to obtain a strong learner, and a temperature measuring resistor value prediction framework based on AdaBoost ensemble learning is constructed.
[0016] As a preferred solution of the short-term temperature measuring resistance value prediction method based on AdaBoost ensemble learning described in the present invention, it further includes: optimizing the main parameters of the several individual learners to determine the type of individual learners, wherein the main parameters include mean absolute percentage error, root mean square error value and training time;
[0017] Training the individual learners, wherein the input features of the individual learners are year, month, day, hour, historical temperature resistance value, temperature value corresponding to the moment and day type, and the output features are corresponding temperature resistance prediction values;
[0018] When the main parameters of any individual learner prediction model are less than the corresponding preset threshold, the individual learner is selected as the optimal learner type of the temperature resistance prediction framework.
[0019] As a preferred solution of the short-term temperature measuring resistance value prediction method based on AdaBoost ensemble learning described in the present invention, it also includes:
[0020] Given a training data set: ,in is the sample feature, N is the number of features, , is the sample size, For the Thermocouple resistance value of each sample characteristic;
[0021] Traverse all input features in turn and use the selected features and its corresponding value Divide the training samples into two sub-areas and , in order to find the optimal and ;
[0022] The loss function is established according to the square error minimization criterion, and the functional expression is:
[0023] min j , s [ min c 1 ∑ x i ∈ R 1 ( j , s ) ( y i − c 1 ) 2 + min c 2 ∑ x i ∈ R 2 ( j , s ) ( y i − c 2 ) 2 ] ,
[0024] in, is the mean value of the load value in the first sub-area, is the mean value of the load value in the second sub-area;
[0025] Select the feature variables and their corresponding values that minimize the loss function, and use them as the split features and split points of the root node of the optimal type of individual learner;
[0026] Determine the segmentation features and segmentation points of each internal node of the optimal type of individual learner in the two sub-areas until only one data sample is left in the data set, and obtain the predicted value of the temperature measuring resistance corresponding to a set of characteristic values of the output temperature measuring resistance value of the final divided area.
[0027] As a preferred solution of the short-term temperature measuring resistance value prediction method based on AdaBoost ensemble learning described in the present invention, it also includes: determining the number of individual learners of the optimal type and the learning rate;
[0028] The effect of the number of individual learners on the root mean square error under different learning rates was tested on the validation set.
[0029] If the number of individual learners of the optimal type reaches a first value and the root mean square error value tends to a stable state, the first value is determined to be the optimal number of individual learners;
[0030] When the number of individual learners of the optimal type reaches a first value, the learning rate corresponding to the lowest root mean square error value of the individual learner is selected as the optimal learning rate of the temperature resistance prediction framework.
[0031] As a preferred solution of the short-term temperature measuring resistor value prediction method based on AdaBoost ensemble learning described in the present invention, the correlation between each characteristic factor and the temperature measuring resistor value at the current moment is analyzed by the maximum information coefficient, and the characteristic factors strongly correlated with the temperature measuring resistor value are screened out, including:
[0032] When the maximum information coefficient value of each characteristic influencing factor and the corresponding temperature measuring resistance value is larger, the correlation is stronger; when the maximum information coefficient value of each characteristic influencing factor and the corresponding temperature measuring resistance value is smaller, the correlation is weaker;
[0033] The calculation of the maximum information coefficient is expressed as:
[0034] MIC [ x ; y ] = max | X | | Y | < B ( N ) I [ X ; Y ] log 2 (min( | X | , | Y | )) ,
[0035] I [ X ; Y ] ≈ I [ x ; y ] = ∑ X , Y p ( X , Y )log 2 p ( X , Y ) p ( X ) p ( Y ) ,
[0036] in, are the influencing factors of each feature, is the temperature measuring resistance value corresponding to the characteristic influencing factor, Characteristic factors The corresponding value, When the characteristic factor The value is The corresponding temperature measuring resistance value is is a function of the data sample size, .
[0037] As a preferred solution of the short-term temperature-measuring resistor value prediction method based on AdaBoost ensemble learning described in the present invention, wherein: training each individual learner of the temperature-measuring resistor value prediction framework, and adjusting the sample weights through an iterative process, the final strong learner includes:
[0038] Train T individual learners. When there are individual learners, use the current distribution The training data set is used to train the current individual learner, and the maximum error between the true value of each sample in the training set and the predicted result of the individual learner is calculated as:
[0039] ,
[0040] in, For the Individual learners The prediction result of the temperature resistance value of training data, For the The temperature measuring resistance value of each sample characteristic, is the sample size;
[0041] The relative error value of each sample and the maximum error of the individual learner are calculated based on the true value of each sample and the prediction result of the individual learner. The regression error rate of each individual learner on the training data set; the weight coefficient of the current individual learner is calculated based on the regression error rate , the sample distribution of the updated training set is expressed as:
[0042] ,
[0043] ,
[0044] in, is the normalization factor, is the relative error value for each sample, For training Individual learner time The weight of the samples, For training The weight of the first sample in the individual learner, For training Individual learner time The weight of the samples, For training Individual learner time The weight of the samples;
[0045] Train all individual learners and calculate the weight coefficients corresponding to each individual learner , construct a linear combination of individual learners and obtain the final strong learner:
[0046] ,
[0047] in, is the median function, is the number of individual learners.
[0048] In a second aspect, the present invention provides a short-term temperature measuring resistance value prediction system based on AdaBoost ensemble learning, comprising:
[0049] A model building module is used to obtain historical temperature measurement resistance value data of the unit, and build a temperature measurement resistance value prediction framework based on AdaBoost ensemble learning based on the historical temperature measurement resistance value data of the unit;
[0050] The feature screening module is used to analyze the correlation between each feature factor and the temperature measuring resistance value at the current moment based on the time feature factor through the maximum information coefficient, and screen out the feature factors that are strongly correlated with the temperature measuring resistance value;
[0051] A learning module, used to train individual learners of the temperature measuring resistance value prediction framework by combining the temperature measuring resistance value data of the unit and the characteristic factors strongly correlated with the temperature measuring resistance value, and to adjust the sample weights through an iterative process to obtain a final strong learner;
[0052] The prediction module is used to predict the temperature measuring resistance value according to the strong learner and obtain the prediction result.
[0053] In a third aspect, the present invention provides an electronic device, comprising:
[0054] Memory and processor;
[0055] The memory is used to store computer executable instructions, and the processor is used to execute the computer executable instructions. When the computer executable instructions are executed by the processor, the steps of the short-term temperature measuring resistance value prediction method based on AdaBoost ensemble learning are implemented.
[0056] In a fourth aspect, the present invention provides a computer-readable storage medium storing computer-executable instructions, which, when executed by a processor, implement the steps of a method for predicting short-term temperature measuring resistance values based on AdaBoost ensemble learning.
[0057] Compared with the prior art, the present invention has the following beneficial effects: the present invention predicts the resistance value of the temperature measuring resistor in the future by considering characteristic factors such as time, weather, historical temperature measuring resistor values and day type, so as to carry out early inspection of parts of the unit where abnormal temperature may occur, prevent abnormal temperature measuring resistor values of the unit, and reduce the risk of unit failure. BRIEF DESCRIPTION OF THE DRAWINGS
[0058] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the following briefly introduces the drawings required for describing the embodiments. 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 creative labor. Among them:
[0059] Figure 1 A method flow chart of a method and system for predicting short-term temperature measuring resistance value based on AdaBoost ensemble learning according to an embodiment of the present invention;
[0060] Figure 2A short-term temperature-measuring resistor value prediction method and system based on AdaBoost ensemble learning according to an embodiment of the present invention is a temperature-measuring resistor prediction framework diagram based on AdaBoost ensemble learning;
[0061] Figure 3 A trend chart of the number of individual learners and RMSE when the learning rate of a short-term temperature measuring resistance value prediction method and system based on AdaBoost ensemble learning is greater than 0 and not greater than 1 according to an embodiment of the present invention;
[0062] Figure 4 A graph showing the number of individual learners versus calculation time of a method and system for predicting short-term temperature measuring resistance values based on AdaBoost ensemble learning according to an embodiment of the present invention;
[0063] Figure 5 A trend chart of the number of individual learners and RMSE when the learning rate of a short-term temperature measuring resistance value prediction method and system based on AdaBoost ensemble learning is not less than 0.6 and not greater than 1 according to an embodiment of the present invention;
[0064] Figure 6 A schematic diagram of the error of Adaboost on a training set and a validation set of a short-term temperature measuring resistance value prediction method and system based on AdaBoost ensemble learning described in an embodiment of the present invention. DETAILED DESCRIPTION
[0065] In order to make the above-mentioned purposes, features and advantages of the present invention more obvious and easy to understand, the specific implementation methods of the present invention are described in detail below in conjunction with the drawings of the specification. Obviously, the described embodiments are part of the embodiments of the present invention, but not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary persons in the art without creative work should fall within the scope of protection of the present invention.
[0066] In the following description, many specific details are set forth to facilitate a full understanding of the present invention, but the present invention may also be implemented in other ways different from those described herein, and those skilled in the art may make similar generalizations without violating the connotation of the present invention. Therefore, the present invention is not limited to the specific embodiments disclosed below.
[0067] Secondly, the term "one embodiment" or "embodiment" as used herein refers to a specific feature, structure, or characteristic that may be included in at least one implementation of the present invention. The term "in one embodiment" that appears in different places in this specification does not necessarily refer to the same embodiment, nor does it refer to a separate or selective embodiment that is mutually exclusive with other embodiments.
[0068] Example 1, reference Figure 1 to Figure 6, is an embodiment of the present invention, which provides a short-term temperature measuring resistance value prediction method based on AdaBoost ensemble learning, comprising:
[0069] S1: Obtain the historical temperature measurement resistance value data of the unit, and build a temperature measurement resistance value prediction framework based on AdaBoost ensemble learning based on the historical temperature measurement resistance value data of the unit;
[0070] In the embodiment of the present application, the AdaBoost-based temperature resistance prediction framework includes: a number of individual learners;
[0071] The historical unit temperature resistance value data obtained are divided into a temperature resistance prediction training sample set, a validation set and a test set according to the time period, and the training sample data are initialized with weight distribution and then input into the initial individual learner to train the learner;
[0072] Calculate the sample deviation and the regression error rate of the individual learner, update the sample weight distribution of the training set and calculate the weight coefficient of the initial individual learner;
[0073] According to the individual learners with calculated weight coefficients, a linear combination of individual learners is constructed to obtain a strong learner, and a temperature measuring resistor value prediction framework based on AdaBoost ensemble learning is constructed.
[0074] Furthermore, initialize the relevant parameters of the individual learners and set the number of individual learners , initialize the weights of the training sample data:
[0075] ,
[0076] in, is the sample size, When training the first individual learner The weight of the samples.
[0077] In the embodiment of the present application, the method further includes: optimizing the main parameters of the individual learners to determine the type of the individual learners, wherein the main parameters include mean absolute percentage error, root mean square error value and training time;
[0078] Training the individual learners, wherein the input features of the individual learners are year, month, day, hour, historical temperature resistance value, temperature value corresponding to the moment and day type, and the output features are corresponding temperature resistance prediction values;
[0079] When the main parameters of any individual learner prediction model are less than the corresponding preset threshold, the individual learner is selected as the optimal learner type of the temperature resistance prediction framework.
[0080] It should be noted that in the embodiment of the present application, when the average absolute percentage error of the individual learner prediction model is less than the first preset threshold, the root mean square error value is less than the second preset threshold, and the training time does not exceed the third preset time, the individual learner is selected as the optimal learner type of the temperature resistance prediction framework. The first preset threshold, the second preset threshold, and the third preset time can be determined according to the actual application scenario and experimental data to optimize the prediction model performance of the optimal learner type.
[0081] In the embodiment of the present application, it also includes:
[0082] Given a training data set: ,in is the sample feature, N is the number of features, , is the sample size, For the Thermocouple resistance value of each sample characteristic;
[0083] Traverse all input features in turn and use the selected features and its corresponding value Divide the training samples into two sub-areas and , in order to find the optimal and ;
[0084] The loss function is established according to the square error minimization criterion, and the functional expression is:
[0085] min j , s [ min c 1 ∑ x i ∈ R 1 ( j , s ) ( y i − c 1 ) 2 + min c 2 ∑ x i ∈ R 2 ( j , s ) ( y i − c 2 ) 2 ] ,
[0086] in, is the mean value of the load value in the first sub-area, is the mean value of the load value in the second sub-area;
[0087] Furthermore, the predicted mean value of the load value in the first sub-area is expressed as:
[0088] ,
[0089] in, is the sample size of the first sub-region, is the first sub-region;
[0090] The mean value of the predicted load value in the second sub-area is expressed as:
[0091] ,
[0092] in, is the sample size of the second sub-region, is the second sub-region;
[0093] Select the feature variables and their corresponding values that minimize the loss function, and use them as the split features and split points of the root node of the optimal type of individual learner;
[0094] Determine the segmentation features and segmentation points of each internal node of the optimal type of individual learner in the two sub-areas until only one data sample is left in the data set, and obtain the predicted value of the temperature measuring resistance corresponding to a set of characteristic values of the output temperature measuring resistance value of the final divided area.
[0095] In an optional embodiment, the experimental data set uses a data set of temperature resistance values of a power plant unit. The data set contains real data from a power plant from January 1, 2019 to December 1, 2023, with a measurement interval of half an hour, and the measured value is the temperature resistance value at the corresponding moment every half an hour. The present invention uses the sample data from 0:00 on January 1, 2019 to 23:30 on December 31, 2021 in the experimental data set as the training set, and the sample data from 0:00 on January 1, 2022 to 23:30 on December 31, 2022 in the experimental data set as the verification set to adjust the parameters, and the sample data for the whole year of 2023 is used as the test set.
[0096] Four individual learners, CART decision tree, BP, KNN, and SVM, were used for comparison. In order to eliminate the interference of other factors, the parameter settings of each individual learner remained unchanged throughout the experimental stage. The main parameters of each single algorithm were optimized using the Gridsearch grid search method. This method first sets a range for the parameters of each model, and then each model traverses the parameters within this range, and finally selects one or a group of optimal parameters.
[0097] The training set in the experimental data set is used to train the above four individual learners. The input features used are year, month, day, hour, historical temperature resistance value, temperature value corresponding to the moment, and day type. The parameters are adjusted using the validation set in the experimental data set. In the test set, year, month, day, hour, historical temperature resistance value, temperature value corresponding to the moment, and day type are used as input data for each trained model. The model output is the corresponding temperature resistance prediction value. The resolution of the prediction time is half an hour. The input features and output parameter descriptions are shown in Table 1:
[0098] Table 1 Parameter Description
[0099] ,
[0100] Table 2 lists the annual average MAPE and RMSE values of each individual learner prediction model in 2023 and the training time t of each model.
[0101] Table 2 Comparison of individual learner results
[0102] ,
[0103] From the prediction results in Table 2, it can be seen that the CART decision tree model can effectively utilize historical sequence information, has a relatively ideal effect in regression prediction problems, and further improves the prediction effect. Therefore, considering the prediction model evaluation index and calculation time, the CART decision tree is selected as the individual learner of the AdaBoost algorithm.
[0104] In the embodiment of the present application, it also includes: determining the number of individual learners of the optimal type and the learning rate;
[0105] The effect of the number of individual learners on the root mean square error under different learning rates was tested on the validation set.
[0106] If the number of individual learners of the optimal type reaches a first value and the root mean square error value tends to a stable state, the first value is determined to be the optimal number of individual learners;
[0107] When the number of individual learners of the optimal type reaches a first value, the learning rate corresponding to the lowest root mean square error value of the individual learner is selected as the optimal learning rate of the temperature resistance prediction framework.
[0108] It should be noted that the embodiment of the present application further illustrates the learning efficiency of the optimal type of individual learners when the first value is used by increasing the number of individual learners and taking the learning time into consideration.
[0109] Furthermore, when the number of learning increases, the learning time will also increase, and the learning efficiency of the optimal type of individual learner will decrease.
[0110] In an optional embodiment, the number of individual learners n and the learning rate learning_rate (LR) of the individual learners have a direct impact on the accuracy of the AdaBoost ensemble learning algorithm prediction. First, in order to determine the optimal number of individual learners based on the AdaBoost ensemble learning algorithm, the learning rate LR is set to 0.1, 0.3, 0.5, 0.8, and 1.0 on the validation set of the data set, and the RMSE value of the load forecasting model is obtained with the number of individual learners at different learning rates LR. Figure 3 shown.
[0111] from Figure 3It can be seen that when the number of individual learners is 60, the values of each curve begin to stabilize, and the RMSE of the validation set decreases with the increase in the number of individual learners. When the number of individual learners reaches 90, the RMSE of the validation set no longer decreases. Although the RMSE value of the prediction model decreases with the increase in the number of individual learners, the time consumed in calculation is also a factor that needs to be considered. Figure 4 This is a graph showing the time consumed in computing as a function of the number of individual learners. Figure 4 It can be seen that the time required for model training is almost proportional to the number of individual learners. Considering the degree of RMSE reduction and calculation time, the number of individual learners is set to 60.
[0112] Depend on Figure 3 It can be seen that when the learning rate LR is larger, the corresponding prediction model RMSE value is lower. Therefore, LR is set to 0.6~1.0, and the LR value is gradually changed. The corresponding RMSE value at different LR values changes with the number of individual learners. Figure 5 As shown. Figure 5 It can be seen that when the number of individual learners is 60, the prediction model has the lowest RMSE value when LR is 0.7, so LR is taken as 0.7.
[0113] After obtaining the main parameters of the AdaBoost algorithm through the above steps, in order to verify whether the model has an overfitting problem, the RMSE value of the AdaBoost model on the training set and the validation set is obtained as the number of iterations changes, as shown in the figure below: Figure 6 As shown. Figure 6 As can be seen, the errors on the training set and the validation set are very close, which indicates that the model based on Adaboost ensemble learning is not overfitted.
[0114] S2: Based on the time characteristic factors, the correlation between each characteristic factor and the temperature measuring resistance value at the current moment is analyzed by the maximum information coefficient, and the characteristic factors with strong correlation with the temperature measuring resistance value are screened out;
[0115] In the embodiment of the present application, the correlation between each characteristic factor and the temperature measuring resistance value at the current moment is analyzed by the maximum information coefficient, and the characteristic factors strongly correlated with the temperature measuring resistance value are screened out, including:
[0116] When the maximum information coefficient value of each characteristic influencing factor and the corresponding temperature measuring resistance value is larger, the correlation is stronger; when the maximum information coefficient value of each characteristic influencing factor and the corresponding temperature measuring resistance value is smaller, the correlation is weaker;
[0117] The calculation of the maximum information coefficient is expressed as:
[0118] MIC [ x ; y ] = max | X | | Y | < B ( N ) I [ X ; Y ] log 2 (min( | X | , | Y | )) ,
[0119] I [ X ; Y ] ≈ I [ x ; y ] = ∑ X , Y p ( X , Y )log 2 p ( X , Y ) p ( X ) p ( Y ) ,
[0120] in, are the influencing factors of each feature, is the temperature measuring resistance value corresponding to the characteristic influencing factor, Characteristic factors The corresponding value, When the characteristic factor The value is The corresponding temperature measuring resistance value is is a function of the data sample size, .
[0121] It should be noted that since the prediction of the temperature resistance value is a multivariate nonlinear regression problem that studies the correlation between the temperature resistance value and each characteristic influencing factor, this application uses the maximum information coefficient MIC to analyze the correlation between each characteristic factor and the corresponding load value. MIC is a normalized maximum mutual information with a value range of [ 0 , 1 ] .
[0122] It should also be noted that, in view of the fact that the resistance of the temperature measuring resistor is related to factors such as time, weather, day type and historical resistance, in order to more accurately predict the short-term temperature measuring resistor value, a temperature measuring resistor value prediction framework based on AdaBoost ensemble learning is constructed.
[0123] In an optional embodiment, according to expert experience, the closer the historical temperature measuring resistance value is to the current moment, the smaller the fluctuation is. Therefore, the historical temperature measuring resistance value selects the historical temperature measuring resistance value within the previous 3 hours and the temperature measuring resistance value at the current moment of the historical year for analysis. By calculating the MIC value of the historical temperature measuring resistance value in the test set and the corresponding temperature measuring resistance value at the current moment, the correlation result is shown in Table 3:
[0124] Table 3 Correlation between historical temperature measuring resistance values and current temperature measuring resistance values
[0125] ,
[0126] From the calculation results in Table 3, it can be seen that the correlation between the historical temperature resistance value corresponding to the previous 0.5h and the temperature resistance value at the current moment is the largest, with a MIC value of 0.89. The correlation between the temperature resistance value corresponding to the previous 1h and the temperature resistance value at the current moment is 0.76, and the correlation between the temperature resistance value corresponding to the previous 3h and the temperature resistance value at the current moment is the lowest, which is 0.37. The corresponding load values of the historical years also show the same rule. The MIC value gradually decreases over time, which is in line with the change rule that the correlation of the load gradually weakens over time. Considering the impact of the number of characteristic factors on the training time of the prediction model, the historical temperature resistance values with MIC values less than 0.5 are eliminated.
[0127] In order to facilitate the analysis of the day type data, the data of weekdays, weekends and holidays are reasonably quantified, and the data is set to {weekdays, weekends, holidays} = {0, 0.5, 1}. By calculating the MIC value of the temperature value corresponding to the current time in the training set and the day type and the corresponding temperature resistance value, the correlation results are shown in Table 4:
[0128] Table 4 Correlation results
[0129] ,
[0130] From the results in Table 4, it can be seen that the MIC values of day type, temperature and corresponding load value are relatively large, and each factor has a strong correlation with the load, indicating that these characteristic influencing factors have a certain influence on the load. Therefore, it is of certain significance to conduct a study on the prediction of the temperature measuring resistance value under the influence of these factors.
[0131] S3: combining the temperature resistance data of the unit and the characteristic factors strongly related to the temperature resistance, training each individual learner of the temperature resistance prediction framework, and adjusting the sample weights through an iterative process to obtain the final strong learner;
[0132] In the embodiment of the present application, training each individual learner of the temperature measuring resistance value prediction framework and adjusting the sample weights through an iterative process to obtain the final strong learner includes: training T individual learners, when the training When there are individual learners, use the current distribution The training data set is used to train the current individual learner, and the maximum error between the true value of each sample in the training set and the predicted result of the individual learner is calculated as:
[0133] ,
[0134] in, For the Individual learners The prediction result of the temperature resistance value of training data, For the The temperature measuring resistance value of each sample characteristic, is the sample size;
[0135] The relative error value of each sample and the maximum error of the individual learner are calculated based on the true value of each sample and the prediction result of the individual learner. The regression error rate of each individual learner on the training data set; the weight coefficient of the current individual learner is calculated based on the regression error rate , update the sample distribution representation of the training set
[0136] for:
[0137] ,
[0138] ,
[0139] in, is the normalization factor, is the relative error value for each sample, For training Individual learner time The weight of the samples, For training The weight of the first sample in the individual learner, For training Individual learner time The weight of the samples, For training Individual learner time The weight of the samples;
[0140] Specifically, the relative error value of each sample is calculated as:
[0141] ,
[0142] Specifically, calculate The regression error rate of an individual learner on the training data set is expressed as:
[0143] ,
[0144] in, For training Individual learner time The weight of the samples;
[0145] Specifically, according to The regression error rate of each individual learner on the training data set is used to calculate the weight coefficient of the current individual learner:
[0146] ,
[0147] Train all individual learners and calculate the weight coefficients corresponding to each individual learner , construct a linear combination of individual learners and obtain the final strong learner:
[0148] ,
[0149] in, is the median function, is the number of individual learners.
[0150] Specifically, The prediction results of all individual learners are weighted and sorted according to the weight coefficient, and the value in the middle position is taken as the final prediction result. and ; It helps to reduce the impact of extreme values and make the prediction more robust.
[0151] S4: Predict the temperature measuring resistance value according to the strong learner and obtain the prediction result.
[0152] The above is a schematic scheme of a short-term temperature measuring resistor value prediction method based on AdaBoost ensemble learning in this embodiment. It should be noted that the technical scheme of the short-term temperature measuring resistor value prediction system based on AdaBoost ensemble learning and the technical scheme of the short-term temperature measuring resistor value prediction method based on AdaBoost ensemble learning belong to the same concept. The details of the technical scheme of the short-term temperature measuring resistor value prediction system based on AdaBoost ensemble learning in this embodiment that are not described in detail can all be referred to the description of the technical scheme of the short-term temperature measuring resistor value prediction method based on AdaBoost ensemble learning.
[0153] In this embodiment, a short-term temperature measuring resistance value prediction system based on AdaBoost ensemble learning includes:
[0154] The model building module is used to obtain the historical temperature resistance value data of the unit and build a temperature resistance value prediction framework based on AdaBoost ensemble learning based on the historical temperature resistance value data of the unit;
[0155] The feature screening module is used to analyze the correlation between each feature factor and the temperature measuring resistance value at the current moment through the maximum information coefficient based on the time feature factor, and screen out the feature factors that are strongly correlated with the temperature measuring resistance value;
[0156] The learning module is used to combine the temperature resistance value data of the unit and the characteristic factors strongly related to the temperature resistance value, train the individual learners of the temperature resistance value prediction framework, and adjust the sample weights through an iterative process to obtain the final strong learner;
[0157] The prediction module is used to predict the temperature measuring resistance value according to the strong learner and obtain the prediction result.
[0158] This embodiment also provides an electronic device, which is applicable to a method for predicting a short-term temperature measuring resistance value based on AdaBoost ensemble learning, including:
[0159] A memory and a processor; the memory is used to store computer executable instructions, and the processor is used to execute computer executable instructions to implement a short-term temperature measuring resistance value prediction method based on AdaBoost ensemble learning as proposed in the above embodiment.
[0160] This embodiment also provides a storage medium on which a computer program is stored. When the program is executed by a processor, a short-term temperature measuring resistance value prediction method based on AdaBoost ensemble learning as proposed in the above embodiment is implemented.
[0161] The storage medium proposed in this embodiment and the method for implementing a short-term temperature measuring resistance value prediction method based on AdaBoost ensemble learning proposed in the above embodiment belong to the same inventive concept. The technical details not described in detail in this embodiment can be referred to the above embodiment, and this embodiment has the same beneficial effects as the above embodiment.
[0162] Through the above description of the implementation methods, the technicians in the relevant field can clearly understand that the present invention can be implemented by means of software and necessary general hardware, and of course can also be implemented by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present invention is essentially or the part that contributes to the prior art can be embodied in the form of a software product, and the computer software product can be stored in a computer-readable storage medium, such as a computer's floppy disk, read-only memory (ReadOnly, Memory, ROM), random access memory (RandomAccess Memory, RAM), flash memory (FLASH), hard disk or optical disk, etc., including a number of instructions for a computer device (which can be a personal computer, server, or network device, etc.) to perform the methods of various embodiments of the present invention.
[0163] Example 2, referring to Table 5, is an embodiment of the present invention. This embodiment is different from the first embodiment in that, through comparative experiments, representative monthly load data of different seasons are selected to verify the beneficial effects of the prediction model of the present invention.
[0164] The K-nearest neighbor algorithm KNN, classification and regression tree CART decision tree, BP neural network and support vector machine SVM are compared and analyzed with the AdaBoost ensemble learning algorithm. In order to avoid the influence of accidental factors and improve the prediction accuracy, the training data set used by all the comparison algorithms is the same. The prediction effect of each model is compared by calculating the general evaluation indicators MAPE and RMSE. The comparison of the prediction results of each individual learning model with the results of the method of the present invention is shown in Table 5:
[0165] Table 5 Comparison of prediction results of different models
[0166] ,
[0167] It can be seen from Table 5 that the prediction error of the CART decision tree algorithm is smaller than that of the other three single model algorithms, and the results are more accurate, which further reflects the rationality of selecting the CART decision tree as an individual learner. The MAPE values of each typical month of the load forecasting model based on the AdaBoost algorithm are lower than the MAPE values of other load forecasting models based on a single algorithm, and the RMSE values of each typical month based on the AdaBoost model are also significantly lower than those of other single models. Compared with the prediction methods of the other four single models, the accuracy of the prediction method of the present application is higher. The method of the present application can meet the prediction requirements of nonlinear systems such as temperature measuring resistors, which reflects the superiority of the temperature measuring resistor value prediction method of the present application.
[0168] 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 preferred embodiments, those skilled in the art should understand that the technical solutions of the present invention may be modified or replaced by equivalents without departing from the spirit and scope of the technical solutions of the present invention, which should all be included in the scope of the claims of the present invention.
Claims
1. A short-term temperature measuring resistance value prediction method based on AdaBoost ensemble learning, characterized in that: include: Acquire historical temperature measurement resistance value data of the unit, and construct a temperature measurement resistance value prediction framework based on AdaBoost ensemble learning based on the historical temperature measurement resistance value data of the unit; Determining the number of individual learners of the optimal type and the learning rate; The effect of the number of individual learners on the root mean square error under different learning rates was tested on the validation set. If the number of individual learners of the optimal type reaches a first value and the root mean square error value tends to a stable state, the first value is determined to be the optimal number of individual learners; When the number of individual learners of the optimal type reaches a first value, the learning rate corresponding to the lowest root mean square error value of the individual learner is selected as the optimal learning rate of the temperature resistance prediction framework; When the number of learning increases, the learning time will also increase, and the learning efficiency of the optimal type of individual learner will decrease; when the number of individual learners is 60, the time required for model training is proportional to the number of individual learners, and when the learning rate of this number of individual learners is 0.7, the prediction performance of the temperature resistance prediction framework is optimal; Based on the time characteristic factors, the correlation between each characteristic factor and the temperature measuring resistance value at the current moment is analyzed through the maximum information coefficient, and the characteristic factors with strong correlation with the temperature measuring resistance value are screened out; Combined with the temperature resistance value data of the unit and the characteristic factors strongly correlated with the temperature resistance value, each individual learner of the temperature resistance value prediction framework is trained, and the sample weights are adjusted through an iterative process to obtain a final strong learner; The temperature measuring resistor value is predicted according to the strong learner and a prediction result is obtained.
2. The short-term temperature measuring resistance value prediction method based on AdaBoost ensemble learning as claimed in claim 1, characterized in that: The AdaBoost-based temperature resistance prediction framework includes: a number of individual learners; Dividing the acquired historical unit temperature resistance value data into a temperature resistance prediction training sample set, a validation set and a test set according to the time period, and inputting the training sample data into an initial individual learner after initializing the weight distribution and training the learner; Calculate the sample deviation and the regression error rate of the individual learner, update the sample weight distribution of the training set and calculate the weight coefficient of the initial individual learner; According to the individual learners with calculated weight coefficients, a linear combination of individual learners is constructed to obtain a strong learner, and a temperature measuring resistor value prediction framework based on AdaBoost ensemble learning is constructed.
3. The short-term temperature measuring resistance value prediction method based on AdaBoost ensemble learning as claimed in claim 2, characterized in that: Also includes: Optimizing main parameters of the individual learners to determine the type of the individual learners, wherein the main parameters include mean absolute percentage error, root mean square error value, and training time; Training the individual learners, wherein the input features of the individual learners are year, month, day, hour, historical temperature resistance value, temperature value corresponding to the moment and day type, and the output features are corresponding temperature resistance prediction values; When the main parameters of any individual learner prediction model are less than the preset threshold, the individual learner is selected as the optimal learner type of the temperature resistance prediction framework.
4. The short-term temperature measuring resistance value prediction method based on AdaBoost ensemble learning as claimed in claim 3, characterized in that: Also includes: Given a training data set: {(x1,y1),(x2,y2),...(x M ,y M )},in is the sample feature, N is the number of features, i=1,2,…,M, M is the sample size, y i is the temperature measuring resistance value of the i-th sample feature; Traverse all input features in turn, and use the selected feature j and its corresponding value s to divide the training sample into two sub-regions R 1(j,s) ={x|x (j) ≤s} and R 2(j,s) ={x|x (j) >s}, to find the optimal j and s; The loss function is established according to the square error minimization criterion, and the functional expression is: Wherein, c1 is the mean load value in the first sub-area, and c2 is the mean load value in the second sub-area; Select the feature variables and their corresponding values that minimize the loss function, and use them as the splitting features and splitting points of the root node of the optimal type of individual learner; Determine the segmentation features and segmentation points of each internal node of the optimal type of individual learner in the two sub-areas until only one data sample is left in the data set, and obtain the predicted value of the temperature measuring resistance corresponding to a set of characteristic values of the output temperature measuring resistance value of the final divided area.
5. The short-term temperature measuring resistance value prediction method based on AdaBoost ensemble learning as claimed in claim 4, characterized in that: The correlation between each characteristic factor and the current temperature resistance value is analyzed by the maximum information coefficient, and the characteristic factors strongly correlated with the temperature resistance value are screened out, including: When the maximum information coefficient value of each characteristic influencing factor and the corresponding temperature measuring resistance value is larger, the correlation is stronger; when the maximum information coefficient value of each characteristic influencing factor and the corresponding temperature measuring resistance value is smaller, the correlation is weaker; The calculation of the maximum information coefficient is expressed as: Among them, x is each characteristic influencing factor, y is the temperature measuring resistance value corresponding to the characteristic influencing factor, X is the corresponding value of characteristic factor x, Y is the temperature measuring resistance value corresponding to the characteristic factor x when its value is X, B(N) is a function of the data sample size, and B(N)=N 0.6 .
6. The short-term temperature measuring resistance value prediction method based on AdaBoost ensemble learning as claimed in claim 5, characterized in that: The individual learners of the temperature resistance value prediction framework are trained, and the sample weights are adjusted through an iterative process to obtain the final strong learners including: Train T individual learners. When training the tth individual learner, use the current distribution L t The training data set is used to train the current individual learner, and the maximum error between the true value of each sample in the training set and the predicted result of the individual learner is calculated as: F t =max∣y i -h t (x i )∣ Among them, h t (x i ) is the predicted result of the temperature resistance value of the ith training data of the tth individual learner, y i is the temperature measuring resistance value of the i-th sample feature, and M is the sample capacity; The relative error value of each sample and the regression error rate of the tth individual learner on the training data set are calculated based on the true value of each sample and the prediction result of the individual learner and its maximum error; the weight coefficient α of the current individual learner is calculated based on the regression error rate t , the sample distribution of the updated training set is expressed as: L t+1 =(w t+1,1 ,...,w t+1,i ,...,w t+1,M ) Among them, Z t is the normalization factor, e ti is the relative error value for each sample, is the weight of the i-th sample when training the t-th individual learner, W t+1,1 is the weight of the first sample when training the t+1th individual learner, W t+1,i is the weight of the i-th sample when training the t+1-th individual learner, W t+1,M is the weight of the Mth sample when training the t+1th individual learner; Train all individual learners and calculate the weight coefficient α corresponding to each individual learner t , construct a linear combination of individual learners and obtain the final strong learner: Among them, g(x) is the median function and T is the number of individual learners.
7. A short-term temperature resistance value prediction system based on AdaBoost ensemble learning, characterized in that: include: A model building module is used to obtain historical temperature measurement resistance value data of the unit, and build a temperature measurement resistance value prediction framework based on AdaBoost ensemble learning based on the historical temperature measurement resistance value data of the unit; The feature screening module is used to analyze the correlation between each feature factor and the temperature measuring resistance value at the current moment based on the time feature factor through the maximum information coefficient, and screen out the feature factors that are strongly correlated with the temperature measuring resistance value; A learning module, used to train individual learners of the temperature measuring resistance value prediction framework by combining the temperature measuring resistance value data of the unit and the characteristic factors strongly correlated with the temperature measuring resistance value, and to adjust the sample weights through an iterative process to obtain a final strong learner; The prediction module is used to predict the temperature measuring resistance value according to the strong learner and obtain the prediction result.
8. An electronic device comprising: Memory and processor; The memory is used to store computer executable instructions, and the processor is used to execute the computer executable instructions. When the computer executable instructions are executed by the processor, the steps of a short-term temperature measuring resistance value prediction method based on AdaBoost ensemble learning as described in any one of claims 1 to 6 are implemented.
9. A computer-readable storage medium storing computer-executable instructions, which, when executed by a processor, implement the steps of a short-term temperature measuring resistance value prediction method based on AdaBoost ensemble learning as described in any one of claims 1 to 6.
Citation Information
Patent Citations
Blast furnace temperature prediction method, device and equipment and storage medium
CN117172132A