Power industry business index construction method and system based on random forest algorithm

By applying a random forest algorithm in the power industry prosperity index model, integrating multi-dimensional factors and building a prosperous index of leading, consistent and lagging indicators, the shortcomings of the existing technology in nonlinear analysis and multi-dimensional data processing are solved, and a higher accuracy and robust economic situation prediction is achieved.

CN119622338APending Publication Date: 2025-03-14STATE GRID JIBEI ELECTRIC POWER CO LTD TANGSHAN POWER SUPPLY CO +2
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202411726380.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-28
Publication Date
2025-03-14

AI Technical Summary

Technical Problem

The existing methods for building prosperity index in the power industry have obvious shortcomings in nonlinear analysis capabilities, collinear processing of multidimensional data and data preprocessing, which are difficult to meet the current industry's high requirements for economic analysis.

Method used

The random forest algorithm is used to collect historical data of multi-dimensional factors such as macroeconomics, meso-industry and micro-enterprises, and through preprocessing, correlation analysis, feature selection and weight allocation, a prosperity index model of leading, consistent and lagging indicators is constructed.

Benefits of technology

It improves the prediction accuracy and robustness of the economic situation index, provides more accurate and real-time economic situation analysis tools, and meets the needs of industry management and scientific decision-making.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119622338A_ABST
    Figure CN119622338A_ABST
Patent Text Reader

Abstract

The invention discloses a power industry business index construction method and system based on a random forest algorithm, and belongs to the field of economic analysis and prediction of the power industry, and the method comprises the steps: collecting historical data capable of reflecting the economic situation of the power industry; preprocessing the collected industry prosperity index data and constructing a prosperity index full data set; performing correlation analysis on the prosperity index data set, and constructing an independent prosperity index set; after the independent prosperity index set is obtained, according to the time delay relation between each prosperity index and the economic cycle fluctuation, dividing the economic indexes into a preceding index, a consistent index and a lagging index; performing feature selection and weight distribution processing on the index set by using a random forest algorithm according to a classification result of the prosperity indexes; on the basis of the processed index set, respectively constructing prosperity indexes of a leading index, a consistent index and a lagging index through synthesis indexes; and according to the power industry prosperity index group data, outputting advanced, consistent and lagged synthesis indexes.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the field of economic analysis and forecasting of the electric power industry, and specifically relates to a method and system for constructing a prosperity index model for the electric power industry based on a random forest algorithm. Background Art

[0002] As the pillar of the national economy, the power industry plays a vital role in macroeconomic stability, sustainable development of the industry and sound operation of enterprises. In recent years, the global economic fluctuations have intensified, and the energy structure has accelerated transformation, making the prosperity of the power industry more complex and changeable. In order to help government regulators and industry practitioners more accurately grasp and predict the economic trends of the power industry, the prosperity index has gradually become a key analytical tool.

[0003] The prosperity index can not only reflect the overall operating status and cyclical fluctuations of the power industry, but also provide valuable data support for market participants and policymakers. With the help of the prosperity index, decision makers can have a deeper understanding of industry development trends, predict future trends, and optimize resource allocation and business strategies accordingly. Therefore, developing a prosperity index model suitable for the power industry and analyzing the multidimensional factors affecting the industry in a scientific and systematic way is of great significance for improving industry management efficiency and stabilizing economic operations.

[0004] Based on the above background, the present invention aims to apply the random forest algorithm in machine learning to construct a power industry prosperity index model that comprehensively considers macroeconomic, meso-industry and micro-enterprise factors. The model is committed to improving the prediction accuracy and robustness of the prosperity index, providing the power industry with a more accurate and real-time economic situation analysis tool to meet the urgent needs of industry management and scientific decision-making.

[0005] In the field of constructing the prosperity index of the power industry, existing research and practice mainly rely on traditional statistical analysis and time series models. These methods provide a certain basis for predicting the economic status of the power industry by mining the trends and cyclical characteristics in historical data. However, in the face of the increasingly complex and changing economic environment of the power industry, these traditional methods are unable to cope with complex nonlinear relationships and multidimensional factors, and it is difficult to meet the current industry's high requirements for economic analysis.

[0006] Traditional statistical models, such as regression analysis, moving average and ARIMA, are mostly based on linear assumptions and are not adaptable to the combined impact of multidimensional factors such as macroeconomics, meso-industries and micro-enterprises, resulting in limited prediction accuracy. In addition, current time series models lack effective means to deal with multicollinearity problems, especially in power industry data. Due to the large number of highly correlated factors, the instability of the model increases significantly, which in turn affects the accuracy of the prediction.

[0007] Therefore, the existing methods for constructing the prosperity index of the power industry have obvious deficiencies in nonlinear analysis capabilities, collinearity processing of multidimensional data, and data preprocessing.

[0008] Prior art document 1 (CN114049160A) discloses a method for constructing a power demand prosperity index based on power big data, including the following steps: 1. Collecting monthly electricity data and monthly average temperature data; 2. Screening monthly electricity data and removing noise data; 3. Converting the monthly electricity data after removing noise data into a standard synthetic growth rate; 4. Using principal component analysis to select effective standard synthetic growth rate data as independent variables of the prediction model, and inputting them into the pre-built prediction model, the output of the prediction model is the optimal predicted electricity growth rate; 5. Dynamic temperature correction: Establishing a nonlinear model of monthly average temperature data and standard synthetic growth rate, and correcting the optimal predicted electricity growth rate according to the average temperature data of the next three periods; 6. Verifying the predicted electricity growth rate results; 7. Compiling a synthetic index; 8. Outputting the power demand prosperity index. Its disadvantage is that the data source in prior art document 1 is relatively single, mainly relying on monthly electricity data and monthly average temperature data, and other factors that may affect electricity demand (such as macroeconomic conditions, industry development, etc.) are not considered, which may lead to one-sidedness of the prediction results. Although the prediction model mainly adopts the principal component analysis method for data processing, it may be limited by the diversity and complexity of the data when constructing the prediction model, resulting in limited prediction accuracy and adaptability of the model; in addition, the methods in the existing technology are relatively fixed, and their adaptability to changes in electricity demand in different regions, different time periods or different economic environments may be insufficient. Summary of the invention

[0009] This paper aims to construct a prosperity index model for the power industry based on machine learning to address the shortcomings of traditional models in nonlinear processing, multidimensional factor integration and data robustness. By using the random forest algorithm, this paper proposes an analysis method that can integrate multidimensional factors such as macroeconomics, meso-industries and micro-enterprises, thereby improving the accuracy and reliability of prosperity index prediction. This model is not only suitable for real-time tracking of the economic situation of the power industry, but also can identify economic fluctuation trends in advance, providing scientific and comprehensive data support for industry managers and decision makers.

[0010] The present invention adopts the following technical solution.

[0011] The first aspect of the present invention provides a method for constructing a power industry prosperity index based on a random forest algorithm, comprising the following steps:

[0012] Collect historical data that can reflect the economic situation of the power industry, including macroeconomic factors, meso-industry factors and micro-enterprise factors, each of which contains multiple indicators;

[0013] Preprocess the collected industry prosperity index data and construct a full data set of prosperity indicators;

[0014] Conduct correlation analysis on the business index data set, screen out mutually independent business indexes and construct an independent business index set;

[0015] After obtaining the independent economic indicators set, the economic indicators are divided into leading indicators, coincident indicators and lagging indicators according to the time lag relationship between each economic indicator and economic cycle fluctuations;

[0016] According to the classification results of the economic indicators, the random forest algorithm is used to perform feature selection and weight allocation on the indicator set;

[0017] Based on the processed indicator set, the prosperity index of leading, coincident and lagging indicators is constructed through the composite index;

[0018] Based on the constructed prosperity index model, the leading, coincident and lagging composite indexes are output according to the prosperity index group data of the power industry.

[0019] Optionally, each of the factors includes multiple indicators, specifically:

[0020] Macroeconomic factors include GDP, inflation, unemployment, and interest rate indicators;

[0021] Meso-industry factors include electricity demand growth rate, power generation and electricity elasticity coefficient indicators;

[0022] Micro-enterprise factors include operating income, profit margin, on-grid electricity price and transmission and distribution price indicators.

[0023] Optionally, the preprocessing of the collected industry prosperity index data and constructing a full data set of prosperity index data is specifically as follows:

[0024] Use Z-score to perform outlier detection on each indicator. Suppose the historical data sequence of a certain indicator is X i ,i=1,2,...,n, where n is the number of indicators, the Z-score calculation formula for each data point is:

[0025]

[0026] Among them, μ i For the data sequence X i The mean value, σ i For the data sequence X i The standard deviation of

[0027] The Z-score threshold is set to 3. When the absolute value of the Z-score of a data point exceeds 3, the point is considered to be an abnormal data point. When the absolute value of the Z-score of a data point does not exceed 3, the point is considered to be a non-abnormal data point.

[0028] For the detected abnormal data points, Newton interpolation method is used to fill them. Newton interpolation method estimates the value of missing or abnormal points by constructing interpolation polynomials of known data points. The constructed n-order interpolation polynomial can be expressed as:

[0029]

[0030] Among them, f[x0,x1,…,x k ] represents the difference quotient between adjacent points;

[0031] The repaired data points and non-abnormal data points are combined into a prosperity index data set.

[0032] Optionally, the performing correlation analysis on the prosperity index data set, screening out mutually independent prosperity indexes and constructing an independent prosperity index set specifically comprises:

[0033] Perform rank conversion on all indicators, sort the observed values ​​of each indicator by size and convert them into rank values;

[0034] The Spearman rank correlation coefficient is used to evaluate the correlation between indicators. i and X j They are two indicators respectively, and the level values ​​of the kth data point are and The calculation formula of Spearman's rank correlation coefficient is:

[0035]

[0036] in, n is the number of data points, and the Spearman rank correlation coefficient ranges from [-1,1], where 1 indicates a perfect positive correlation, -1 indicates a perfect negative correlation, and 0 indicates no correlation;

[0037] The Spearman rank correlation coefficient between two indicators in the entire indicator set is calculated. Indicators with a Spearman rank correlation coefficient not greater than 0.6 can be directly used to construct an independent prosperity indicator set; for indicators with a Spearman rank correlation coefficient greater than 0.6, the principal component analysis method is used to synthesize them before using them to construct an independent prosperity indicator set.

[0038] Optionally, the economic indicators are divided into leading indicators, coincident indicators and lagging indicators according to the time lag relationship between each prosperity indicator and the economic cycle fluctuation, specifically:

[0039] Select a benchmark economic cycle sequence Y = {y1,y2,…,y m As a reference, for each prosperity index data sequence X, the dynamic time warping algorithm is used to calculate its alignment distance with the benchmark sequence Y to find the optimal alignment path between the two and minimize the total distance between them. The optimal path calculation formula of the dynamic time warping algorithm is:

[0040]

[0041] in, Indicates the alignment point (i k ,j k ) The distance between X and Y on the path length K satisfies the time order constraint;

[0042] By analyzing the dynamic time warping distance d between each indicator series and the benchmark series X,Y , further determine its relative position in the economic cycle and classify it. If d X,Y If d is less than a negative threshold, the indicator is classified as a leading indicator, indicating that the indicator X has a tendency to change ahead of the benchmark sequence. X,Y ≈0, then the index X is classified as a consistent index; if d X,Y If it is greater than a certain positive threshold, the indicator X is considered a lagging indicator.

[0043] Optionally, the use of the random forest algorithm to perform feature selection and weight allocation processing on the indicator set is specifically as follows:

[0044] Let X ij (t) represents the observed value of the ith indicator in the jth indicator group at time t, where j = 1, 2, 3 represent the leading, coincident and lagging indicator groups respectively, and i = 1, 2, ..., k j , k j is the number of indicators in the jth group;

[0045] The observed values ​​of all indicators constitute the input feature vector X = {X 11 ,X 12 ,...,X ij ,...,X kj} As a training set, the model assigns feature weights through training of input X;

[0046] In the model building process, the random forest algorithm constructs multiple decision trees T1, T2, ..., T N , and the final model f(X) is obtained by aggregating the prediction results of each decision tree, which is defined as follows:

[0047]

[0048] Where N is the number of decision trees;

[0049] Feature X ij Importance Rating I ij It can be calculated by averaging the contribution of all nodes in the tree when they are split:

[0050]

[0051] Among them, ΔG(T n ,X ij ) represents feature X ij Contribution to the reduction of impurity in the node splitting of the nth tree;

[0052] After training, the model generates each feature X ij Importance Rating I ij , reflecting the relative importance of the feature to the model prediction, and scoring the importance of each feature group I ij Normalize and get the normalized weight w ij :

[0053]

[0054] Among them, k j represents the number of features in the jth feature group. After normalization, the weight w ij satisfy

[0055] Optionally, the prosperity indexes of leading, coincident and lagging indicators are constructed based on the processed indicator set through synthetic indexes as follows:

[0056] For each indicator X ij (t) Calculate the symmetrical change rate C between adjacent times t and t-1 ij (t), the calculation formula of the symmetric change rate is:

[0057]

[0058] If some indicator X ij If (t) contains zero or negative values, the rate of change is calculated using first-order differences:

[0059] C ij (t) = X ij (t)-X ij (t-1)

[0060] All symmetric change rates are normalized, and the normalized results are expressed as:

[0061]

[0062] Among them, μ ij is the change rate C of the i-th index of the j-th group ij The mean of (t), σ ij is the standard deviation of the rate of change;

[0063] Based on the standardized rate of change, the weight w is obtained using the random forest algorithm ij For each indicator S ij (t) is weighted to obtain the weighted average change rate R of the jth group j (t):

[0064]

[0065] Calculate the exponential normalization factor F j , the formula is:

[0066]

[0067] Where n is the number of samples and the normalization factor F is j The absolute value of the average change rate of each group is obtained by comparing the average change rate of the consistent index group R2(t); using the exponential normalization factor F j Weighted average rate of change R j (t) is standardized to obtain the standardized average change rate V j (t):

[0068]

[0069] Assume that the initial composite index I j (1) = 100, and then by normalizing the average rate of change V j (t) Calculate the subsequent composite index I j (t):

[0070]

[0071] Finally, calculate the final composite index CI j (t), the formula is:

[0072]

[0073] in, is the average value for the selected base year.

[0074] The second aspect of the present invention provides a system for constructing a power industry prosperity index based on a random forest algorithm, which is used to execute the method for constructing a power industry prosperity index based on a random forest algorithm described in the first aspect of the present invention. The system comprises:

[0075] Data collection module, data preprocessing module, correlation analysis module, indicator group classification module, feature weight allocation module, composite index construction module and prosperity index application module;

[0076] The data collection module is used to collect historical data that can reflect the economic situation of the power industry; the data preprocessing module is used to preprocess the collected industry prosperity index data and construct a prosperity index data set; the correlation analysis module is used to perform correlation analysis on the prosperity index data set to screen out independent prosperity indicators and construct an independent prosperity index set; the indicator group classification module divides the economic indicators into leading indicators, consistent indicators and lagging indicators according to the time lag relationship between each prosperity indicator and the economic cycle fluctuation; the feature weight allocation module uses the random forest algorithm to perform feature selection and weight allocation processing on the indicator set based on the classification results of the prosperity indicators; the composite index construction module constructs the prosperity index of the leading, consistent and lagging indicators respectively through the composite index based on the processed indicator set; the prosperity index application module outputs the leading, consistent and lagging composite index according to the prosperity indicator group data of the power industry.

[0077] The third aspect of the present invention provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the computer program is loaded into the processor, the method for constructing a power industry prosperity index based on a random forest algorithm according to the first aspect of the present invention is implemented.

[0078] A fourth aspect of the present invention provides a computer-readable storage medium, which stores a computer program. When the computer program is executed by a processor, it implements a method for constructing a power industry prosperity index based on a random forest algorithm according to the first aspect of the present invention.

[0079] Compared with the prior art, the beneficial effects of the present invention include at least:

[0080] 1. Improve prediction accuracy and robustness: The random forest algorithm in machine learning is applied to maintain stable prediction performance when processing large amounts of complex data and facing new or abnormal data, thus enhancing the robustness of the prosperity index;

[0081] 2. Provide comprehensive economic situation analysis tools: Not only electricity data is taken into consideration, but also data from multiple dimensions such as macroeconomics, meso-industries and micro-enterprises are widely collected. At the same time, a set of independent prosperity indicators is constructed to avoid the interference of redundant information on the prediction results.

[0082] 3. Demonstrates strong practicality and flexibility: Through the synthetic index method, the prosperity indexes of leading, consistent and lagging indicators are constructed respectively. These indexes can clearly reflect the economic situation at different time points, and provide intuitive and easy-to-understand decision support for industry managers. The forecast results are also strictly verified to ensure the accuracy and reliability of the forecast results. If necessary, the model can also be adjusted and optimized according to new data or changes in the economic situation to maintain the forecast accuracy and adaptability of the model. This technical solution is not only applicable to the power industry, but can also be extended to other industries or fields, providing a powerful tool for a wider range of economic situation analysis. This flexibility and applicability make the present invention very valuable in practical applications. BRIEF DESCRIPTION OF THE DRAWINGS

[0083] Figure 1 is a flow chart of the method of the present invention. DETAILED DESCRIPTION

[0084] In order to make the purpose, technical scheme and advantages of the present invention clearer, the technical scheme of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. The described embodiments are only embodiments of a part of the present invention, not all embodiments. Based on the spirit of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work belong to the protection scope of the present invention.

[0085] In order to solve the problems existing in the prior art, the present invention introduces a random forest algorithm, and constructs a more accurate and robust power industry prosperity index model by integrating multidimensional factors and deeply mining nonlinear relationships.

[0086] To achieve the above objectives, the technical method provided by the present invention is: to construct a power industry prosperity index model based on the random forest algorithm to achieve a more accurate prediction of the industry's economic situation.

[0087] Step S1: Collect historical data that can reflect the economic situation of the power industry, covering the multi-dimensional factors that affect the industry's prosperity, including macroeconomic factors, meso-industry factors and micro-enterprise factors, each of which contains multiple indicators.

[0088] In a further preferred but non-limiting embodiment, the multidimensional factors collected in step S1 specifically include:

[0089] type index Macroeconomic factors GDP, inflation rate, unemployment rate, interest rate, etc. Meso-industry factors Electricity demand growth rate, power generation, electricity elasticity coefficient, etc. Micro-enterprise factors Operating income, profit margin, on-grid electricity price, transmission and distribution price, etc.

[0090] Step S2: Preprocess the industry prosperity index data collected in step S1 and construct a prosperity index data set to ensure the integrity and reliability of the data.

[0091] In a further preferred but non-limiting embodiment, step S2 specifically comprises:

[0092] The Z-score method is used to perform outlier detection on various indicators. Suppose the historical data sequence of a certain indicator is X i ,i=1,2,...,n, where n is the number of indicators, the Z-score calculation formula for each data point is:

[0093]

[0094] Among them, μ i For the data sequence X i The mean value, σ i For the data sequence X i The standard deviation of .

[0095] In this method, the Z-score threshold is set to 3. When the absolute value of the Z-score of a data point exceeds 3, the point is considered to be an abnormal data point. When the absolute value of the Z-score of a data point does not exceed 3, the point is considered to be a non-abnormal data point.

[0096] For the detected abnormal data points, Newton interpolation method is used to fill them. Newton interpolation method estimates the value of missing or abnormal points by constructing interpolation polynomials of known data points. The constructed n-order interpolation polynomial can be expressed as:

[0097]

[0098] Among them, f[x0,x1,…,x k ] represents the difference quotient between adjacent points;

[0099] The repaired data points and non-abnormal data points are combined into a prosperity index data set.

[0100] Step S3: performing correlation analysis on the prosperity index data set obtained in step S2 to screen out mutually independent prosperity indexes and construct an independent prosperity index set.

[0101] In a further preferred but non-limiting embodiment, step S3 specifically comprises:

[0102] Perform rank conversion on all indicators, sort the observed values ​​of each indicator by size and convert them into rank values;

[0103] The Spearman rank correlation coefficient is used to evaluate the correlation between indicators. i and X j They are two indicators respectively, and the level values ​​of the kth data point are and The calculation formula of Spearman's rank correlation coefficient is:

[0104]

[0105] in, n is the number of data points, and the Spearman rank correlation coefficient ranges from [-1,1], where 1 indicates a perfect positive correlation, -1 indicates a perfect negative correlation, and 0 indicates no correlation;

[0106] The Spearman rank correlation coefficient between two or more indicators in the entire indicator set is calculated. Indicators with a Spearman rank correlation coefficient not greater than 0.6 can be directly used to construct an independent prosperity indicator set; for indicators with a Spearman rank correlation coefficient greater than 0.6, the principal component analysis method is used to synthesize them before using them to construct an independent prosperity indicator set.

[0107] Furthermore, for indicators with a Spearman rank correlation coefficient greater than 0.6, it indicates that the correlation between these two or more indicators is too high, and they may provide redundant information in the model. In order to solve the problem of multicollinearity and ensure the robustness and predictive performance of the model, the principal component analysis method is used to synthesize the indicators with high correlation.

[0108] Step S4: After obtaining the independent economic index set in step S3, the economic indicators are divided into leading indicators, coincident indicators and lagging indicators according to the time lag relationship between each economic index and economic cycle fluctuations.

[0109] In a further preferred but non-limiting embodiment, step S4 specifically comprises:

[0110] Select a benchmark economic cycle sequence Y = {y1,y2,…,y m As a reference, for each prosperity index data series X, the dynamic time warping algorithm (DTW) is used to calculate its alignment distance with the benchmark series Y to find the optimal alignment path between the two and minimize the total distance between them. The optimal path calculation formula of the dynamic time warping algorithm is:

[0111]

[0112] in, Indicates the alignment point (i k ,j k ), the distance between X and Y on the path, and the path length K satisfies the time order constraint.

[0113] By analyzing the dynamic time warping distance d between each indicator series and the benchmark series X,Y , further determine its relative position in the economic cycle and classify it. X,YIf d is less than a negative threshold, the indicator is classified as a leading indicator, indicating that the indicator X has a tendency to change ahead of the benchmark sequence. X,Y ≈0, then the index X is classified as a consistent index; if d X,Y If it is greater than a certain positive threshold, the indicator X is considered a lagging indicator.

[0114] The specific threshold setting can be adjusted according to actual conditions and experience. For example, the time lag relationship between the industrial value-added growth rate (prosperity indicator) and the GDP growth rate (benchmark sequence) of a certain region can be calculated, the GDP growth rate and industrial value-added growth rate data of the region for the past 10 years can be collected, and the DTW algorithm can be used to calculate the alignment distance between the industrial value-added growth rate and the GDP growth rate. Considering the historical volatility characteristics of the indicator, the mean and standard deviation of the alignment distance for the past 10 years are selected to set the threshold. The mean minus a certain multiple of the standard deviation is used as the negative threshold, and the mean plus a certain multiple of the standard deviation is used as the positive threshold.

[0115] Step S5: Based on the classification results of the prosperity indicators in S4, the random forest algorithm is used to perform feature selection and weight allocation processing on the indicator set.

[0116] In a further preferred but non-limiting embodiment, step S5 specifically includes:

[0117] Let X ij (t) represents the observed value of the ith indicator in the jth indicator group at time t, where j = 1, 2, 3 represent the leading, coincident and lagging indicator groups respectively, and i = 1, 2, ..., k j , k j is the number of indicators in the jth group;

[0118] The observed values ​​of all indicators constitute the input feature vector X = {X 11 ,X 12 ,...,X ij ,...,X kj}, the model assigns feature weights through training of input X;

[0119] In the model building process, the random forest algorithm constructs multiple decision trees T1, T2, ..., T N , and the final model f(X) is obtained by aggregating the prediction results of each decision tree, which is defined as follows:

[0120]

[0121] Where N is the number of decision trees.

[0122] During model training, each decision tree will select the best feature when splitting a node. The "contribution" of the split can be calculated using metrics such as "Gini impurity" or "information gain" to quantify the impact of each feature on the prediction result. ij Importance Rating I ij It can be calculated by averaging the contribution of all nodes in the tree when they are split:

[0123]

[0124] Among them, ΔG(T n ,X ij ) represents feature X ij Contribution to the reduction of impurity in the node split of the nth tree.

[0125] After training, the model generates each feature X ij Importance Rating I ij , reflecting the relative importance of the feature to the model prediction. In order to ensure that the sum of the weights of each group of features is 1, the importance score I in each feature group is ij Normalize and get the normalized weight w ij :

[0126]

[0127] Among them, k j represents the number of features in the jth feature group. After normalization, the weight w ij satisfy The relative importance of each group of features is reasonably reflected in the model.

[0128] Step S6: Based on the indicator set processed in step S5, the prosperity indexes of leading, coincident and lagging indicators are respectively constructed through the composite index.

[0129] In a further preferred but non-limiting embodiment, step S6 specifically comprises:

[0130] First, for each indicator X ij (t) Calculate the symmetrical change rate C between adjacent times t and t-1 ij (t) to ensure that the composite index can accurately reflect the fluctuations of each indicator. The calculation formula for the symmetrical change rate is:

[0131]

[0132] If some indicator X ij If (t) contains zero or negative values, the rate of change is calculated using first-order differences:

[0133] C ij(t) = X ij (t)-X ij (t-1)

[0134] Since the fluctuation range and dimension of each indicator may be different, in order to avoid the dominant effect of individual indicators with large fluctuations on the composite index, it is necessary to standardize all symmetrical change rates. The standardized result is expressed as:

[0135]

[0136] Among them, μ ij is the change rate C of the i-th index of the j-th group ij The mean of (t), σ ij is the standard deviation of the rate of change.

[0137] Based on the standardized rate of change, the weight w is obtained using the random forest algorithm ij For each indicator S ij (t) is weighted to obtain the weighted average change rate R of the jth group j (t):

[0138]

[0139] To ensure that the average change rates of different indicator groups are comparable, the index normalization factor F is calculated. j , the formula is:

[0140]

[0141] Where n is the number of samples. Normalization factor F j The absolute value of the average change rate of each group is obtained by comparing it with the average change rate of the consistent index group R2(t). Then, the exponential normalization factor F is used j Weighted average rate of change R j (t) is standardized to obtain the standardized average change rate V j (t):

[0142]

[0143] Assume that the initial composite index I j (1) = 100, and then by normalizing the average rate of change V j (t) Calculate the subsequent composite index I j (t):

[0144]

[0145] Finally, the final composite index CI is calculated j (t), the formula is:

[0146]

[0147] in, is the average value for the selected base year.

[0148] The model combines the random forest algorithm and establishes a high-precision forecasting system for the power industry prosperity index by analyzing macroeconomic factors, meso-industry factors and micro-enterprise factors. This technical method is mainly used for forecasting and analyzing the economic situation of the power industry, and is suitable for government regulatory departments, power companies and related industry organizations to assist decision-making and predict industry economic trends.

[0149] Step S7: Based on the prosperity index model constructed in step S6, the leading, coincident and lagging composite indexes are output according to the prosperity index group data of the power industry. The leading composite index usually changes before the economic turning point, indicating the upcoming prosperity or recession; the coincident composite index reflects the current economic situation; and the lagging composite index helps to confirm the stability of the economic trend.

[0150] In Example 2, the present invention provides a system for constructing a power industry prosperity index model based on a random forest algorithm, which is used to execute a method for constructing a power industry prosperity index model based on a random forest algorithm described in Example 1 of the present invention, and the system includes:

[0151] Data collection module, data preprocessing module, correlation analysis module, indicator group classification module, feature weight allocation module, composite index construction module and prosperity index application module;

[0152] The data collection module is used to collect historical data that can reflect the economic situation of the power industry; the data preprocessing module is used to preprocess the collected industry prosperity index data and construct a prosperity index data set; the correlation analysis module is used to perform correlation analysis on the prosperity index data set to screen out independent prosperity indicators and construct an independent prosperity index set; the indicator group classification module divides the economic indicators into leading indicators, consistent indicators and lagging indicators according to the time lag relationship between each prosperity indicator and the economic cycle fluctuation; the feature weight allocation module uses the random forest algorithm to perform feature selection and weight allocation processing on the indicator set based on the classification results of the prosperity indicators; the composite index construction module constructs the prosperity index of the leading, consistent and lagging indicators respectively through the composite index based on the processed indicator set; the prosperity index application module outputs the leading, consistent and lagging composite index according to the prosperity indicator group data of the power industry.

[0153] Embodiment 3 of the present invention provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the computer program is loaded into the processor, the method for constructing a power industry prosperity index model based on a random forest algorithm according to Embodiment 1 is implemented.

[0154] Embodiment 4 of the present invention provides a computer-readable storage medium, which stores a computer program. When the computer program is executed by a processor, it implements a method for constructing a power industry prosperity index model based on a random forest algorithm according to Embodiment 1.

[0155] The present invention provides a method that reflects a high degree of comprehensiveness and professionalism in data collection and processing. First, in order to ensure the accuracy and comprehensiveness of the forecast results, the present invention widely collects various types of historical data that can reflect the economic situation of the power industry. These data not only cover information at the macroeconomic level, but also include detailed data of meso-industries and micro-enterprises. This diverse source of data provides a solid foundation for subsequent model construction. Secondly, in the data preprocessing stage, the present invention adopts strict data cleaning, missing value processing and outlier detection steps to ensure that the data input into the model is complete, reliable and of high quality. Finally, through correlation analysis and indicator screening, the present invention further screens out independent prosperity indicators and constructs an independent prosperity indicator set, which not only avoids the interference of redundant information on the forecast results, but also improves the forecasting efficiency and accuracy of the model.

[0156] The present invention also selects a model construction method that makes full use of machine learning. The random forest algorithm, as an integrated learning method, can process a large amount of data, automatically select important features, and give different weights in the feature selection process, thereby improving the prediction accuracy of the model. In addition, according to the time lag relationship between each prosperity indicator and economic cycle fluctuations, the prosperity indicators are divided into leading indicators, consistent indicators and lagging indicators. This classification not only provides a basis for the analysis of economic situations at different time points, but also enables the model to more accurately capture the fluctuations of the economic cycle. In terms of model optimization, by adjusting the hyperparameters of the random forest algorithm, such as the number of trees, the maximum depth, etc., and using methods such as cross-validation, the model is deeply optimized, thereby improving the generalization ability and prediction performance of the model.

[0157] The actual technical effects achieved by the invention include at least: constructing an overall prosperity index, and dividing the prosperity index into leading indicators, coincident indicators and lagging indicators according to the time lag relationship of economic indicators, which can issue early warnings before the economic turning point, provide more detailed economic situation analysis tools, and provide valuable forward-looking information for industry managers. At the same time, through diversified data sources and advanced machine learning algorithms, the forecast accuracy and robustness of the prosperity index are significantly improved, providing the power industry with a more accurate and real-time economic situation analysis tool, which is helpful for industry management and scientific decision-making.

[0158] The present disclosure may be a system, a method and / or a computer program product. The computer program product may include a computer-readable storage medium carrying computer-readable program instructions for causing a processor to implement various aspects of the present disclosure.

[0159] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention rather than to limit it. Although the present invention has been described in detail with reference to the above embodiments, ordinary technicians in the relevant field should understand that the specific implementation methods of the present invention can still be modified or replaced by equivalents, and any modifications or equivalent replacements that do not depart from the spirit and scope of the present invention should be covered within the scope of protection of the claims of the present invention.

Claims

1. A method for constructing a power industry prosperity index based on a random forest algorithm, characterized in that: The steps include: Collect historical data that can reflect the economic situation of the power industry, including macroeconomic factors, meso-industry factors and micro-enterprise factors, each of which contains multiple indicators; Preprocess the collected industry prosperity index data and construct a full data set of prosperity indicators; Conduct correlation analysis on the business index data set, screen out mutually independent business indexes and construct an independent business index set; After obtaining the independent economic indicators set, the economic indicators are divided into leading indicators, coincident indicators and lagging indicators according to the time lag relationship between each economic indicator and economic cycle fluctuations; According to the classification results of the economic indicators, the random forest algorithm is used to perform feature selection and weight allocation on the indicator set; Based on the processed indicator set, the prosperity index of leading, coincident and lagging indicators is constructed through the composite index; Based on the constructed prosperity index model, the leading, coincident and lagging composite indexes are output according to the prosperity index group data of the power industry.

2. The method for constructing a power industry prosperity index based on a random forest algorithm according to claim 1 is characterized in that: Each of the factors mentioned above includes multiple indicators, specifically: Macroeconomic factors include GDP, inflation, unemployment, and interest rate indicators; Meso-industry factors include electricity demand growth rate, power generation and electricity elasticity coefficient indicators; Micro-enterprise factors include operating income, profit margin, on-grid electricity price and transmission and distribution price indicators.

3. The method for constructing a power industry prosperity index based on a random forest algorithm according to claim 1 is characterized in that: The preprocessing of the collected industry prosperity index data and the construction of the full prosperity index data set are specifically as follows: Use Z-score to perform outlier detection on each indicator. Suppose the historical data sequence of a certain indicator is X i ,i=1,2,...,n, where n is the number of indicators, the Z-score calculation formula for each data point is: Among them, μ i For the data sequence X i The mean value, σ i For the data sequence X i The standard deviation of The Z-score threshold is set to 3. When the absolute value of the Z-score of a data point exceeds 3, the point is considered to be an abnormal data point. When the absolute value of the Z-score of a data point does not exceed 3, the point is considered to be a non-abnormal data point. For the detected abnormal data points, Newton interpolation method is used to fill them. Newton interpolation method estimates the value of missing or abnormal points by constructing interpolation polynomials of known data points. The constructed n-order interpolation polynomial can be expressed as: Among them, f[x0,x1,…,x k ] represents the difference quotient between adjacent points; The repaired data points and non-abnormal data points are combined into a prosperity index data set.

4. The method for constructing a power industry prosperity index based on a random forest algorithm according to claim 1 is characterized in that: The method of performing correlation analysis on the prosperity index data set, screening out mutually independent prosperity indexes and constructing an independent prosperity index set is specifically as follows: Perform rank conversion on all indicators, sort the observed values ​​of each indicator by size and convert them into rank values; The Spearman rank correlation coefficient is used to evaluate the correlation between indicators. i and X j They are two indicators respectively, and the level values ​​of the kth data point are and The calculation formula of Spearman's rank correlation coefficient is: in, n is the number of data points, and the Spearman rank correlation coefficient ranges from [-1,1], where 1 indicates a perfect positive correlation, -1 indicates a perfect negative correlation, and 0 indicates no correlation; The Spearman rank correlation coefficient between two indicators in the entire indicator set is calculated. Indicators with a Spearman rank correlation coefficient not greater than 0.6 can be directly used to construct an independent prosperity indicator set; for indicators with a Spearman rank correlation coefficient greater than 0.6, the principal component analysis method is used to synthesize them before using them to construct an independent prosperity indicator set.

5. The method for constructing a power industry prosperity index based on a random forest algorithm according to claim 1 is characterized in that: According to the time lag relationship between each prosperity indicator and economic cycle fluctuation, the economic indicators are divided into leading indicators, coincident indicators and lagging indicators. Specifically: Select a benchmark economic cycle sequence Y = {y1,y2,…,y m As a reference, for each prosperity index data sequence X, the dynamic time warping algorithm is used to calculate its alignment distance with the benchmark sequence Y to find the optimal alignment path between the two and minimize the total distance between them. The optimal path calculation formula of the dynamic time warping algorithm is: in, Indicates the alignment point (i k ,j k ) The distance between X and Y on the path length K satisfies the time order constraint; By analyzing the dynamic time warping distance d between each indicator series and the benchmark series X,Y , further determine its relative position in the economic cycle and classify it. If d X,Y If d is less than a negative threshold, the indicator is classified as a leading indicator, indicating that the indicator X has a tendency to change ahead of the benchmark sequence. X,Y ≈0, then the index X is classified as a consistent index; if d X,Y If it is greater than a certain positive threshold, the indicator X is considered a lagging indicator.

6. The method for constructing a power industry prosperity index based on a random forest algorithm according to claim 1 is characterized in that: The use of the random forest algorithm to perform feature selection and weight allocation on the indicator set is specifically as follows: Let X ij (t) represents the observed value of the ith indicator in the jth indicator group at time t, where j = 1, 2, 3 represent the leading, coincident and lagging indicator groups respectively, and i = 1, 2, ..., k j , k j is the number of indicators in the jth group; The observed values ​​of all indicators constitute the input feature vector X = {X 11 ,X 12 ,...,X ij ,...,X kj } As a training set, the model assigns feature weights through training of input X; In the model building process, the random forest algorithm constructs multiple decision trees T1, T2, ..., T N , and the final model f(X) is obtained by aggregating the prediction results of each decision tree, which is defined as follows: Where N is the number of decision trees; Feature X ij Importance Rating I ij It can be calculated by averaging the contribution of all nodes in the tree when they are split: Among them, ΔG(T n ,X ij ) represents feature X ij Contribution to the reduction of impurity in the node splitting of the nth tree; After training, the model generates each feature X ij Importance Rating I ij , reflecting the relative importance of the feature to the model prediction, and scoring the importance of each feature group I ij Normalize and get the normalized weight w ij : Among them, k j represents the number of features in the jth feature group. After normalization, the weight w ij satisfy 7. A method for constructing a power industry prosperity index based on a random forest algorithm according to claim 1 or 6, characterized in that: The specific business index of the leading, coincident and lagging indicators constructed based on the processed indicator set is as follows: For each indicator X ij (t) Calculate the symmetrical change rate C between adjacent times t and t-1 ij (t), the calculation formula of the symmetric change rate is: If some indicator X ij If (t) contains zero or negative values, the rate of change is calculated using first-order differences: C ij (t)=X ij (t)-X ij (t-1) All symmetric change rates are normalized, and the normalized results are expressed as: Among them, μ ij is the change rate C of the i-th index of the j-th group ij The mean of (t), σ ij is the standard deviation of the rate of change; Based on the standardized rate of change, the weight w is obtained using the random forest algorithm ij For each indicator S ij (t) is weighted to obtain the weighted average change rate R of the jth group j (t): Calculate the exponential normalization factor F j , the formula is: Where n is the number of samples and the normalization factor F is j The absolute value of the average change rate of each group is obtained by comparing the average change rate of the consistent index group R2(t); using the exponential normalization factor F j Weighted average rate of change R j (t) is standardized to obtain the standardized average change rate V j (t): Assume that the initial composite index I j (1) = 100, and then by normalizing the average rate of change V j (t) Calculate the subsequent composite index I j (t): Finally, calculate the final composite index CI j (t), the formula is: in, is the average value for the selected base year.

8. A system for constructing a power industry prosperity index based on a random forest algorithm, used to execute the method for constructing a power industry prosperity index based on a random forest algorithm according to any one of claims 1 to 7, characterized in that: The system includes: Data collection module, data preprocessing module, correlation analysis module, indicator group classification module, feature weight allocation module, composite index construction module and prosperity index application module; The data collection module is used to collect historical data that can reflect the economic situation of the power industry; the data preprocessing module is used to preprocess the collected industry prosperity index data and construct a prosperity index data set; the correlation analysis module is used to perform correlation analysis on the prosperity index data set to screen out independent prosperity indicators and construct an independent prosperity index set; the indicator group classification module divides the economic indicators into leading indicators, consistent indicators and lagging indicators according to the time lag relationship between each prosperity indicator and the economic cycle fluctuation; the feature weight allocation module uses the random forest algorithm to perform feature selection and weight allocation processing on the indicator set based on the classification results of the prosperity indicators; the composite index construction module constructs the prosperity index of the leading, consistent and lagging indicators respectively through the composite index based on the processed indicator set; the prosperity index application module outputs the leading, consistent and lagging composite index according to the prosperity indicator group data of the power industry.

9. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the computer program is loaded into a processor, a method for constructing a power industry prosperity index based on a random forest algorithm according to any one of claims 1 to 7 is implemented.

10. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, a method for constructing a power industry prosperity index based on a random forest algorithm according to any one of claims 1 to 7 is implemented.

Citation Information

Patent Citations

  • Electricity demand prosperity index construction method based on electric power big data

    CN114049160A