## 3 Materials and Methods  
The artificial neural network (ANN) used in this study, as shown in Figure 4, was the pattern recognition artificial neural network (PRN) composed of 5 neurons in the input layer (represented by the production of the combustible gases H\({}_{2}\) (hydrogen), CH\({}_{4}\) (methane), C\({}_{2}\)H\({}_{2}\) (acetylene), C\({}_{2}\)H\({}_{4}\) (ethylene) and C\({}_{2}\)H\({}_{6}\) (ethane)), 5 or 10 neurons in the hidden layer (a comparison) and 3 neurons in the output layer, represented by 1--the transformer normal operating condition, 2--thermal faults, and 3--electrical faults. After an extensive series of tests, it was concluded that it would be essential to allocate 10 neurons in the hidden layer instead of 5. This decision was motivated by the striking similarity between the samples, mainly the samples that produced the fault outputs, 2--thermal and 3--electrical, resulting from the common characteristics they presented, which justified the need to increase the number of neurons in the hidden layer. From 10 neurons on in the hidden layer, training started to get worse. Pattern recognition artificial neural networks (PRNs) are feedforward networks designed to classify inputs into predefined target classes. In pattern recognition networks, the target data typically comprises vectors containing all zeros except for a 1 in the element corresponding to the class it represents [26]. In pattern recognition problems, it is desired that a neural network classifies inputs into a set of target categories. For example, classify the operating condition of a power transformer as normal, thermal faults, or electrical faults based on combustible gases concentrated inside them. There are two classification methods in pattern recognition: supervised and unsupervised. To apply supervised pattern recognition, a large set of labeled data is required. If these are not available, an unsupervised approach can be applied. This work presents a supervised approach. Figure 3: Distribution of the 72 samples classified as electrical failure: (**a**) samples of H\({}_{2}\); (**b**) samples of CH\({}_{4}\); (**c**) samples of C\({}_{2}\)H\({}_{2}\); (**d**) samples of C\({}_{2}\)H\({}_{4}\); and (**e**) samples of C\({}_{2}\)H\({}_{6}\). The scaled conjugate gradient backpropagation (SCG) is a training function for neural networks that iteratively updates weight and bias values. It utilizes the scaled conjugate gradient method, which is applicable to any network, provided its weight, net input, and transfer functions possess derivative functions. Backpropagation is employed to compute the derivatives of performance concerning the weight and bias variables [26]. SCG was the training function used in this work. The PRN network employed the hyperbolic tangent function as activation in the hidden layer, defined by Equation (1). On the other hand, for the output layer, the softmax function was adopted, represented by Equation (2). \[f(u)=\frac{(1-e^{-tu})}{(1+e^{-tu})} \tag{1}\]  
where \(t\) is an arbitrary constant, corresponding to the slope of the curve. \[f(u)=\frac{e^{u}}{\sum e^{u}} \tag{2}\]  
The softmax function accepts a vector u containing K real numbers as input and transforms it into a probability distribution comprising K probabilities. These probabilities are proportional to the exponentials of the input numbers, ensuring normalization. In other words, before applying the softmax, some components of the vector may be negative or greater than one and may not sum to 1. However, after applying the softmax, each component will be in the range (0, 1), and the components will sum to 1 so that they can be interpreted as probabilities. Additionally, higher input components will correspond to higher probabilities [21]. Figure 4: ANN used in this work (classified by pattern recognition network —PRN). Weights (w): Weights are real values assigned to each input/feature to indicate the importance of that specific characteristic in classifying the final output.