## 4 Experimental Study
### Evaluation Metrics  
The performance evaluation in this study was performed using the metrics of accuracy, AUC, F1 score, and MSE. We found the precision and recall values using the equations below [24].  
\[\text{Precision}=\frac{\text{TP}}{(\text{TP}+\text{FP})} \tag{1}\]  
and  
\[\text{Recall}=\frac{\text{TP}}{(\text{TP}+\text{FN})} \tag{2}\]  
The F1 score is the harmonic mean of the precision and recall values, determined as follows:  
\[\text{F1}=\frac{2\cdot\text{Precision}\cdot\text{Recall}}{\text{Precision}+ \text{Recall}} \tag{3}\]  
\begin{table}
\begin{tabular}{c l l l} \hline \hline
**Algorithm** & \multicolumn{2}{c}{**Parameters**} & \multicolumn{1}{c}{**Optimal Values**} \\ \hline \hline \multirow{6}{*}{XGBoost} & n\_estimators: The number of boosting stages to perform. Gradient & \multirow{6}{*}{n\_estimators = 300, learning_rate = 0.1, max_depth = 100, maximum depth limits the number of nodes in the tree. We tune this parameter for the best performance; the best value depends on the interaction of the input variables.} \\ \cline{1-1} \cline{2-4}  & \multirow{2}{*}{n\_neighbors: Number of neighbors. It is configured between 2 and 30.} & \multirow{2}{*}{n\_neighbors = 3} \\ \cline{1-1} \cline{2-4}  & & criterion: \text{‘gini’ for the Gini impurity and ‘entropy’ for the information gain} & \multirow{2}{*}{criterion = ‘gini’} \\ \cline{1-1} \cline{2-4}  & \multirow{2}{*}{m\_measurements of the criterion of a split was used to identify the best} & & \\ \cline{1-1} \cline{2-4}  & & decision tree splitting candidate. & \\ \hline \hline \multirow{3}{*}{RF} & n\_estimators: The number of trees in the forest. It was configured to be between 10 and 100 and increased in steps of 10. & \multirow{3}{*}{n\_estimators = 100, criterion = ‘gini’} \\ \cline{1-1} \cline{2-4}  & & criterion: \text{‘gini’ and “entropy” were used as splitting criteria.} & \\ \hline \hline \end{tabular}
\end{table}
Table 4: Parameter setup for the compared classifiers.  
\begin{table}
\begin{tabular}{c c c c} \hline \hline
**Class** & **Total** & **Train 70\%** & **Test 30\%** \\ \hline Low & 35,765 & 25,111 & 10,654 \\ Medium & 24,561 & 17,121 & 7440 \\ High & 9505 & 6649 & 2856 \\ Total & 69,831 & 48,881 & 20,950 \\ \hline \hline \end{tabular}
\end{table}
Table 3: Description of classes for experimental datasets.  
We studied three-class cases, where the average of the F1 score for each category is weighed against the average parameter from Equation (3). Accuracy is a measure of the degree to which the calculated value is close to the actual value. Accuracy is the sum of the true positive fractions and the actual negative fractions of all the test data, expressed as Equation (4).  
\[\text{Accuracy}=\frac{\sum\text{True positive}+\sum\text{True negative}}{\sum\text{Total population}} \tag{4}\]  
In addition, one of the measures we evaluated was the mean squared error (MSE) relative to the actual values for risk predictions of NG leaks [36].  
\[\text{MSE}=\frac{1}{mn}\sum_{i=0}^{m-1}\sum_{i=0}^{n-1}[X(i,\,j)-Y(i,\,j)]^{2} \tag{5}\]  
with \(m\) and \(n\) referring to the number of observations, where \(m\) is the number of data instances and \(n\) serves to predict NG leakage. Here, \(X\) and \(Y\) are the actual and predicted values for the \(i\) and \(j\)th data points, respectively.