Electric charge recovery risk prediction method based on principal component analysis method and logistic regression method
Through the combination of principal component analysis method and logistic regression method, the error problem caused by excessive data characteristics in the electricity bill recovery risk prediction model is solved, the prediction accuracy and work efficiency are improved, and the accurate identification and effective management of electricity bill recovery risks are achieved. .
Patent Information
- Application Number
- CN202411181814.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-27
- Publication Date
- 2024-12-31
AI Technical Summary
The lack of data preprocessing in the existing electricity bill recovery risk prediction model leads to excessive features that increase model errors, affecting prediction accuracy, and the direct prediction accuracy of single-store models is low.
Principal component analysis method is used to reduce data dimensions, eliminate indicators with less influence, and establish a electricity bill recovery risk prediction model in combination with logistic regression algorithm, and improve prediction accuracy through data preprocessing and model training.
It significantly improves the accuracy and work efficiency of electricity bill recovery risk prediction, can follow up with high-risk customers in a timely manner, optimize payment measures, reduce electricity bill recovery risks, and improve service economics.
Smart Images

Figure CN119228117A_ABST
Abstract
Description
Technical Field
[0001] The invention relates to an electricity fee recovery risk prediction method based on principal component analysis and logistic regression. Background Art
[0002] Electricity bill recovery is an important part of the production and operation activities of power companies. Although smart payment is being promoted, there are still few users willing to implement smart payment. Electricity bill recovery has gradually become a major problem affecting the production and operation of power companies. Through the basic information of power customers, electricity consumption, electricity bills, payments, and the duration of electricity bill remittance, an electricity bill recovery risk indicator system for large power customers is established. Principal component analysis is used to eliminate indicators with less influence, and the customer electricity bill recovery risk warning indicator is obtained. Finally, based on the multi-class ordered algorithm in the logistic regression algorithm, the electricity bill recovery risk warning is performed, and an electricity bill recovery risk prediction model based on principal component analysis and logistic regression is proposed.
[0003] For example, the enterprise electricity bill payment risk prediction method and system based on vertical federated logistic regression with publication number CN115392531A discloses an enterprise electricity bill payment risk prediction method and system based on vertical federated logistic regression, which uses secret sharing technology to protect the data privacy security during the joint risk prediction between the power grid and the Bureau of Industry and Information Technology, and realizes the model utility at the centralized training level. By using secret sharing technology to replace homomorphic encryption technology, the overall computational complexity and high communication costs are effectively reduced, and the needs of processing large amounts of data in actual scenarios can be met. By using secret sharing technology to replace differential privacy technology, the model accuracy can be effectively improved, and accurate predictions in actual risk prediction scenarios can be met.
[0004] However, the above existing public technology has the following defects:
[0005] 1. The model lacks data preprocessing. If the data has too many features, it is easy to increase the model error, thus affecting the accuracy of electricity fee recovery risk prediction;
[0006] 2. The single deposit model is used to predict the risk of direct electricity fee recovery, and the prediction accuracy is very low. Summary of the invention
[0007] The purpose of the present invention is to overcome the defects of the background technology and provide a method for predicting the risk of electricity fee recovery based on principal component analysis and logistic regression, which can more accurately identify the payment characteristics of users and reduce errors.
[0008] To achieve the above object, the technical solution of the present invention is: a method for predicting the risk of electricity fee recovery based on principal component analysis and logistic regression, comprising:
[0009] Collect information on electricity customers and establish a risk indicator system for electricity fee recovery for electricity customers;
[0010] The principal component analysis method is used to eliminate the indicators with less influence in the electricity fee recovery risk indicator system, and obtain the customer electricity fee recovery risk warning indicator;
[0011] Based on the logistic regression algorithm, the risk warning of electricity fee recovery is carried out, and an electricity fee recovery risk prediction model based on principal component analysis and logistic regression is proposed.
[0012] In one embodiment of the present invention, the electricity customer information includes the user information, electricity consumption data, electricity fee information, historical payment records, and payment methods of the electricity customer.
[0013] In one embodiment of the present invention, a risk indicator system for electricity fee recovery of large power customers is established, and data elimination and normalization processing are also required for the collected power customer information.
[0014] In one embodiment of the present invention, the principal component analysis method is to recombine and transform the original sample data features into a new set of unrelated features, and select as few features as possible from this new set of unrelated features as needed to express as much original information as possible, that is, to replace the correlated feature vectors in the original data with a new set of unrelated feature vectors, so as to achieve the purpose of expressing as much information as possible while reducing the data dimension.
[0015] In one embodiment of the present invention, the principal component analysis method is implemented as follows:
[0016] (1) Input the original data set X = {x i |i=1,2,...,m}, and find the average vector of the original data set X Here, the original data set X is the electricity customer information set, x i represents the i-th indicator in the power customer information, and m represents the total number of indicators in the power customer information;
[0017] (2) Calculate the covariance matrix C:
[0018]
[0019] (3) Calculate the eigenvalue γ of the covariance matrix C i and the eigenvector v i The characteristic equation of is as follows:
[0020] γ i v i =Cv i
[0021] (4) γ i Arrange in descending order, and determine the dimension p after dimensionality reduction according to the approximation h of the principal component. Obtain γ = [γ1, γ2,..., γ p ],V=[v1,v2,...,v p ];
[0022] (5) Calculate the feature matrix X after dimensionality reduction p , the matrix consists of p eigenvectors, X p This is the result obtained after dimensionality reduction using principal component analysis.
[0023] In one embodiment of the present invention, the training process of the electricity fee recovery risk prediction model based on principal component analysis and logistic regression is as follows:
[0024] Based on the customer electricity bill recovery risk warning indicators obtained by principal component analysis, a training set is constructed and input into the logistic regression model. The logistic regression model is trained, and the parameters of the logistic regression model are fitted by maximum likelihood estimation or gradient descent optimization algorithm to obtain an electricity bill recovery risk prediction model based on principal component analysis and logistic regression.
[0025] In one embodiment of the present invention, the electricity fee recovery risk prediction model based on principal component analysis and logistic regression obtained by training uses a training set to evaluate performance, that is, to calculate accuracy, precision, and recall.
[0026] Compared with the prior art, the present invention has the following beneficial effects:
[0027] 1. Work efficiency: The data model can be used to analyze user payment characteristics, use customer risk level labels to screen customer groups, guide electricity bill recovery work, promptly follow up on the electricity bill payment status of high-risk and medium-risk customers, increase the frequency and intensity of collection, and significantly reduce the risk of electricity bill recovery.
[0028] 2. Economic efficiency: This model sorts electricity bills by risk level, prioritizes key collection measures, increases the frequency of collection text messages for high-risk users, differentiates collection content, and reduces the frequency of collection text messages for low-risk users, etc., to improve the quality of service. BRIEF DESCRIPTION OF THE DRAWINGS
[0029] Figure 1 The present invention is a flow chart of the method for predicting the risk of electricity fee recovery based on principal component analysis and logistic regression. DETAILED DESCRIPTION
[0030] The technical solution of the present invention is described in detail below in conjunction with the accompanying drawings.
[0031] The present invention provides a method for predicting electricity fee recovery risk based on principal component analysis and logistic regression, comprising:
[0032] Collect information on electricity customers and establish a risk indicator system for electricity fee recovery for electricity customers;
[0033] The principal component analysis method is used to eliminate the indicators with less influence in the electricity fee recovery risk indicator system, and obtain the customer electricity fee recovery risk warning indicator;
[0034] Based on the logistic regression algorithm, the risk warning of electricity fee recovery is carried out, and an electricity fee recovery risk prediction model based on principal component analysis and logistic regression is proposed.
[0035] The following is the specific implementation process of the present invention.
[0036] like Figure 1 As shown, the present invention is a method for predicting the risk of electricity fee recovery based on principal component analysis and logistic regression. The method normalizes the user's electricity fee information data, including user information, electricity volume data, electricity fee information, historical payment records, payment methods, etc., and uses principal component analysis to perform dimensionality reduction processing. The user's payment risk is predicted again through logistic regression. The model can more accurately identify the user's payment characteristics and reduce errors.
[0037] The technical solution is designed as follows:
[0038] 1. Principal component analysis:
[0039] Principal component analysis is a widely used data dimensionality reduction method. The principle of its algorithm is to recombine the features of the original sample data into a new set of unrelated features, and select fewer features from these features as needed to express as much original information as possible. That is, a new set of unrelated feature vectors replaces the correlated feature vectors in the original data to achieve the purpose of expressing as much information as possible while reducing the data dimension.
[0040] The principal component analysis method is implemented as follows:
[0041] (1) Input the original data set X = {x i |i=1,2,...,m}, and find the average vector of the original data set X Here, the original data set X is the electricity customer information set, x i represents the i-th indicator in the power customer information, and m represents the total number of indicators in the power customer information;
[0042] (2) Calculate the covariance matrix C:
[0043]
[0044] (3) Calculate the eigenvalue γ of the covariance matrix C i and the eigenvector v i The characteristic equation of is as follows:
[0045] γ i vi =Cv i
[0046] (4) γ i Arrange in descending order, and determine the dimension p after dimensionality reduction according to the approximation h of the principal component. Obtain γ = [γ1, γ2,..., γ p ],V=[v1,v2,...,v p ];
[0047] (5) Calculate the feature matrix X after dimensionality reduction p , the matrix consists of p eigenvectors, X p That is, the result obtained after dimensionality reduction by principal component analysis, that is, determining the indicators that mainly affect electricity fee recovery, so as to reconstruct the indicator system, perform optimal grouping operations on all characteristic indicators in the indicator system architecture, realize the processing of evidence weight conversion, build a logistic regression model, and quantify the calculation results of the model.
[0048] 2. Logistic regression method:
[0049] The logistic regression model is a generalized linear regression. It uses the function L to correspond ω′x+b to a hidden state p, p=L(ω′x+b), and then determines the value of the dependent variable based on the size of p and 1-p.
[0050] Logistic distribution is a continuous probability distribution, and its distribution function and density function are:
[0051]
[0052]
[0053] Among them, μ represents the location parameter and γ>0 is the shape parameter.
[0054] The solution is obtained by the maximum likelihood estimation method, that is, to find a set of parameters under which the likelihood (probability) is maximized. Assume:
[0055] P(Y=1|x)=p(x)
[0056] P(Y=0|x)=1-p(x)
[0057] Likelihood function:
[0058]
[0059] The method for solving logistic regression usually uses gradient descent. The main goal of optimization is to find a direction in which the value of the loss function can be reduced after the parameters move in this direction. This direction is often obtained by various combinations of first-order partial derivatives or second-order partial derivatives. The loss function of logistic regression is:
[0060]
[0061] Gradient descent is done by J( w ) The first-order derivative of w is used to find the descent direction, and the parameters are updated iteratively. The update method is:
[0062]
[0063]
[0064] Where k is the number of iterations, each time the parameters are updated, we can compare J(w k+1 )-J(w k ) is less than the threshold or the maximum number of iterations is reached to stop the iteration.
[0065] 3. Electricity fee recovery risk prediction model based on principal component analysis and logistic regression method:
[0066] 3.1 Data Preprocessing
[0067] In order to reduce the impact of data on the proposed model, the original data of user work order information in the power system is preprocessed, and some users with missing data are processed separately, and these users are eliminated first.
[0068] 3.2 Model Building
[0069] First, the user's electricity bill information data is normalized, including user information, electricity data, electricity bill information, historical payment records, payment methods, etc. The sample data that needs to be input into the network is used as X input in the principal component analysis method for dimensionality reduction processing; then, the dimensionality-reduced data is divided into a training set and a test set, and the top 6 indicators with cumulative contribution rates are selected, the relevant indicators are determined, and the indicator system is constructed. The training set is input into the logistic regression model to complete the model training process; finally, the test set is used in the trained model to verify the effectiveness of the prediction model. In summary, the execution steps of the electricity bill recovery risk prediction model are as follows:
[0070] (1) Determine the network structure, number of nodes, and number of quantiles1, initialize the network, and construct training and test sets;
[0071] (2) Input the training set into the logistic regression model, use the training set to train the logistic regression model, and fit the model parameters through optimization algorithms such as maximum likelihood estimation or gradient descent.
[0072] (3) Use the training set to evaluate the performance of the trained model and calculate the accuracy, precision, and recall.
[0073] (4) Analyze the importance of each feature in the model and derive the contribution rate.
[0074] (5) Use the trained logistic regression model to predict new samples.
[0075] The above are preferred embodiments of the present invention. Any changes made according to the technical solution of the present invention, as long as the resulting functions do not exceed the scope of the technical solution of the present invention, belong to the protection scope of the present invention.
Claims
1. A method for predicting electricity fee recovery risk based on principal component analysis and logistic regression, characterized in that: include: Collect information on electricity customers and establish a risk indicator system for electricity fee recovery for electricity customers; The principal component analysis method is used to eliminate the indicators with less influence in the electricity fee recovery risk indicator system, and obtain the customer electricity fee recovery risk warning indicator; Based on the logistic regression algorithm, the risk warning of electricity fee recovery is carried out, and an electricity fee recovery risk prediction model based on principal component analysis and logistic regression is proposed.
2. The method for predicting electricity fee recovery risk based on principal component analysis and logistic regression according to claim 1 is characterized in that: The electricity customer information includes the electricity customer's user information, electricity consumption data, electricity fee information, historical payment records, and payment methods.
3. The method for predicting electricity fee recovery risk based on principal component analysis and logistic regression according to claim 1 is characterized in that: To establish a risk indicator system for electricity bill recovery from large electricity customers, it is also necessary to eliminate and normalize the collected electricity customer information.
4. The method for predicting electricity fee recovery risk based on principal component analysis and logistic regression according to claim 1 is characterized in that: The principal component analysis method is to recombine and transform the original sample data features into a new set of unrelated features, and select as few features as possible from this set of new unrelated features as needed to express as much original information as possible, that is, to replace the correlated feature vectors in the original data with a new set of unrelated feature vectors, so as to achieve the purpose of expressing as much information as possible while reducing the data dimension.
5. The method for predicting electricity fee recovery risk based on principal component analysis and logistic regression according to claim 1 or 4, characterized in that: The principal component analysis method is implemented as follows: (1) Input the original data set X = {x i |i=1,2,...,m}, and find the average vector of the original data set X Here, the original data set X is the electricity customer information set, x i represents the i-th indicator in the power customer information, and m represents the total number of indicators in the power customer information; (2) Calculate the covariance matrix C: (3) Calculate the eigenvalue γ of the covariance matrix C i and the eigenvector v i The characteristic equation of is as follows: γ i in i =Cv i (4) γ i Arrange in descending order, and determine the dimension p after dimensionality reduction according to the approximation h of the principal component. We get γ=[γ1,γ2,...,γ p ],V=[v1,v2,...,v p ]; (5) Calculate the feature matrix X after dimensionality reduction p , the matrix consists of p eigenvectors, X p This is the result obtained after dimensionality reduction using principal component analysis.
6. The method for predicting electricity fee recovery risk based on principal component analysis and logistic regression according to claim 1 is characterized in that: The training process of the electricity fee recovery risk prediction model based on principal component analysis and logistic regression is as follows: Based on the customer electricity bill recovery risk warning indicators obtained by principal component analysis, a training set is constructed and input into the logistic regression model. The logistic regression model is trained, and the parameters of the logistic regression model are fitted by maximum likelihood estimation or gradient descent optimization algorithm to obtain an electricity bill recovery risk prediction model based on principal component analysis and logistic regression.
7. The method for predicting electricity fee recovery risk based on principal component analysis and logistic regression according to claim 1 is characterized in that: The performance of the electricity fee recovery risk prediction model based on principal component analysis and logistic regression obtained by training was evaluated using the training set, i.e., the accuracy, precision and recall were calculated.
