A measurement data recovery method and system
By using an isolated forest model to detect abnormal data in the power system and combining matrix regularization and random matrix decomposition to repair missing data, the problems of metered data abnormal detection and missing data repair in the power system are solved, and efficient and accurate data recovery effect is achieved.
Patent Information
- Application Number
- CN202010423811.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-05-19
- Publication Date
- 2025-03-14
- Estimated Expiration
- 2040-05-19
AI Technical Summary
There are problems with abnormal detection and missing data repair in metered data in power systems. The prior art such as mean replacement and probability matrix decomposition have problems with overfitting and data recovery accuracy.
The isolated forest model is used to detect abnormal data, and the missing data is repaired through matrix regularization and random matrix decomposition methods, and a metered data recovery optimization model is established to obtain the best repair matrix.
It effectively avoids overfitting problems, improves the accuracy and efficiency of data recovery, and can quickly mine abnormal data and achieve accurate repair of metrological data.
Smart Images

Figure CN111625399B_ABST
Abstract
Description
Technical Field
[0001] The invention belongs to the field of data recovery, and in particular to a measurement data recovery method and system. Background Art
[0002] With the advancement of the construction of ubiquitous power Internet of Things, the deployment of smart meters and various energy metering, the efficiency and quality of electricity data acquisition have been greatly improved, but data recording errors and random loss are still inevitable, and special situations such as equipment damage, line power outages and maintenance, large-scale festivals, and even user power theft will also cause abnormal peak and valley fluctuations. These data errors and anomalies will inevitably cover the true trend of the power consumption curve, causing major deviations in subsequent power consumption management and load forecasting, leading to increased power planning and operation and maintenance costs, and directly affecting the automatic dispatching and operation of the power supply system. Therefore, efficiently and accurately repairing errors and omissions in existing power consumption data and detecting abnormal power consumption have become key research topics in the informationization process of the power sector, and have important practical significance.
[0003] The simplest method for electricity data recovery is mean replacement, which imputes the mean of all non-missing values to replace missing values. However, mean replacement does not preserve the relationship between variables and therefore does not provide correct estimates in most cases. Typically, probabilistic matrix factorization (PMF) is used to decompose a single matrix into the product of two matrices. There are two main advantages to the application of PMF in power systems. First, since the resulting matrix after decomposition has a lower dimension, PMF allows reducing the total number of stored values of large data arrays. In addition, since PMF has the property of obtaining the original matrix by calculating the product of two matrices, this property can also be used to recover missing values in the original matrix. There are still some challenges when applying the PMF method to the problem of missing data recovery. First, the complexity grows exponentially with the increase of the matrix size. Second, when the algorithm tries to minimize the error that leads to loss of generality, overfitting problems may occur. At the same time, abnormal data can reduce the accuracy of data recovery. Summary of the invention
[0004] The purpose of the present invention is to overcome the deficiencies of the prior art, solve the problems of abnormal detection and missing data repair of metering data in an electric power system, and provide a metering data recovery method and system.
[0005] The present invention solves the technical problem by adopting the following technical solutions:
[0006] A method for recovering measurement data comprises the following steps:
[0007] Step 1: Collect the measurement data that needs to be processed;
[0008] Step 2: normalize the collected measurement data to obtain a normalized matrix;
[0009] Step 3, using the measurement data in the normalized matrix to construct an isolation forest model composed of iTrees;
[0010] Step 4: Use the established isolation forest model to calculate the anomaly score of the measurement data and determine whether the data is abnormal data;
[0011] Step 5: remove the abnormal data detected by the isolation forest model to form a measurement data set;
[0012] Step 6, using the metrology data set to define the data matrix to be repaired, the repair matrix and the matrix describing the lost data points;
[0013] Step 7, using the defined data matrix to be repaired, the repair matrix and the matrix describing the lost data points, a metrology data recovery optimization model is established and solved to obtain the optimal repair matrix;
[0014] Step eight, denormalize the optimal repair matrix to obtain the repaired measurement data.
[0015] Moreover, the metering data is collected from smart meters and other electricity metering terminals.
[0016] Furthermore, the metering data to be processed includes at least one of the following: station area information, user ID, electricity usage time and electricity usage power.
[0017] Furthermore, the normalization process of the collected measurement data is performed to obtain a normalized matrix using the following formula:
[0018]
[0019] Among them, the element x ij,norm is the normalized value, ranging from [0,1]; element x ij represents the power consumption of the jth substation or user at the i-th moment, x ij,min is the minimum value of the elements in the matrix X, x ij,max is the maximum value of the elements in matrix X.
[0020] Moreover, the method of constructing an isolation forest model composed of iTrees using the measurement data in the normalized matrix is:
[0021] Step 1, from the normalized matrix X norm Evenly select ψ pieces of measurement data as samples of iTree;
[0022] Step 2, select a load characteristic quantity from the sample of iTree, and determine the characteristic value k within the value range of the load characteristic quantity;
[0023] Step 3, perform binary partitioning on the samples of iTree, put the data with less than eigenvalue k on the left, and put the data with greater than or equal to eigenvalue k on the right, and perform this process recursively until the data cannot be divided any further or the depth of the tree reaches log2ψ;
[0024] Step 4: Multiple iTrees can be generated through steps 1-3 and combined into an isolation forest model.
[0025] Moreover, the load characteristic quantity includes at least one of the following: peak-to-valley difference, maximum utilization hours, and peak load.
[0026] Furthermore, the method for calculating the abnormal score of the measurement data and determining whether the data is abnormal data is as follows:
[0027] Traverse the data through each iTree, calculate its depth and average depth in each iTree, and calculate the abnormal score of the measurement data according to the following formula:
[0028]
[0029]
[0030] Among them, h(x ij,norm ) is the measured data x ij,norm The depth retrieved in iTree, E(h(x ij,norm )) is the average depth, H(ψ) = ln(ψ) + ζ, ζ is the Euler constant, s(x ij,norm ) is closer to 1, indicating that it is more likely to be abnormal data.
[0031] Furthermore, the method of defining the matrix of data to be repaired, the repair matrix and the matrix describing the lost data points by using the metrology data set includes:
[0032] The method for defining the data matrix to be repaired is: the measurement data set with abnormal data removed is expressed as an N×M-order matrix R to be repaired, as shown in the following formula:
[0033]
[0034] The method for defining the repair matrix is: generating a K×N order random matrix U and a K×M order random matrix V, so that the repair matrix R′ is as shown in the following formula:
[0035]
[0036] Where K represents the number of potential feature column vectors in U and V;
[0037] The definition describes the matrix I of the missing data points, which has the same dimensions as R,
[0038]
[0039] Among them, the element value I in I ij As shown in the following formula:
[0040]
[0041] The method for defining the data distribution of potential eigenvectors in a random matrix is as follows: Let each column of U and V be a multivariate Gaussian with mean μ = 0 and variance a multiple of the identity matrix I, for U a multiple of σ U , for multiples of V is σ V , as shown below:
[0042]
[0043]
[0044] Define the conditional distribution of measurement data. Based on the prior distribution in the above two formulas, the conditional distribution of measurement data is defined as follows:
[0045]
[0046] Calculate the posterior probability of the random matrix. The matrices U and V are independent. According to the Bayesian formula, the posterior probability of U and V can be calculated as follows:
[0047]
[0048] Will and Substituting into the above equation and taking the logarithm on both sides of the equation, we get the following equation:
[0049]
[0050] Among them, C is an independent constant;
[0051] By maximizing the logarithmic posterior in the above formula, the optimal repair matrix R′ is obtained.
[0052] Moreover, the method of establishing a metrology data recovery optimization model using the defined data matrix to be repaired, the repair matrix and the matrix describing the lost data points and solving to obtain the optimal repair matrix includes: introducing a regularization term parameter in the objective function; using the steepest descent method to solve the objective function introducing the regularization term parameter to obtain the repair matrix; setting a convergence criterion and updating the obtained repair matrix until the convergence criterion is met;
[0053] The method of introducing the regularization term parameter into the objective function is: establishing a measurement data recovery optimization model:
[0054]
[0055] Among them, the parameter λ of the regularization term U and λ V Used to control the amplitude of updating matrices U and V, ||U|| and ||V|| are the square roots of the sum of the absolute squares of the matrix elements,
[0056]
[0057] The method of using the steepest descent method to solve the objective function of introducing the regularization term parameter to obtain the repair matrix is: fix the variance parameter and update the random matrices U and V using the following formula, and R′=U T V,
[0058]
[0059]
[0060] Where α defines the step size that the elements in U and V need to be adjusted. Repeat this step until the following equation is satisfied;
[0061] The method for setting the convergence criterion is: the RMSE value calculated in the measurement data recovery optimization model is compared with the maximum acceptable error RMSE max For comparison,
[0062] RMSE≤RMSE max
[0063] If the above formula is satisfied, the optimal repair matrix is obtained; otherwise, step seven is continued to update the repair matrix.
[0064] The advantages and positive effects of the present invention are:
[0065] 1. The present invention uses matrix regularization to avoid the problem of overfitting and improve the performance of the probability matrix decomposition method with sparse matrices. In the data recovery process, the influence of abnormal data on the recovery effect is considered, and the isolation forest algorithm is used to detect and remove abnormal data, which can realize rapid mining of abnormal data and improve the accuracy of recovering missing measurement data. BRIEF DESCRIPTION OF THE DRAWINGS
[0066] Figure 1 is a flow chart of the method of the present invention;
[0067] Figure 2The present invention uses the measurement data in the normalized matrix to construct an isolation forest model composed of iTrees, and uses the established isolation forest model to calculate the abnormal score of the measurement data to determine whether the data is abnormal data. DETAILED DESCRIPTION
[0068] The embodiments of the present invention are further described in detail below with reference to the accompanying drawings:
[0069] A measurement data recovery method, the innovation of which is that it includes the following steps: Figure 1 As shown:
[0070] Step 1: Collect the metering data to be processed from smart meters and other electricity metering terminals, including station area information, user ID, electricity usage time and power consumption. The metering data matrix X is constructed by collecting electricity usage data of N different stations or users at M equally spaced different times, where the element x ij It represents the power consumption of the jth substation or user at the i-th moment;
[0071] Step 2: Normalize the measurement data. To avoid the influence of different data scales on the data repair effect, the elements x in the measurement data matrix X are normalized. ij According to formula (1), normalization is performed to obtain the normalized matrix X norm , and the element x ij,norm The value of is between [0,1]:
[0072]
[0073] Among them, the element x ij,norm is the normalized value, ranging from [0,1]; element x ij represents the power consumption of the jth substation or user at the i-th moment, x ij,min is the minimum value of the elements in the matrix X, x ij,max is the maximum value of the elements in the matrix X;
[0074] Step 3: If Figure 2 As shown, an isolation forest model composed of multiple iTrees is constructed. The isolation forest detection method is suitable for linear structures and has a fast detection speed. It is suitable for large-scale power metering data and has high accuracy. The implementation process is as follows:
[0075] Step 1: From the matrix X norm Evenly select ψ pieces of measurement data as samples of iTree;
[0076] Step 2, select a load characteristic quantity from the iTree sample, such as peak-to-valley difference, maximum utilization hours, peak load, etc., and determine the characteristic value k within the value range of the load characteristic quantity;
[0077] Step 3, perform binary partitioning on the samples of iTree, put the data with less than eigenvalue k on the left, and put the data with greater than or equal to eigenvalue k on the right, and perform this process recursively until the data cannot be divided any further or the depth of the tree reaches log2ψ;
[0078] Step 4: Multiple iTrees can be generated through steps 1-3 and combined into an isolation forest model.
[0079] Step 4: Calculate the anomaly score of the measurement data and determine whether the data is abnormal data. Traverse the measurement data through each iTree, calculate its depth in each iTree (the traversal method is the same as the isolation forest model, and each step is counted as 1) and the average depth, and calculate the anomaly score of the measurement data according to formula (2).
[0080]
[0081]
[0082] Among them, h(x ij,norm ) is the measured data x ij,norm The depth retrieved in iTree; E(h(x ij,norm )) is the average depth; H(ψ) = ln(ψ) + ζ, ζ is the Euler constant, s(x ij,norm )The closer it is to 1, the greater the possibility that it is abnormal data.
[0083] Step 5: Eliminate abnormal data detected by the isolation forest model.
[0084] Step 6: Define the data matrix to be repaired and the repair matrix:
[0085] Define the data matrix to be repaired. The measurement data set with abnormal data removed is represented as an N×M-order matrix to be repaired R, as shown in formula (4).
[0086]
[0087] Define the repair matrix. Generate a K×N random matrix U and a K×M random matrix V, so that the repair matrix R′ is as shown in formula (5).
[0088]
[0089] Among them, K represents the number of potential feature column vectors in U and V, which can be any integer, which determines the flexibility of the execution process of the PMF method and affects the performance of the PMF method.
[0090] Define a matrix I describing the missing data points, with the same dimensions as R.
[0091]
[0092] Among them, the element value I in I ij As shown in formula (7):
[0093]
[0094] Define the data distribution of the latent eigenvectors in the random matrix. Assume that the latent eigenvectors of U and V are both distributed with zero-mean Gaussian priors, i.e., each column of U and V is a multivariate Gaussian with mean μ = 0 and variance is a multiple of the identity matrix I. For U, the multiple is σ U , for multiples of V is σ V As shown in formula (8) and (9):
[0095]
[0096]
[0097] The prior values in (8) and (9) ensure that the latent variables of U and V do not grow too much from 0. This prevents the values of the U and V matrices from becoming too large. Without limiting the values of U and V, the convergence time of PMF will increase due to multiple iterations, resulting in higher complexity.
[0098] Define the conditional distribution of measurement data. Considering the prior distributions in (8) and (9), the conditional distribution of measurement data is defined as shown in formula (10):
[0099]
[0100] Calculate the posterior probability of the random matrix. Assuming that matrices U and V are independent, calculate the posterior probability of U and V according to the Bayesian formula, and we can get formula (11):
[0101]
[0102] Substituting equations (8)-(10) into (11) and taking logarithms on both sides of the equation, we can obtain equation (12):
[0103]
[0104] Among them, C is an independent constant.
[0105] In order to obtain the best repair matrix R′, it is necessary to maximize the logarithmic posterior in (12). In order to improve the performance of the PMF method with sparse matrices, matrix regularization is used to avoid the overfitting problem. Overfitting means that the matrices U and V perform well on the training dataset. Due to lack of generality, the performance on the test dataset is poor. The recovery matrix reflects the known values very accurately, but the missing data values are close to zero because the training dataset has been multiplied with the identity matrix I. Therefore, by avoiding the overfitting problem, the proposed PMF method is more suitable for general data loss recovery problems.
[0106] Step 7: Establish a measurement data recovery optimization model and solve it to obtain the optimal repair matrix. In order to avoid data overfitting, it is necessary to fix the variance parameters σ, σ U and σ V is a constant, and the problem of maximizing the posterior probability is simplified to a least squares matrix completion problem with quadratic regularization, that is, minimizing the root mean square error (RMSE) between the original matrix R and the repaired matrix R′. The measurement data recovery optimization model is shown in formula (13).
[0107]
[0108] Among them, the parameter λ of the regularization term in (13) is U and λ V Used to control the amplitude of updating matrices U and V, it can better obtain the approximation of R and reduce the number of iterations. ||U|| and ||V|| are Frobenius norms, defined as the square root of the sum of the absolute squares of the matrix elements. As shown in equations (14)-(15).
[0109]
[0110]
[0111] The steepest descent method is used to solve the objective function in the model. To make learning easier, the variance parameter is fixed and the random matrices U and V are updated using equations (16) and (17).
[0112]
[0113]
[0114] Where α defines the step size that the elements in U and V need to be adjusted. Repeat step 7 until equation (18) is satisfied. In addition, the appropriate α value has a greater impact on the convergence accuracy and convergence time. Too large an α value may lead to reduced accuracy because the RMSE will be maxOn the other hand, if the value of α is too small, the RMSE will lead to many unnecessary iterations before it approaches the value that satisfies condition (9).
[0115] Set the convergence criterion. Compare the RMSE value calculated in equation (13) with the maximum acceptable error RMSE max Make a comparison.
[0116] RMSE≤RMSE max (18)
[0117] If equation (18) is satisfied, the PMF algorithm is completed. Otherwise, step 7 will be continued.
[0118] Step 8: Denormalize the repaired measurement data matrix to obtain complete measurement data. Use the trained random matrices U and V to obtain the repair matrix R′, denormalize the repaired measurement data matrix, and you can get the repaired measurement data.
[0119] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0120] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.
[0121] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.
[0122] 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. Any modification or equivalent replacement that does 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 measurement data recovery method, characterized in that: The following steps are involved: Step 1: Collect the measurement data that needs to be processed; Step 2: normalize the collected measurement data to obtain a normalized matrix; Step 3, using the measurement data in the normalized matrix to construct an isolation forest model composed of iTrees; Step 4: Use the established isolation forest model to calculate the anomaly score of the measurement data and determine whether the data is abnormal data; Step 5: remove the abnormal data detected by the isolation forest model to form a measurement data set; Step 6, using the metrology data set to define the data matrix to be repaired, the repair matrix and the matrix describing the lost data points; Step 7, using the defined data matrix to be repaired, the repair matrix and the matrix describing the lost data points, a metrology data recovery optimization model is established and solved to obtain the optimal repair matrix; Step 8, denormalizing the optimal repair matrix to obtain repaired measurement data; The method of establishing a metrology data recovery optimization model using the defined data matrix to be repaired, the repair matrix and the matrix describing the lost data points and solving to obtain the best repair matrix includes: introducing a regularization term parameter in the objective function; The steepest descent method is used to solve the objective function with the regularization term parameter introduced to obtain the repair matrix; Setting a convergence criterion and updating the repair matrix until the convergence criterion is met; The method of introducing the regularization term parameter into the objective function is: establishing a measurement data recovery optimization model: Among them, the parameter λ of the regularization term U and λ V Used to control the amplitude of updating matrices U and V, ||U|| and ||V|| are the square roots of the sum of the absolute squares of the matrix elements, I is the matrix of missing data points, U is a K×N random matrix, and V is a K×M random matrix; The method of using the steepest descent method to solve the objective function of introducing the regularization term parameter to obtain the repair matrix is: fix the variance parameter and update the random matrices U and V using the following formula, and R′=U T V, Where α defines the step size that the elements in U and V need to be adjusted, and this step is repeated; The method for setting the convergence criterion is: the RMSE value calculated in the measurement data recovery optimization model is compared with the maximum acceptable error RMSE max For comparison, RMSE≤RMSE max If the above formula is satisfied, the optimal repair matrix is obtained; otherwise, step seven is continued to update the repair matrix.
2. A measurement data recovery method according to claim 1, characterized in that: The collected measurement data is normalized to obtain a normalized matrix using the following formula: Among them, the element x ij,norm is the normalized value, ranging from [0,1]; element x ij represents the power consumption of the jth substation or user at the i-th moment, x ij,min is the minimum value of the elements in the matrix X, x ij,max is the maximum value of the elements in matrix X.
3. A measurement data recovery method according to claim 2, characterized in that: The method for constructing an isolation forest model composed of iTrees using the measurement data in the normalized matrix is: Step 1, from the normalized matrix X norm Evenly select ψ pieces of measurement data as samples of iTree; Step 2, select a load characteristic quantity from the sample of iTree, and determine the characteristic value k within the value range of the load characteristic quantity; Step 3, perform binary partitioning on the samples of iTree, put the data with less than eigenvalue k on the left, and put the data with greater than or equal to eigenvalue k on the right, and perform this process recursively until the data cannot be divided any further or the depth of the tree reaches log2ψ; Step 4: Multiple iTrees can be generated through steps 1-3 and combined into an isolation forest model.
4. A measurement data recovery method according to claim 3, characterized in that: The method of calculating the abnormal score of measurement data using the established isolation forest model and determining whether the data is abnormal data is as follows: Traverse the data through each iTree, calculate its depth and average depth in each iTree, and calculate the abnormal score of the measurement data according to the following formula: Among them, h(x ij,norm ) is the measured data x ij,norm The depth retrieved in iTree, E(h(x ij,norm )) is the average depth, H(ψ) = ln(ψ) + ζ, ζ is the Euler constant, s(x ij,norm )The closer it is to 1, the greater the possibility that it is abnormal data.
5. A measurement data recovery method according to claim 4, characterized in that: The method of defining a matrix of data to be repaired, a repair matrix, and a matrix describing lost data points using a metrology data set includes: The method for defining the data matrix to be repaired is: the measurement data set with abnormal data removed is represented as an N×M-order matrix R to be repaired, as shown in the following formula: The method for defining the repair matrix is: generating a K×N random matrix U and a K×M random matrix V, so that the repair matrix R′ is as shown in the following formula: Where K represents the number of potential feature column vectors in U and V; The definition describes the matrix I of the missing data points, which has the same dimensions as R, Among them, the element value I in I ij As shown below: The method for defining the data distribution of potential eigenvectors in a random matrix is as follows: Let each column of U and V be a multivariate Gaussian with mean μ = 0 and variance a multiple of the identity matrix I, for U a multiple of σ U , for multiples of V is σ V , as shown below: Define the conditional distribution of measurement data. Based on the prior distribution in the above two formulas, the conditional distribution of measurement data is defined as follows:
6. A measurement data recovery system, characterized in that: The system is implemented based on the measurement data recovery method described in any one of claims 1 to 5, and includes a measurement data acquisition module, a normalization processing module, an isolation forest model construction module, an abnormal data judgment module, an abnormal data removal module, a correlation matrix definition module, an optimal repair matrix construction module and an anti-normalization processing module. The metering data acquisition module is used to collect metering data that needs to be processed; The normalization processing module is used to perform normalization processing on the collected measurement data to obtain a measurement data matrix; The isolation forest model construction module is used to construct an isolation forest model composed of iTrees using the measurement data in the measurement data matrix; The abnormal data judgment module is used to calculate the abnormal score of the measurement data using the established isolation forest model to determine whether the data is abnormal data; The abnormal data elimination module is used to eliminate abnormal data detected by the isolation forest model to form a measurement data set; The correlation matrix definition module is used to define the data matrix to be repaired, the repair matrix and the matrix describing the lost data points using the metrology data set; The optimal repair matrix building module is used to establish a metrology data recovery optimization model using the defined data matrix to be repaired, the repair matrix and the matrix describing the lost data points and solve it to obtain the optimal repair matrix; The denormalization processing module is used to denormalize the optimal repair matrix to obtain repaired measurement data.
7. A measurement data recovery system according to claim 6, characterized in that: The normalization processing module is used to normalize the collected measurement data to obtain a measurement data matrix using the following formula: Among them, the element x ij,norm is the normalized value, ranging from [0,1]; element x ij represents the power consumption of the jth substation or user at the i-th moment, x ij,min is the minimum value of the elements in the matrix X, x ij,max is the maximum value of the elements in matrix X.
8. A measurement data recovery system according to claim 7, characterized in that: The method for the isolation forest model construction module to construct an isolation forest model composed of iTrees using the measurement data in the measurement data matrix is as follows: Step 1, from the normalized matrix X norm Evenly select ψ pieces of measurement data as samples of iTree; Step 2, select a load characteristic quantity from the sample of iTree, and determine the characteristic value k within the value range of the load characteristic quantity; Step 3, perform binary partitioning on the samples of iTree, put the data with less than eigenvalue k on the left, and put the data with greater than or equal to eigenvalue k on the right, and perform this process recursively until the data cannot be divided any further or the depth of the tree reaches log2ψ; Step 4: Multiple iTrees can be generated through steps 1-3 and combined into an isolation forest model.
9. A metrology data recovery system according to claim 8, characterized in that: The method of calculating the abnormal score of measurement data using the established isolation forest model and determining whether the data is abnormal data is as follows: Traverse the data through each iTree, calculate its depth and average depth in each iTree, and calculate the abnormal score of the measurement data according to the following formula: Among them, h(x ij,norm ) is the measured data x ij,norm The depth retrieved in iTree, E(h(x ij,norm )) is the average depth, H(ψ) = ln(ψ) + ζ, ζ is the Euler constant, s(x ij,norm )The closer it is to 1, the greater the possibility that it is abnormal data.
Citation Information
Patent Citations
A method for detecting abnormal behavior of electricity consumption of consumers based on isolated forests
CN109308306A
Electricity consumption information acquisition data exception analysis method based on isolated forest algorithm
CN110189232A