# Preprocessing Approach for Power Transformer Maintenance Data Mining Based onk-Nearest Neighbor Completion and Principal Component Analysis

Authors: Moïse Manyol; Samuel Eke; Alphonse J. M. Massoma; Alain Biboum; Ruben Mouangue
Journal: International Transactions on Electrical Energy Systems
 (2022)

---

## Abstract

The accuracy of a knowledge extraction algorithm in a large database depends on the quality of the data preprocessing and the methods used. The massive amounts of data that we collect every day are putting storage capacity at a premium. In reality, many databases are characterized by attributes with outliers, redundant, and even more missing values. Missing data and outliers are ubiquitous in our databases, and imputation techniques will help us mitigate their influence. To solve this problem, as well as the problem of data size, this paper proposes a data preprocessing approach based on thek-nearest neighbor (KNN) completion for imputation of missing data and principal component analysis (PCA) for processing redundant data, thus reducing the data size by generating a significant quality sample after imputation of missing and outlier data. A rigorous comparison is made between our approach and two others. The dissolved gas data from Rio Tinto Alcan’s transformer T0001 were imputed by KNN, where k equals 5. For 6 imputed gases, the average percentage error is about 2%, 17.5% after average imputation, and 23.65% after multiple imputations. For data compression, 2 axes were selected based on the elbow rule and the Kaiser threshold.


---

## Body

## 1. Introduction

The large size of today’s databases poses the problem of archiving and preprocessing raw data. The data may be missing, aberrant, or redundant. The application of data analysis algorithms on such data complicates the learning process and affects the performance and reliability of the model [1]. Data preprocessing is undoubtedly crucial in the process of knowledge discovery from these voluminous databases. Indeed, it allows for improving the quality of the data submitted later to the data mining algorithms. As far as outliers are concerned, it is good to keep them original and mysterious in the raw data if possible. In other words, the reason for removing outliers should come from outside the dataset only when you already know the originals [2]. Ignoring missing data can lead to a loss of precision and strong biases in the analysis models. Missing data are represented by the so-called missing values matrix, the form of which depends on the type of missing data. Generally, we distinguish between MCARs, MARs, and MNARs. The MCAR is the missing data in a completely random way if the probability of absence is the same for all the observations. This probability depends only on external parameters independent of this variable. MARs are data that are not missing completely at random if the probability of absence is related to one or more other observed variables. MNARs are nonrandomly missing data if the probability of absence depends on the variable in question. In summary, these fall into three categories and are extensively detailed in [3]. A presentation and a review have been made on the different assumptions and techniques for processing these data [4, 5]. In 2009, the authors of the work [4] developed a modern method called Multiple Imputation by Chained Equations (MICE) based on a Monte Carlo Markov Chain algorithm for imputing missing values. To eliminate missing values, noise, and redundant attributes, and also to reduce their size by generating representative and quality samples. The work [6] presents a method based on the calculation of the empirical copula of the original sample. The performance of this work was only compared to the one whose imputation is based on the mean. To classify data from the gases below [7], preprocess was performed in 2014 using the k-nearest neighbors (KNN). This shows that classification without preprocessing the data first is less accurate. Grzymala–Busse processed the unknown values of variable attributes by setting up new decision tables with known attributes instead of the original table, which had unknown and inconsistent attributes in their work [8]. The rough set theory is developed for learning inconsistent rules..This paper proposes a preprocessing method that combines thek-nearest neighbors and the principal component analysis (PCA). The k-nearest neighbor classifier is generally used in supervised classification because of its simplicity and robustness. To make it even more robust, i.e., less sensitive to data variations as shown in this work, references [9, 10] have respectively developed a k-nearest neighbor classifier based on the generalized mean distance. The main objective is to overcome the sensitivity of the k-neighborhood size and improve the KNN-based classification’s performance. In this proposed approach, the nested generalized mean distance computed by the multi-generalized mean distances in each class is designed for KNN-based classification decisions. The proposed method is shown to be suitable for pattern detection, on the one hand. On the other hand, a new representation method based on the k-nearest neighbor centroid coefficient is developed, which also aims to further improve the classification performance and reduce the sensitivity of the method to the size of the k-neighborhood, especially in cases of small sample size. In this work, the k-nearest neighbor-based classifier is used in the framework of data completion, and some works nowadays have used it in the framework of data imputation [11, 12].Thek-nearest neighbor method used for the imputation of missing data is based on the optimization of the choice of the k parameter, which relies on mechanical or discontinuous mean fitting techniques. For a k-nearest neighbor mean equal to 5 and for a Euclidean distance between two observations, 6 missing values are imputed. To observe the variables H2 (hydrogen) and CH4 (methane), which are low molecular weight gases, a weighting of N2 (nitrogen), CO2 (carbon dioxide), and CO (carbon monoxide) is recommended.For PCA based on the weighted strategy, robustness will be improved by mitigating the statistical impact of outliers through reduced weighting [13]. Similarly, it will solve the normalization problem and the increasing difficulties of archiving after a judicious choice of the number of axes to be retained by using the kink theory and the Kaiser threshold. From the works [7, 14] it appears that the PCA associated with a classifier (ANN) is more accurate than the support vector machine (SVM) associated with the KNN classifier. It then becomes judicious to join a classifier (KNN) to an exploratory technique on the data (PCA). After a reminder of the KNN algorithm and the PCA algorithm in Section 2, the proposed preprocessing approach is presented in Section 3. Finally, the results of our method applied to a dissolved gas database are compared to other methods presented in Section 4, followed by a discussion.


## 2. Materials and Methods

The approach proposed here is to present the imputation techniques by completion, in which the data will be submitted and to consider outliers.


### 2.1. Imputation Methods

The most common imputation techniques are presented here in a nonexhaustive way, namely: stationary, linear combination,k-nearest neighbor, NIPALS, and multiple completions, to mention only those. A dataset consists of p quantitative or qualitative variables (Y=yij=Y1,…,Yp) observed on a sample of n individuals; M denotes the matrix indicating the missing values by M=mij=1yij,mis.


#### 2.1.1. Stationary and Linear Combination Completion

There are several possible stationary imputations. The most common attribute value fitting (CMCF) [15] or simply the last known observation carried forward (LOCF) is given as follows:(1)yijmis=yi∗j∗=yi∗j|mi∗j=0,j<j∗,where yijmis represents the missing data.This method may seem too naive, but it is often used to lay the foundation for a comparison between imputation methods. Another common technique is to replace all missing values with a linear combination of observations. The case of imputation by the mean is given as follows:(2)yijmis=yi∗j∗=Yj∗¯.Or by the median, as follows:(3)yijmis=yi∗j∗=Yj∗˜.But this case is generalized to any weighted linear combination of observations. Instead of using all the available values, it is possible to restrict oneself to methods that select the most influential values by local aggregation or regression or even by combining different aspects.


#### 2.1.2. Completion by the Nearest Neighbor Method

Thek-nearest neighbors (KNN) imputation consists of running the following algorithm that models and predicts the missing data. First, the choice of the parameter k (1≤k≤n), calculate the metric distances dyi∗,yi,i=1,…,n retain the k observations yi1,…,yik, for which these distances are smaller; and finally, assigning to the missing values the arithmetic mean of the values of the k neighbors, such that is given as follows: (4)yijmis=yi∗j∗=1kyi1,…,yik.Oryi∗ an observation with q missing values.


#### 2.1.3. NIPALS Completion Algorithm

The NIPALS (Nonlinear Iterative Partial Least Squares) algorithm is an iterative method for estimating PLS (Partial Least Square) regression. This algorithm can be adapted to impute missing data. OrY=Y1,…Yp such as ∀i∈1,…,p, mathematical expectation E(Yi) = 0 (each column of the matrix is centered). The expansion of Y in terms of principal components and principal factors is given by following equation:(5)Y=∑h=1qεhuh,where q=dimL2X;ξhh=1,…,q are the principal components and uhh=1,…,q the principal vectors of the PCA of Y. For each variable of Yi, there is the equation given as follows:(6)Yi=∑h=1qεhuhi,where uhi represents the slope of the linear regression of Yi on the component ξh. The development of this algorithm is contained in [16].


#### 2.1.4. Multiple Imputation

Multiple imputations retain the virtues of single imputation and correct its main shortcomings. As its name suggests, it consists of imputing missing values several times to combine the results to reduce the error due to imputation [17]. The multiple imputation procedure consists of two phases: the imputation phase and the statistical analysis phase. These two phases use two different models: the imputation model and the analysis model. Once the imputations have been performed, the statistician can perform any type of analysis, according to the standard procedures for the analysis of complete datasets [4]. In 2011, work [18] developed a multiple imputation program called Amelia II. The model is based on a normality assumption:Y∼Nk (µ, Σ), or Y has a multivariate normal distribution with a mean vector μ and a covariance matrix Σ. Regarding multiple imputations, we are concerned with the parameters of the complete data, θ = (µ, Σ). Under the assumption that the data are MAR, we define Yobs as the observed data and Ymis as the missing data, such that Y = {Yobs, Ymis}. The missing data mechanism is characterized by the conditional distribution of M knowing Y given by p(M|Y).(7)pM|Y=pM|Yobs.LikelihoodpYobs|θ is then, written as(8)pYobs,M|θ=pM|YobspYobs|θ.Since we are only interested in the inference of the parameters of the complete data, the likelihood can be written in the following form:(9)Lθ|Yobs∞pYobs|θ.Now, using the iterative property of the expectation(10)pYobs|θ=∫pY|θdYmis,the obtained a posteriori law is as follows:(11)pθ|Yobs∞pYobs|θ=∫pY|θdYmis.


### 2.2. Outlier Management

Outliers can come from two possibilities. Either they come from errors, or they have a history behind them. In principle, outliers should be very rare; otherwise, the experiment/investigation to generate the dataset will be inherently flawed. Defining an outlier is tricky. Outliers may be legitimate because they are part of the long tail of the population. For example, a team working on predicting a financial crisis determines that a financial crisis occurs in one out of every 1000 simulations. Of course, the result is not an outlier that should be discarded. The reason for removing outliers only comes into play when you know the original data for them. For example, if the heart rate data is strangely fast and you know that there is a problem with the medical equipment, you can remove the bad data. Rejecting mysterious outliers is risky for downstream tasks. For example, some regression tasks are sensitive to extreme values. It takes more experiments to decide whether the outliers exist for a reason. In such cases, do not remove or correct outliers in the data preprocessing steps [2].


## 2.1. Imputation Methods

The most common imputation techniques are presented here in a nonexhaustive way, namely: stationary, linear combination,k-nearest neighbor, NIPALS, and multiple completions, to mention only those. A dataset consists of p quantitative or qualitative variables (Y=yij=Y1,…,Yp) observed on a sample of n individuals; M denotes the matrix indicating the missing values by M=mij=1yij,mis.


### 2.1.1. Stationary and Linear Combination Completion

There are several possible stationary imputations. The most common attribute value fitting (CMCF) [15] or simply the last known observation carried forward (LOCF) is given as follows:(1)yijmis=yi∗j∗=yi∗j|mi∗j=0,j<j∗,where yijmis represents the missing data.This method may seem too naive, but it is often used to lay the foundation for a comparison between imputation methods. Another common technique is to replace all missing values with a linear combination of observations. The case of imputation by the mean is given as follows:(2)yijmis=yi∗j∗=Yj∗¯.Or by the median, as follows:(3)yijmis=yi∗j∗=Yj∗˜.But this case is generalized to any weighted linear combination of observations. Instead of using all the available values, it is possible to restrict oneself to methods that select the most influential values by local aggregation or regression or even by combining different aspects.


### 2.1.2. Completion by the Nearest Neighbor Method

Thek-nearest neighbors (KNN) imputation consists of running the following algorithm that models and predicts the missing data. First, the choice of the parameter k (1≤k≤n), calculate the metric distances dyi∗,yi,i=1,…,n retain the k observations yi1,…,yik, for which these distances are smaller; and finally, assigning to the missing values the arithmetic mean of the values of the k neighbors, such that is given as follows: (4)yijmis=yi∗j∗=1kyi1,…,yik.Oryi∗ an observation with q missing values.


### 2.1.3. NIPALS Completion Algorithm

The NIPALS (Nonlinear Iterative Partial Least Squares) algorithm is an iterative method for estimating PLS (Partial Least Square) regression. This algorithm can be adapted to impute missing data. OrY=Y1,…Yp such as ∀i∈1,…,p, mathematical expectation E(Yi) = 0 (each column of the matrix is centered). The expansion of Y in terms of principal components and principal factors is given by following equation:(5)Y=∑h=1qεhuh,where q=dimL2X;ξhh=1,…,q are the principal components and uhh=1,…,q the principal vectors of the PCA of Y. For each variable of Yi, there is the equation given as follows:(6)Yi=∑h=1qεhuhi,where uhi represents the slope of the linear regression of Yi on the component ξh. The development of this algorithm is contained in [16].


### 2.1.4. Multiple Imputation

Multiple imputations retain the virtues of single imputation and correct its main shortcomings. As its name suggests, it consists of imputing missing values several times to combine the results to reduce the error due to imputation [17]. The multiple imputation procedure consists of two phases: the imputation phase and the statistical analysis phase. These two phases use two different models: the imputation model and the analysis model. Once the imputations have been performed, the statistician can perform any type of analysis, according to the standard procedures for the analysis of complete datasets [4]. In 2011, work [18] developed a multiple imputation program called Amelia II. The model is based on a normality assumption:Y∼Nk (µ, Σ), or Y has a multivariate normal distribution with a mean vector μ and a covariance matrix Σ. Regarding multiple imputations, we are concerned with the parameters of the complete data, θ = (µ, Σ). Under the assumption that the data are MAR, we define Yobs as the observed data and Ymis as the missing data, such that Y = {Yobs, Ymis}. The missing data mechanism is characterized by the conditional distribution of M knowing Y given by p(M|Y).(7)pM|Y=pM|Yobs.LikelihoodpYobs|θ is then, written as(8)pYobs,M|θ=pM|YobspYobs|θ.Since we are only interested in the inference of the parameters of the complete data, the likelihood can be written in the following form:(9)Lθ|Yobs∞pYobs|θ.Now, using the iterative property of the expectation(10)pYobs|θ=∫pY|θdYmis,the obtained a posteriori law is as follows:(11)pθ|Yobs∞pYobs|θ=∫pY|θdYmis.


## 2.1.1. Stationary and Linear Combination Completion

There are several possible stationary imputations. The most common attribute value fitting (CMCF) [15] or simply the last known observation carried forward (LOCF) is given as follows:(1)yijmis=yi∗j∗=yi∗j|mi∗j=0,j<j∗,where yijmis represents the missing data.This method may seem too naive, but it is often used to lay the foundation for a comparison between imputation methods. Another common technique is to replace all missing values with a linear combination of observations. The case of imputation by the mean is given as follows:(2)yijmis=yi∗j∗=Yj∗¯.Or by the median, as follows:(3)yijmis=yi∗j∗=Yj∗˜.But this case is generalized to any weighted linear combination of observations. Instead of using all the available values, it is possible to restrict oneself to methods that select the most influential values by local aggregation or regression or even by combining different aspects.


## 2.1.2. Completion by the Nearest Neighbor Method

Thek-nearest neighbors (KNN) imputation consists of running the following algorithm that models and predicts the missing data. First, the choice of the parameter k (1≤k≤n), calculate the metric distances dyi∗,yi,i=1,…,n retain the k observations yi1,…,yik, for which these distances are smaller; and finally, assigning to the missing values the arithmetic mean of the values of the k neighbors, such that is given as follows: (4)yijmis=yi∗j∗=1kyi1,…,yik.Oryi∗ an observation with q missing values.


## 2.1.3. NIPALS Completion Algorithm

The NIPALS (Nonlinear Iterative Partial Least Squares) algorithm is an iterative method for estimating PLS (Partial Least Square) regression. This algorithm can be adapted to impute missing data. OrY=Y1,…Yp such as ∀i∈1,…,p, mathematical expectation E(Yi) = 0 (each column of the matrix is centered). The expansion of Y in terms of principal components and principal factors is given by following equation:(5)Y=∑h=1qεhuh,where q=dimL2X;ξhh=1,…,q are the principal components and uhh=1,…,q the principal vectors of the PCA of Y. For each variable of Yi, there is the equation given as follows:(6)Yi=∑h=1qεhuhi,where uhi represents the slope of the linear regression of Yi on the component ξh. The development of this algorithm is contained in [16].


## 2.1.4. Multiple Imputation

Multiple imputations retain the virtues of single imputation and correct its main shortcomings. As its name suggests, it consists of imputing missing values several times to combine the results to reduce the error due to imputation [17]. The multiple imputation procedure consists of two phases: the imputation phase and the statistical analysis phase. These two phases use two different models: the imputation model and the analysis model. Once the imputations have been performed, the statistician can perform any type of analysis, according to the standard procedures for the analysis of complete datasets [4]. In 2011, work [18] developed a multiple imputation program called Amelia II. The model is based on a normality assumption:Y∼Nk (µ, Σ), or Y has a multivariate normal distribution with a mean vector μ and a covariance matrix Σ. Regarding multiple imputations, we are concerned with the parameters of the complete data, θ = (µ, Σ). Under the assumption that the data are MAR, we define Yobs as the observed data and Ymis as the missing data, such that Y = {Yobs, Ymis}. The missing data mechanism is characterized by the conditional distribution of M knowing Y given by p(M|Y).(7)pM|Y=pM|Yobs.LikelihoodpYobs|θ is then, written as(8)pYobs,M|θ=pM|YobspYobs|θ.Since we are only interested in the inference of the parameters of the complete data, the likelihood can be written in the following form:(9)Lθ|Yobs∞pYobs|θ.Now, using the iterative property of the expectation(10)pYobs|θ=∫pY|θdYmis,the obtained a posteriori law is as follows:(11)pθ|Yobs∞pYobs|θ=∫pY|θdYmis.


## 2.2. Outlier Management

Outliers can come from two possibilities. Either they come from errors, or they have a history behind them. In principle, outliers should be very rare; otherwise, the experiment/investigation to generate the dataset will be inherently flawed. Defining an outlier is tricky. Outliers may be legitimate because they are part of the long tail of the population. For example, a team working on predicting a financial crisis determines that a financial crisis occurs in one out of every 1000 simulations. Of course, the result is not an outlier that should be discarded. The reason for removing outliers only comes into play when you know the original data for them. For example, if the heart rate data is strangely fast and you know that there is a problem with the medical equipment, you can remove the bad data. Rejecting mysterious outliers is risky for downstream tasks. For example, some regression tasks are sensitive to extreme values. It takes more experiments to decide whether the outliers exist for a reason. In such cases, do not remove or correct outliers in the data preprocessing steps [2].


## 3. A Proposed Approach to Data Preprocessing

The algorithm in Figure1 is a maintenance data preprocessing technique that combines missing and redundant data management with data size reduction techniques (compression). The interest of such a work is the combination of its advantages in speed, robustness, and archiving.Figure 1
Proposed preprocessing algorithm.The first operation consists of having a table of maintenance data for the power transformers. For this purpose, we have a database from Rio Tinto Alcan of Canada, in which we will exploit the GD (dissolved gas) data of equipment T0001. Due to this database being complete, we will simulate missing data and submit this incomplete table to our algorithm. For the imputation of missing data, we chose thek-nearest neighbor algorithm (KNN). This imputation technique requires the choice of the parameter k by optimization of a criterion. The missing values are imputed, taking into account the class of data to which they belong. Moreover, the notion of distance between observations must be chosen with care. We proceed essentially by learning Euclidian, Mahalanobis, or Minkowski distance metrics to evaluate the similarity between classes. The notion of learning metrics is a recent field in machine learning. The work presented in 2002 in the article [19] is considered a pioneer. The goal of metric learning is to answer a recurrent need for comparison functions. Indeed, in many learning algorithms, the notion of metric plays a fundamental role. This is, for example, the case in the k-nearest-neighbor algorithm [20]. Indeed, this classification algorithm proposes associating the majority class of the k closest points with a point of unknown class. This proximity is defined by a metric. The imputed value will thus be the sum of the k-nearest values belonging to the same class.


### 3.1. Distances of Similarity or Dissimilarity

Euclidean distance. The Euclidean distance is probably the most used distance. For two vectors,x and x′, it is noted as follows:(12)d2x,x′=x−x2′=∑ixi−xi′2=x−x′Tx−x′.Minkowski distance. It is defined, for anyp ≥ 1 and for two vectors x and x′, by the following equation:(13)dpx,x′=x−xp′=∑ixi−xi′p1/p.Thus, forp = 1, we get the Manhattan distance, for p = +∞, we have the Chebyshev distance, and for p = 2, the Euclidean distance is found.Distance from Mahalanobis is defined as follows:(14)dMx,x′=x−x′TMx−x′.This distance is parameterized. Indeed, depending on the matrixM chosen, the result obtained changes. Thus, if we put M = I, where I is the identity matrix, we find the Euclidean distance.


### 3.2. Compression Based on PCA

The principal component analysis, beyond being a descriptive technique of data analysis, is an extremely powerful tool of compression and synthesis of information, very useful when one is in the presence of an important quantity of quantitative data to be processed and interpreted. PCA consists of synthesizing the number of observed variables, in other words, it attempts to summarize the information contained in the data table into a reduced set of linear combinations of the initial variables, taking care to minimize the loss of information due to this reduction [21, 22]. These new synthetic variables, called “principal components or factors or macrocharacteristics” have the following properties:The principal components, as notedC1,C2,…,Cq, are linear combinations of the initial variables(15)X2,X2,Xp:Cj=a1X1+a2X2+⋯apXp,for anyj=1,qwithq≤p.They are uncorrelated (the linear correlation coefficients of the components taken two by two are zero), which avoids the redundancy of the already summarized information. The first component carries or summarizes more information than the second, which carries more than the third, and so on, so that by limiting ourselves to the first 2 or 3 components, we have a good summary of the information contained in the data [23]. The mathematical tools used are those of linear algebra and matrix calculation. The correlation matrix is diagonalized, and the eigenvectors of this matrix define the new variables sought: these are the principal components. We can show that the principal components thus defined, verify well the sought properties: uncorrelated between them, of decreasing variance, and linear combinations of the starting variables. This last property allows us to construct graphs representing the individuals as well as the variables in the space defined by the components [23]. In the article [14], PCA is used to improve the preprocessing of data.


## 3.1. Distances of Similarity or Dissimilarity

Euclidean distance. The Euclidean distance is probably the most used distance. For two vectors,x and x′, it is noted as follows:(12)d2x,x′=x−x2′=∑ixi−xi′2=x−x′Tx−x′.Minkowski distance. It is defined, for anyp ≥ 1 and for two vectors x and x′, by the following equation:(13)dpx,x′=x−xp′=∑ixi−xi′p1/p.Thus, forp = 1, we get the Manhattan distance, for p = +∞, we have the Chebyshev distance, and for p = 2, the Euclidean distance is found.Distance from Mahalanobis is defined as follows:(14)dMx,x′=x−x′TMx−x′.This distance is parameterized. Indeed, depending on the matrixM chosen, the result obtained changes. Thus, if we put M = I, where I is the identity matrix, we find the Euclidean distance.


## 3.2. Compression Based on PCA

The principal component analysis, beyond being a descriptive technique of data analysis, is an extremely powerful tool of compression and synthesis of information, very useful when one is in the presence of an important quantity of quantitative data to be processed and interpreted. PCA consists of synthesizing the number of observed variables, in other words, it attempts to summarize the information contained in the data table into a reduced set of linear combinations of the initial variables, taking care to minimize the loss of information due to this reduction [21, 22]. These new synthetic variables, called “principal components or factors or macrocharacteristics” have the following properties:The principal components, as notedC1,C2,…,Cq, are linear combinations of the initial variables(15)X2,X2,Xp:Cj=a1X1+a2X2+⋯apXp,for anyj=1,qwithq≤p.They are uncorrelated (the linear correlation coefficients of the components taken two by two are zero), which avoids the redundancy of the already summarized information. The first component carries or summarizes more information than the second, which carries more than the third, and so on, so that by limiting ourselves to the first 2 or 3 components, we have a good summary of the information contained in the data [23]. The mathematical tools used are those of linear algebra and matrix calculation. The correlation matrix is diagonalized, and the eigenvectors of this matrix define the new variables sought: these are the principal components. We can show that the principal components thus defined, verify well the sought properties: uncorrelated between them, of decreasing variance, and linear combinations of the starting variables. This last property allows us to construct graphs representing the individuals as well as the variables in the space defined by the components [23]. In the article [14], PCA is used to improve the preprocessing of data.


## 4. Results and Discussion

This part is presented in two steps: the results and discussions after imputation and after compression.


### 4.1. Imputation of Data

The table of data that we submitted to the test is one of the dissolved gases taken from the transformer equipment (T0001) and presented in the Table1. Afterward, we will simulate missing values (Table 2), and then submit the data table to the data preprocessing algorithms. Table 3 presents the statistical data before any imputation.Table 1
RIO Tinto Alcan of Canada database of dissolved gases from transformer T0001.
DateH2CH4C2H2C2H4C2H6COCO2O2N225/01/198585,0040,000,0055,0052,001290,0011500,006380,0072600,0023/10/198689,0041,000,0044,0048,001403,0015092,008203,0078927,0015/12/198690,0035,000,0037,0048,001310,0012000,0010600,0079600,0008/06/198780,0040,000,0046,0047,001160,0010400,0013700,0082500,0006/09/198880,0030,002,0034,0042,001200,0010600,008710,0070500,0017/05/198985,0040,002,0039,0050,001190,0010800,003800,0068500,0017/10/198990,0040,002,0036,0048,001210,0011200,007130,0064200,0030/07/199080,0030,002,0031,0039,001080,009680,009360,0073800,0016/04/199190,0030,002,0022,0044,001150,0010400,007580,0065300,0020/04/199285,0037,000,0032,0046,001262,0011344,001092,0067199,0014/08/199294,0057,000,0034,0049,001391,0011694,003422,0097388,0002/11/199286,0033,000,0034,0045,001317,0011218,001331,0063320,0029/04/199373,0029,000,3030,0043,001172,0010802,001574,0058747,0002/08/199372,0033,000,0029,0040,001158,0010906,004266,0062380,0022/12/199374,0035,000,0027,0044,001278,0010899,003140,0074873,0001/05/199534,005,300,002,702,70242,001181,0019996,0064920,0010/05/199534,005,300,002,702,70242,001181,0019996,0064920,0029/10/1997107,0024,000,0019,0014,001153,005626,00454,0066308,0031/05/1999101,0026,000,3023,0016,001192,005870,004709,0065210,0010/05/200089,0026,000,0023,0018,001177,006476,002595,0077360,0010/05/200089,0026,000,0023,0018,001177,006476,002595,0077360,0015/05/2001132,0044,000,0039,0033,001929,0012520,005494,00105155,0013/11/200194,0030,000,0030,0022,001349,007976,00875,0064907,0006/05/200270,0025,000,0026,0019,001171,007416,003512,0063358,0014/10/200373,0028,000,0032,0021,001167,006446,00575,0060260,0013/05/200458,0023,000,0026,0020,00978,006999,00403,0059725,0014/05/200566,0025,001,1029,0021,001220,008354,001067,0064411,0010/05/200669,0026,000,0033,0023,001186,008099,002561,0067380,0017/05/200768,0025,000,0035,0024,001211,009018,006181,0064829,0022/05/200869,0024,000,0038,0023,001184,008205,002816,0064983,0017/06/200984,0029,000,0044,0029,001293,0010276,009234,0077994,00Table 2
Simulated missing values of transformer T0001.
DatesH2CH4C2H4COCO2N206/09/198830,0017/10/19891210,0030/07/199080,016/04/199165300,0010/05/199564920,0031/05/19995870,0010/05/200089,023,00Table 3
Statistical data before any imputation.
VariableObsObs. with MVObs. without MVMeanStandard deviationH23122980,03419,320CH43113030,38710,246C2H43113031,08010,918CO311301174,400298,059CO2311309159,4673057,737O2310315591,9685126,700N23122971206,67910819,652The table of data containing missing values is presented in Table2 along with several data completion methods in turn. The table 4 shows the results of the different completion techniques.Table4 presents the statistical data after imputation by KNN and for a k-neighbor average equal to 5, by the mean and multiple. The results of Table 5 show that the imputation by KNN allows finding in the majority of the exact values.Table 4
Statistical data after imputations.
Imputation by KNN (k = 5)Imputation by meanImputation multipleVariableObsObs. with MVObs. without MVMeanStandard deviationMeanStandard deviationMeanStandard deviationH23103180,32318,73480,03418,66579,06419,062CH43103130,37410,07430,38710,07430,29110,088C2H43103130,81910,83231,08010,73430,77210,870CO310311174,903293,0621174,400293,0491184,598298,499CO2310319045,4843072,5979159,4673006,3429173,0763007,297O2310315591,9685126,7005591,9685126,705591,9685126,700N23103171286,03210399,78771206,67910264,42371291,44610547,466∗MV: missing value.Table 5
Evolution of imputed values.
Exact valuesI-KNNI-meanI-multipleH2808080,03468,664CH4303030,38727,411C2H4232331,0821,542CO1210119011741490,549CO2587056269159,4679581,353N2649206492071206,67982476,217The decomposition of mineral oil at low temperatures produces relatively large quantities of low molecular-weight gases such as hydrogen (H2) and methane (CH4). To better observe the evolution of these two quantities after different imputations presented in Table 5, a weighting of nitrogen (N2), carbon dioxide (CO2), and carbon monoxide (CO) is made.Figure2 shows the evolution of the exact values of the variables before any simulation of missing data (in blue) and the variations of these data after their imputation created by simulation. It can be seen from this figure that the evolution of the data imputed by KNN (in orange) is closer to that of the exact values. The imputation by KNN is robust because its standard deviation and its mean are less sensitive to the variations of the data. Example: H2 and N2 before imputation have, respectively, a mean of 80.034–71206.679 and a standard deviation of 19.320–10819.652. After imputation by KNN, they have 80.323–71286.032 and a standard deviation of 18.734–10399.787. The table of completed data after imputation by KNN is presented in Table 6.Figure 2
Evolution of imputed variables.Table 6
Data completed after imputation by KNN.
DatesH2CH4C2H2C2H4C2H6COCO2O2N225/01/198585,0040,000,0055,0052,001290,0011500,006380,0072600,0023/10/198689,0041,000,0044,0048,001403,0015092,008203,0078927,0015/12/198690,0035,000,0037,0048,001310,0012000,0010600,0079600,0008/06/198780,0040,000,0046,0047,001160,0010400,0013700,0082500,0006/09/198880,0030,002,0034,0042,001200,0010600,008710,0070500,0017/05/198985,0040,002,0039,0050,001190,0010800,003800,0068500,0017/10/198990,0040,002,0036,0048,001190,0011200,007130,0064200,0030/07/199080,0030,002,0031,0039,001080,009680,009360,0073800,0016/04/199190,0030,002,0022,0044,001150,0010400,007580,0073800,0020/04/199285,0037,000,0032,0046,001262,0011344,001092,0067199,0014/08/199294,0057,000,0034,0049,001391,0011694,003422,0097388,0002/11/199286,0033,000,0034,0045,001317,0011218,001331,0063320,0029/04/199373,0029,000,30030,0043,001172,0010802,001574,0058747,0002/08/199372,0033,000,0029,0040,001158,0010906,004266,0062380,0022/12/199374,0035,000,0027,0044,001278,0010899,003140,0074873,0001/05/199534,005,300,002,7002,700242,001181,0019996,0064920,0010/05/199534,005,300,002,7002,700242,001181,0019996,0064920,0029/10/1997107,0024,000,0019,0014,001153,005626,00454,0066308,0031/05/1999101,0026,000,30023,0016,001192,005626,004709,0065210,0010/05/200089,0026,000,0023,0018,001177,006476,002595,0077360,0010/05/200089,0026,000,0023,0018,001177,006476,002595,0077360,0015/05/2001132,0044,000,0039,0033,001929,0012520,005494,00105155,0013/11/200194,0030,000,0030,0022,001349,007976,00875,0064907,0006/05/200270,0025,000,0026,0019,001171,007416,003512,0063358,0014/10/200373,0028,000,0032,0021,001167,006446,00575,0060260,0013/05/200458,0023,000,0026,0020,00978,006999,00403,0059725,0014/05/200566,0025,001,1029,0021,001220,008354,001067,0064411,0010/05/200669,0026,000,0033,0023,001186,008099,002561,0067380,0017/05/200768,0025,000,0035,0024,001211,009018,006181,0064829,0022/05/200869,0024,000,0038,0023,001184,008205,002816,0064983,0017/06/200984,0029,000,0044,0029,001293,0010276,009234,0077994,00The error in absolute value after the different imputations is given by(16)Error=yi−yyi,where yi represents the imputed value and y is the exact value.Figure3 shows us that the error committed by imputing the 6 gases by the k-nearest neighbors (KNN) has an average error percentage of 2%, 17.5% by the average, and 23.65% by multiple imputations.Figure 3
Change in error due to imputation.


### 4.2. Data Compression Based on PCA

One of the applications of principal component analysis is compression. PCA consists of synthesizing the number of observed variables, i.e., summarizing the information contained in the data table, into a reduced set of linear combinations of the initial variables, taking care to minimize the loss of information. The table of data imputed by thek-nearest neighbors is subjected to compression by PCA, and the results are obtained from the Anaconda (Python) and XLStat software.Table7 and Figure 4 show that the first eigenvalue λ is 5.054 and represents 56.153% of the variability (inertia I). This means that if we represent the data on two axes, then we will always have 71.299% of the total variability preserved. Each eigenvalue corresponds to a factor. Each factor is a linear combination of the starting variables. In principal component analysis, the problem is to be able to determine the dimension of the optimum representation space. It is a question of preserving all the stable and important characteristics of the data studied while ignoring the unstable and meaningless axes [24].Table 7
Eigenvalues and inertia.
F1F2F3F4F5F6F7F8F9λ5,0541,3631,1410,7990,2950,1730,1260,0330,014Inertia (%)56,15315,14612,6838,8783,2811,9271,4050,3720,156% Cumule56,15371,29883,98192,85996,14098,06799,47299,844100,000Figure 4
Eigenvalue distribution on the axes.


#### 4.2.1. Number of Axes to Retain

In practice, the only criteria applicable to the choice of the number of axes are empirical, the best known of which is that of Kaiser: in reduced centered data, we retain the principal components corresponding to eigenvalues greater than 1, which means that we are only interested in those components that «contribute» more than the initial variables [25]. We also use the broken sticks test and the kink rule, which consist of detecting the existence of a kink in the eigenvalue diagram. Figure 5 shows the kink thus formed, and Table 8 shows the results of the different tests.Figure 5
Observation of the middle elbow.Table 8
Boundary values of the broken sticks test and the Kaiser threshold.
AxesF1F2F3F4F5F6F7F8F9Eigenvalues5,0541,3631,1410,7990,2950,1730,1260,0330,014bk2,8281,8281,3280,9950,7450,5450,3790,2360,111Kaiser threshold1,1881,1881,1881,1881,1881,1881,1881,1881,188For the Kaiser threshold:(17)λ>1+2p−1n−1⟶λ>1+29−131−1=1,188.For broken sticks:bk=∑m=kp1/m The component is validated if λk>bk.The calculation of the threshold of the eigenvalues is given by the expression (17) where λ is the eigenvalue, p is the number of variables, and n is the number of observations.The use of the threshold (Kaiser-Saporta), and elbow (Cattell) rules limits the number of axes to two, while the broken sticks test (Frontier 1976) limits the number of axes to be retained to one. All of these approaches are consistent in that only one factor or axis appears to be sufficient in this study. For the sake of future interpretation and rotation of the axes, we have opted to maintain two axes as recommended by the elbow and Kaiser methods.


#### 4.2.2. Observations

The study of the observations consists of examining their coordinates and especially their graphic representations. Figures6 and 7 show the evolution of the two components retained according to the type of pretreatment applied.Figure 6
Evolution of component 1.Figure 7
Evolution of component 2 [26].The reference variable here is SI (without imputation), which represents the component retained at the end of the principal component analysis without having first carried out an imputation.To take just one example, on 15/05/2001, the components F1 without imputation (F1 SI), with imputation by thek-nearest neighbors + principal component analysis (F1 Iknnacp), with imputation by the mean + principal component analysis (F1 Imoyacp), and with multiple imputation + principal component analysis (F1 Imacp) have the values 4.142, 4.213, 4.167, and 3.917, respectively. The results show that, for component 1, the preprocessed data are faithful to the reference with a few precisions.For the same example, on 15/05/2001, the F2 components without imputation (F2 SI), with imputation by thek-nearest neighbors + principal component analysis (F2 Iknnacp), with imputation by the mean + principal component analysis (F2 Imoyacp), and with multiple imputation + principal component analysis (F2 IMacp) have, respectively, values −1.723, −1.822, −1.257, and 1.406. These results show that, for component 2, the preprocessed data with KNN + PCA imputation are more faithful to the reference data (F2 SI) with a few precisions. The combination of these two elements (KNN + ACP) produces the best accuracy for the T0001 transformer DGA dataset of different sizes and different percentages of missing values.


## 4.1. Imputation of Data

The table of data that we submitted to the test is one of the dissolved gases taken from the transformer equipment (T0001) and presented in the Table1. Afterward, we will simulate missing values (Table 2), and then submit the data table to the data preprocessing algorithms. Table 3 presents the statistical data before any imputation.Table 1
RIO Tinto Alcan of Canada database of dissolved gases from transformer T0001.
DateH2CH4C2H2C2H4C2H6COCO2O2N225/01/198585,0040,000,0055,0052,001290,0011500,006380,0072600,0023/10/198689,0041,000,0044,0048,001403,0015092,008203,0078927,0015/12/198690,0035,000,0037,0048,001310,0012000,0010600,0079600,0008/06/198780,0040,000,0046,0047,001160,0010400,0013700,0082500,0006/09/198880,0030,002,0034,0042,001200,0010600,008710,0070500,0017/05/198985,0040,002,0039,0050,001190,0010800,003800,0068500,0017/10/198990,0040,002,0036,0048,001210,0011200,007130,0064200,0030/07/199080,0030,002,0031,0039,001080,009680,009360,0073800,0016/04/199190,0030,002,0022,0044,001150,0010400,007580,0065300,0020/04/199285,0037,000,0032,0046,001262,0011344,001092,0067199,0014/08/199294,0057,000,0034,0049,001391,0011694,003422,0097388,0002/11/199286,0033,000,0034,0045,001317,0011218,001331,0063320,0029/04/199373,0029,000,3030,0043,001172,0010802,001574,0058747,0002/08/199372,0033,000,0029,0040,001158,0010906,004266,0062380,0022/12/199374,0035,000,0027,0044,001278,0010899,003140,0074873,0001/05/199534,005,300,002,702,70242,001181,0019996,0064920,0010/05/199534,005,300,002,702,70242,001181,0019996,0064920,0029/10/1997107,0024,000,0019,0014,001153,005626,00454,0066308,0031/05/1999101,0026,000,3023,0016,001192,005870,004709,0065210,0010/05/200089,0026,000,0023,0018,001177,006476,002595,0077360,0010/05/200089,0026,000,0023,0018,001177,006476,002595,0077360,0015/05/2001132,0044,000,0039,0033,001929,0012520,005494,00105155,0013/11/200194,0030,000,0030,0022,001349,007976,00875,0064907,0006/05/200270,0025,000,0026,0019,001171,007416,003512,0063358,0014/10/200373,0028,000,0032,0021,001167,006446,00575,0060260,0013/05/200458,0023,000,0026,0020,00978,006999,00403,0059725,0014/05/200566,0025,001,1029,0021,001220,008354,001067,0064411,0010/05/200669,0026,000,0033,0023,001186,008099,002561,0067380,0017/05/200768,0025,000,0035,0024,001211,009018,006181,0064829,0022/05/200869,0024,000,0038,0023,001184,008205,002816,0064983,0017/06/200984,0029,000,0044,0029,001293,0010276,009234,0077994,00Table 2
Simulated missing values of transformer T0001.
DatesH2CH4C2H4COCO2N206/09/198830,0017/10/19891210,0030/07/199080,016/04/199165300,0010/05/199564920,0031/05/19995870,0010/05/200089,023,00Table 3
Statistical data before any imputation.
VariableObsObs. with MVObs. without MVMeanStandard deviationH23122980,03419,320CH43113030,38710,246C2H43113031,08010,918CO311301174,400298,059CO2311309159,4673057,737O2310315591,9685126,700N23122971206,67910819,652The table of data containing missing values is presented in Table2 along with several data completion methods in turn. The table 4 shows the results of the different completion techniques.Table4 presents the statistical data after imputation by KNN and for a k-neighbor average equal to 5, by the mean and multiple. The results of Table 5 show that the imputation by KNN allows finding in the majority of the exact values.Table 4
Statistical data after imputations.
Imputation by KNN (k = 5)Imputation by meanImputation multipleVariableObsObs. with MVObs. without MVMeanStandard deviationMeanStandard deviationMeanStandard deviationH23103180,32318,73480,03418,66579,06419,062CH43103130,37410,07430,38710,07430,29110,088C2H43103130,81910,83231,08010,73430,77210,870CO310311174,903293,0621174,400293,0491184,598298,499CO2310319045,4843072,5979159,4673006,3429173,0763007,297O2310315591,9685126,7005591,9685126,705591,9685126,700N23103171286,03210399,78771206,67910264,42371291,44610547,466∗MV: missing value.Table 5
Evolution of imputed values.
Exact valuesI-KNNI-meanI-multipleH2808080,03468,664CH4303030,38727,411C2H4232331,0821,542CO1210119011741490,549CO2587056269159,4679581,353N2649206492071206,67982476,217The decomposition of mineral oil at low temperatures produces relatively large quantities of low molecular-weight gases such as hydrogen (H2) and methane (CH4). To better observe the evolution of these two quantities after different imputations presented in Table 5, a weighting of nitrogen (N2), carbon dioxide (CO2), and carbon monoxide (CO) is made.Figure2 shows the evolution of the exact values of the variables before any simulation of missing data (in blue) and the variations of these data after their imputation created by simulation. It can be seen from this figure that the evolution of the data imputed by KNN (in orange) is closer to that of the exact values. The imputation by KNN is robust because its standard deviation and its mean are less sensitive to the variations of the data. Example: H2 and N2 before imputation have, respectively, a mean of 80.034–71206.679 and a standard deviation of 19.320–10819.652. After imputation by KNN, they have 80.323–71286.032 and a standard deviation of 18.734–10399.787. The table of completed data after imputation by KNN is presented in Table 6.Figure 2
Evolution of imputed variables.Table 6
Data completed after imputation by KNN.
DatesH2CH4C2H2C2H4C2H6COCO2O2N225/01/198585,0040,000,0055,0052,001290,0011500,006380,0072600,0023/10/198689,0041,000,0044,0048,001403,0015092,008203,0078927,0015/12/198690,0035,000,0037,0048,001310,0012000,0010600,0079600,0008/06/198780,0040,000,0046,0047,001160,0010400,0013700,0082500,0006/09/198880,0030,002,0034,0042,001200,0010600,008710,0070500,0017/05/198985,0040,002,0039,0050,001190,0010800,003800,0068500,0017/10/198990,0040,002,0036,0048,001190,0011200,007130,0064200,0030/07/199080,0030,002,0031,0039,001080,009680,009360,0073800,0016/04/199190,0030,002,0022,0044,001150,0010400,007580,0073800,0020/04/199285,0037,000,0032,0046,001262,0011344,001092,0067199,0014/08/199294,0057,000,0034,0049,001391,0011694,003422,0097388,0002/11/199286,0033,000,0034,0045,001317,0011218,001331,0063320,0029/04/199373,0029,000,30030,0043,001172,0010802,001574,0058747,0002/08/199372,0033,000,0029,0040,001158,0010906,004266,0062380,0022/12/199374,0035,000,0027,0044,001278,0010899,003140,0074873,0001/05/199534,005,300,002,7002,700242,001181,0019996,0064920,0010/05/199534,005,300,002,7002,700242,001181,0019996,0064920,0029/10/1997107,0024,000,0019,0014,001153,005626,00454,0066308,0031/05/1999101,0026,000,30023,0016,001192,005626,004709,0065210,0010/05/200089,0026,000,0023,0018,001177,006476,002595,0077360,0010/05/200089,0026,000,0023,0018,001177,006476,002595,0077360,0015/05/2001132,0044,000,0039,0033,001929,0012520,005494,00105155,0013/11/200194,0030,000,0030,0022,001349,007976,00875,0064907,0006/05/200270,0025,000,0026,0019,001171,007416,003512,0063358,0014/10/200373,0028,000,0032,0021,001167,006446,00575,0060260,0013/05/200458,0023,000,0026,0020,00978,006999,00403,0059725,0014/05/200566,0025,001,1029,0021,001220,008354,001067,0064411,0010/05/200669,0026,000,0033,0023,001186,008099,002561,0067380,0017/05/200768,0025,000,0035,0024,001211,009018,006181,0064829,0022/05/200869,0024,000,0038,0023,001184,008205,002816,0064983,0017/06/200984,0029,000,0044,0029,001293,0010276,009234,0077994,00The error in absolute value after the different imputations is given by(16)Error=yi−yyi,where yi represents the imputed value and y is the exact value.Figure3 shows us that the error committed by imputing the 6 gases by the k-nearest neighbors (KNN) has an average error percentage of 2%, 17.5% by the average, and 23.65% by multiple imputations.Figure 3
Change in error due to imputation.


## 4.2. Data Compression Based on PCA

One of the applications of principal component analysis is compression. PCA consists of synthesizing the number of observed variables, i.e., summarizing the information contained in the data table, into a reduced set of linear combinations of the initial variables, taking care to minimize the loss of information. The table of data imputed by thek-nearest neighbors is subjected to compression by PCA, and the results are obtained from the Anaconda (Python) and XLStat software.Table7 and Figure 4 show that the first eigenvalue λ is 5.054 and represents 56.153% of the variability (inertia I). This means that if we represent the data on two axes, then we will always have 71.299% of the total variability preserved. Each eigenvalue corresponds to a factor. Each factor is a linear combination of the starting variables. In principal component analysis, the problem is to be able to determine the dimension of the optimum representation space. It is a question of preserving all the stable and important characteristics of the data studied while ignoring the unstable and meaningless axes [24].Table 7
Eigenvalues and inertia.
F1F2F3F4F5F6F7F8F9λ5,0541,3631,1410,7990,2950,1730,1260,0330,014Inertia (%)56,15315,14612,6838,8783,2811,9271,4050,3720,156% Cumule56,15371,29883,98192,85996,14098,06799,47299,844100,000Figure 4
Eigenvalue distribution on the axes.


### 4.2.1. Number of Axes to Retain

In practice, the only criteria applicable to the choice of the number of axes are empirical, the best known of which is that of Kaiser: in reduced centered data, we retain the principal components corresponding to eigenvalues greater than 1, which means that we are only interested in those components that «contribute» more than the initial variables [25]. We also use the broken sticks test and the kink rule, which consist of detecting the existence of a kink in the eigenvalue diagram. Figure 5 shows the kink thus formed, and Table 8 shows the results of the different tests.Figure 5
Observation of the middle elbow.Table 8
Boundary values of the broken sticks test and the Kaiser threshold.
AxesF1F2F3F4F5F6F7F8F9Eigenvalues5,0541,3631,1410,7990,2950,1730,1260,0330,014bk2,8281,8281,3280,9950,7450,5450,3790,2360,111Kaiser threshold1,1881,1881,1881,1881,1881,1881,1881,1881,188For the Kaiser threshold:(17)λ>1+2p−1n−1⟶λ>1+29−131−1=1,188.For broken sticks:bk=∑m=kp1/m The component is validated if λk>bk.The calculation of the threshold of the eigenvalues is given by the expression (17) where λ is the eigenvalue, p is the number of variables, and n is the number of observations.The use of the threshold (Kaiser-Saporta), and elbow (Cattell) rules limits the number of axes to two, while the broken sticks test (Frontier 1976) limits the number of axes to be retained to one. All of these approaches are consistent in that only one factor or axis appears to be sufficient in this study. For the sake of future interpretation and rotation of the axes, we have opted to maintain two axes as recommended by the elbow and Kaiser methods.


### 4.2.2. Observations

The study of the observations consists of examining their coordinates and especially their graphic representations. Figures6 and 7 show the evolution of the two components retained according to the type of pretreatment applied.Figure 6
Evolution of component 1.Figure 7
Evolution of component 2 [26].The reference variable here is SI (without imputation), which represents the component retained at the end of the principal component analysis without having first carried out an imputation.To take just one example, on 15/05/2001, the components F1 without imputation (F1 SI), with imputation by thek-nearest neighbors + principal component analysis (F1 Iknnacp), with imputation by the mean + principal component analysis (F1 Imoyacp), and with multiple imputation + principal component analysis (F1 Imacp) have the values 4.142, 4.213, 4.167, and 3.917, respectively. The results show that, for component 1, the preprocessed data are faithful to the reference with a few precisions.For the same example, on 15/05/2001, the F2 components without imputation (F2 SI), with imputation by thek-nearest neighbors + principal component analysis (F2 Iknnacp), with imputation by the mean + principal component analysis (F2 Imoyacp), and with multiple imputation + principal component analysis (F2 IMacp) have, respectively, values −1.723, −1.822, −1.257, and 1.406. These results show that, for component 2, the preprocessed data with KNN + PCA imputation are more faithful to the reference data (F2 SI) with a few precisions. The combination of these two elements (KNN + ACP) produces the best accuracy for the T0001 transformer DGA dataset of different sizes and different percentages of missing values.


## 4.2.1. Number of Axes to Retain

In practice, the only criteria applicable to the choice of the number of axes are empirical, the best known of which is that of Kaiser: in reduced centered data, we retain the principal components corresponding to eigenvalues greater than 1, which means that we are only interested in those components that «contribute» more than the initial variables [25]. We also use the broken sticks test and the kink rule, which consist of detecting the existence of a kink in the eigenvalue diagram. Figure 5 shows the kink thus formed, and Table 8 shows the results of the different tests.Figure 5
Observation of the middle elbow.Table 8
Boundary values of the broken sticks test and the Kaiser threshold.
AxesF1F2F3F4F5F6F7F8F9Eigenvalues5,0541,3631,1410,7990,2950,1730,1260,0330,014bk2,8281,8281,3280,9950,7450,5450,3790,2360,111Kaiser threshold1,1881,1881,1881,1881,1881,1881,1881,1881,188For the Kaiser threshold:(17)λ>1+2p−1n−1⟶λ>1+29−131−1=1,188.For broken sticks:bk=∑m=kp1/m The component is validated if λk>bk.The calculation of the threshold of the eigenvalues is given by the expression (17) where λ is the eigenvalue, p is the number of variables, and n is the number of observations.The use of the threshold (Kaiser-Saporta), and elbow (Cattell) rules limits the number of axes to two, while the broken sticks test (Frontier 1976) limits the number of axes to be retained to one. All of these approaches are consistent in that only one factor or axis appears to be sufficient in this study. For the sake of future interpretation and rotation of the axes, we have opted to maintain two axes as recommended by the elbow and Kaiser methods.


## 4.2.2. Observations

The study of the observations consists of examining their coordinates and especially their graphic representations. Figures6 and 7 show the evolution of the two components retained according to the type of pretreatment applied.Figure 6
Evolution of component 1.Figure 7
Evolution of component 2 [26].The reference variable here is SI (without imputation), which represents the component retained at the end of the principal component analysis without having first carried out an imputation.To take just one example, on 15/05/2001, the components F1 without imputation (F1 SI), with imputation by thek-nearest neighbors + principal component analysis (F1 Iknnacp), with imputation by the mean + principal component analysis (F1 Imoyacp), and with multiple imputation + principal component analysis (F1 Imacp) have the values 4.142, 4.213, 4.167, and 3.917, respectively. The results show that, for component 1, the preprocessed data are faithful to the reference with a few precisions.For the same example, on 15/05/2001, the F2 components without imputation (F2 SI), with imputation by thek-nearest neighbors + principal component analysis (F2 Iknnacp), with imputation by the mean + principal component analysis (F2 Imoyacp), and with multiple imputation + principal component analysis (F2 IMacp) have, respectively, values −1.723, −1.822, −1.257, and 1.406. These results show that, for component 2, the preprocessed data with KNN + PCA imputation are more faithful to the reference data (F2 SI) with a few precisions. The combination of these two elements (KNN + ACP) produces the best accuracy for the T0001 transformer DGA dataset of different sizes and different percentages of missing values.


## 5. Conclusion

In this paper, an approach for preprocessing power transformer maintenance data is proposed. This approach uses both KNN completion with the Euclidean metric to impute quantitative data and a PCA whose function here is the management of redundant values and especially the compression of a large amount of data. This preprocessing approach, i.e., imputation by KNN completion and PCA, was rigorously compared to two other approaches, such as imputation by the mean + PCA and multiple imputation + PCA. It is clear that for 6 missing values, thek-nearest neighbor imputation and for k = 5, the error committed is around 2%, while the multiple and the mean imputation have 23.65% and 17.5% errors, respectively. Similarly, to observe low molecular weight gases produced at low temperatures such as hydrogen (H2) or methane (CH4), the weighting of nitrogen (N2), carbon dioxide (CO2), and carbon monoxide (CO) is performed (Figure 2). The KNN + ACP preprocessing is robust because the standard deviation and mean obtained by KNN completion are less sensitive to data variations and present results close to reality on the one hand, and on the other hand, the amount of starting data is considerably reduced while keeping the originality of the starting data at the maximum. For 31 observations and 9 variables, the Kaiser threshold is 1.188, which allowed us, in this case, to retain 2 components based on the kink principle and the eigenvalue threshold. Experiments conducted using this proposed combination show significant performance, especially when the percentage of variables and missing values in the dataset would be high.



---

*Source: 8546588-2022-10-03.xml*