# Dissolved Gas Analysis for Fault Prediction in Power Transformers Using Machine Learning Techniques
## 3 Methodology and Machine Learning Methods (MLMs)
### MLMs
#### 3.1.4 Support Vector Machine (SVM)  
The support vector machine classifies the dataset by constructing several hyperplanes that enable clear discrimination between the multiple classes present in the training dataset [29]. The SVM falls under the category of a kernel-based approach. A hyperplane is selected to maximize the margin between the different classes. The kernel function is used to ascertain the path of the hyperplane. The advantages of the SVM include its high accuracy in prediction for classification problems, but the training process is very time-consuming. In this regard, the BO technique has been applied to identify the most optimal parameters during the training of the support vector machine algorithm. The most critical decisions to be considered that may be dealt with for improvement in the SVM technique include the selection of the kernel function, the scale of the kernel, the box constraint level, the cautious approach, and the normalization of the dataset. The stages of the SVM algorithm are as follows:  
Set regularization parameter (C)  
Set RBF (exp(-gamma * | | x1 - x2 | '2)) as a kernel  
Set tolerance for stopping criterion (tol)  
Set maximum number of iterations (max_iter)  
Set weights (w) to zero  
Set bias (b) to zero  
For each iteration in range(max_iter):  
For each training sample (x\({}_{i}\), y\({}_{i}\)):  
Compute margin: margin = y\({}_{i}\) * (dot(w, x\({}_{i}\)) + b)  
If margin < 1 then  
w = w + C * y\({}_{i}\) * x\({}_{i}\)  
b = b + C * y\({}_{i}\)  
Normalize weights by w = w/ | | w | |  
3.1.5. Decision Tree (DT)  
A decision tree is composed of four general parts: a root node, branches, internal nodes, and a leaf node [30]. Within the classification processes of the DT method, the information of each attribute is assessed and utilized to separate datasets. A BO technique is used to obtain the best values of the DT's hyperparameters, including the maximum number of splits and the split criterion. The technique is not only superfluous but also cumbersome as it entails removing the branches that are not effective in the classification process to arrive at the last decision tree model. The stages of the DT algorithm are as below:  
if all Dataset are in the same class:  
return the class label of dataset  
else if Features is empty:  
return the majority class label of dataset  
else if Dataset is empty:  
return the majority class label of parent node  
else:  
best_feature = choose_best_feature(features, dataset)  
tree = new TreeNode(best_feature)  
for each value v in best_feature:  
subset = dataset where best_feature = v  
subtree = DecisionTree(subset, features - {best_feature})  
tree.add_child(v, subtree)  
return tree  
3.1.6. Naive Bayes (NB)  
The Naive Bayes (NB) classifier relies on the use of Bayes' theorem throughout the classification process [31]. This approach presupposes that the input characteristics are independent of each other when determining the output classes in the classification process. The Naive Bayes (NB) algorithm outperforms the support vector machine (SVM) and elastic net (EN) methods in terms of training speed. Additionally, NB is particularly well suited for training huge datasets. The ideal parameters of the Naive Bayes classifier are calculated via Bayesian optimization during the training step. The ideal parameters for the NB technique consist of the names of the distributions and the kind of kernel.