## 4 Proposed Model
### Performance Metrics  
The objective of NTL detection is to minimize the inspection cost and maximize the electricity theft detection. Performance metrics are computed from confusion matrix which is shown in Figure 11. It is used to evaluate the performance of a classifier on test data. This matrix is appropriate when we have a verified number of thefts in a dataset [41]. From this matrix, four possible outcomes are generated. These outcomes are True Positive (T+), False Positive (F+), True Negative (T-), and False Negative (F-). In T+, classifier correctly detects thefts as Fraudsters. In F+, normal users are detected as theft by the classifier. In T-, normal users are correctly identified by classifier. Whereas in F-, thefts are detected as normal users by the classifier. These outcomes are then used to calculate precision, recall, and F1-score. In this research, we have used precision, F1-score, recall, and ROC curve [19]. \[Precision=\frac{True^{+}}{True^{+}+False^{+}} \tag{8}\]  
\[Recall=\frac{True^{+}}{True^{+}+False^{-}} \tag{9}\]  
\[F1-Score=(1+\beta^{2})\times\frac{Precision\times Recall}{\beta^{2}\times Precision +Recall} \tag{10}\]  
\[ROC=\frac{Recall+Specificity}{2} \tag{11}\]  
Figure 11: Confusion matrix. Precision, recall, F1-score, ROC curve, and Root Mean Square Error (RMSE) are important metrics for model evaluation. Table 4 and Figure 12 show the comparison of existing techniques with proposed model based on different performance metrics. The precision value of CNN is 0.65, which is lowest among all models, while BGRU has the highest precision value which is 0.80. Likewise, the precision values of LR, RF, and SVM are 0.72, 0.72, and 0.69, respectively. Similarly, the lowest recall valve is 0.58 for SVM and 0.89 for the proposed model which is highest recall value. Recall values of LR, RF, and CNN are 0.73, 0.70, and 0.73, respectively. The F1-score of BGRU, LR, RF, SVM, and CNN is 0.85, 0.65, 0.60, 0.56, and 0.85, respectively. FPR is considered as an important performance metric. In FPR, normal users are classified as theft, which raises the model's misclassification rate. If FPR is high, the inspection cost is also high. The objective of NTL detection is to minimize the inspection cost. We have calculated the FPR of benchmark models as shown in Figure 13. The proposed model has the lowest FPR of 0.06, whereas SVM has the highest FPR. The ROC curve is another performance metric for classification problems. It tells us how confident our model is to differentiate between the normal and theft users. Figure 13 shows the ROC curve of the proposed BGRU model. The value of ROC curve is 0.86 of BGRU model. The score of ROC curve improved greatly by applying the SOSTLink method. We also calculate the RMSE of our proposed model and also for comparison techniques. RMSE gives relatively high weights to large errors and it is very useful when large errors are undesirable. It takes the average of root square of errors. The formula of RMSE is as follows,  
\[RMSE=\sqrt{\Sigma_{i=1}^{n}(a_{i}-b_{i})^{2}} \tag{12}\] \begin{table}
\begin{tabular}{c c c c c c} \hline \hline
**Models** & **Precision** & **Recall** & **F1-Score** & **ROC Curve** & **RMSE** \\ \hline LR & 0.72 & 0.73 & 0.65 & 0.73 & 0.33 \\ RF & 0.72 & 0.70 & 0.60 & 0.70 & 0.40 \\ SVM & 0.69 & 0.58 & 0.56 & 0.57 & 0.31 \\ DT & 0.75 & 0.71 & 0.72 & 0.70 & 0.22 \\ CNN & 0.65 & 0.73 & 0.85 & 0.65 & 0.22 \\ LSTM & 0.72 & 0.71 & 0.72 & 0.82 & 0.21 \\ MLP-CNN & 0.71 & 0.67 & 0.68 & 0.81 & 0.23 \\ Our Proposed BGRU & 0.80 & 0.89 & 0.85 & 0.86 & 0.04 \\ \hline \hline \end{tabular}
\end{table} 
Table 4: Performance metrics. Figure 12: Comparison of BGRU with other techniques. RMSE calculates the distance between actual sample and predictied sample. The RMSE of BGRU is 0.044, which is lowest as compared to other existing deep learning models as shown in Figure 14; however, the RMSE of RF is highest at 0.400. The existing techniques have low ROC curve as compared to the proposed model.