# Dissolved Gas Analysis for Fault Prediction in Power Transformers Using Machine Learning Techniques
## 4 Results and Discussion  
The following MLMs have been used in this study to diagnose faults and to prevent costly problems: random forest (RF), backpropagation neural network (BPNN), K-nearest neighbors (KNN), support vector machine (SVM), decision tree (DT), and Naive Bayes (NB). Information gain (IG) has been used as a feature selection method in all these MLMs. The datasets used in this research include 628 samples from DGA. Five gas concentrations are used in this work, which were obtained from the DGA dataset. The dataset of the transformer is classified into two states: normal and faulty, with the faulty state further divided into different cases depending on the gas concentration. The fault types are overheating (OH), partial discharge (PD), and arcing. This work has included a combination of conventional DGA and machine learning classification algorithms for diagnosing the transformer faults. In the classification process, cross-validation data (CV) are considered part of the training data to ensure that the classification results are independent of the training and testing datasets. Therefore, after the data were divided into training (80%) and testing (20%) sets for the algorithms, the cross-validation data were considered part of the training and had nothing to do with the testing. The results were classified with tenfold cross-validation (CV = 10) and compared. Fault diagnosis was examined in three different cases (DTM, DRM, and RRM) according to the dataset used, and the results were obtained. The parameters of the MLMs used in this work are listed in Table 4.  
The results were examined using six important measures to reduce the scope of uncertainty; predictions based on correlation are likely to be more reliable and closer to reality. The metrics included accuracy, precision, recall, specificity, F1 score, and Matthews correlation coefficient. The accuracy ratio can be expressed as follows [32; 33]:  
\[\text{Accuracy Ratio}=\frac{\text{No. of\leavevmode\
obreak\ \text{\small{\it corrected\leavevmode\
obreak\ Results}}}\left(\text{True \leavevmode\
obreak\ \text{\small{\it Posive}}}+\text{True\leavevmode\
obreak\ \text{\small{\it Negative}}}\right)}{\text{Total\leavevmode\
obreak\ No. of\leavevmode\
obreak\ Results}} \tag{1}\]  
Precision was calculated by dividing the number of correct positive predictions (true positive) by the total number of instances the model predicted as positive (both true and false positives). \[\text{Precision}=\frac{\text{True\leavevmode\
obreak\ \text{\small{\it Positive}}}\left( \text{TP}\right)}{\text{True\leavevmode\
obreak\ Positive}\left(\text{TP} \right)+\text{False\leavevmode\
obreak\ Positive}\left(\text{FP}\right)} \tag{2}\] \begin{table}
\begin{tabular}{l l l} \hline \hline
**Machine Learning Method** & **Parameter** & **Value/Type** \\ \hline \multirow{6}{*}{RF} & No. of Trees & 25 \\ \cline{2-3}  & No. of Attributes at Each Split & 5 \\ \cline{2-3}  & Tree Limit Depth & 3 \\ \cline{2-3}  & Split Subset & \textgreater{}10 \\ \hline \multirow{6}{*}{KNN} & No. of Neighbors & 5 \\ \cline{2-3}  & Metric & Euclidean \\ \cline{2-3}  & Weight & Uniform \\ \hline \multirow{6}{*}{SVM} & Kernel & RBF \\ \cline{2-3}  & Cost & 1 \\ \cline{2-3}  & Regression Loss Epsilon & 0.1 \\ \cline{2-3}  & Optimization Numerical Tolerance & 0.001 \\ \hline \multirow{6}{*}{BPNN} & Hidden Layer & 100 \\ \cline{2-3}  & Activation & Logistic/Sigmoid \\ \cline{2-3}  & Regularization & 0.005 \\ \cline{2-3}  & Optimizer & Stochastic Gradient \\ \cline{1-1} \cline{2-3}  & Descent \\ \hline \hline \end{tabular}
\end{table} 
Table 4: Parameters and their values/types for the specified MLMs.