## 6 Simulation Results and Discussion  
In this section, to evaluate the family violence prediction accuracy of three ML algorithms (RF, LR, and NB) for our data set, we conduct comprehensive experiments. For our study, 511 responses are considered from the data collection. In our data set, we consider that family violence occurred in 229 families, and family violence did not occur in 282 families. We break our array of data into two sections, where 80% is included in the training phase and the corresponding 20% is also included in the testing set. We used a 10-fold cross-validation approach to assess the prediction performance of the three ML algorithms.  
We created a confusion matrix for the test data to evaluate the predication performance of the three ML algorithms. We assume an imbalanced data set and a balanced data set to create a confusion matrix.  
Now, we want to check the four measurement criteria of three ML algorithms for our data set. From Figure 7, we can see that the prediction accuracy of RF, LR, and NB algorithms for the imbalanced data set is 64%, 61%, and 58%, respectively. In this case, the RF algorithm provided the highest accuracy, precision, recall, and F1-score values than LR and NB algorithms. Whereas the NB algorithm provided the lowest accuracy, precision, recall, and F1-score values. Therefore,the LR algorithm provided better detection performance than the other two algorithms for our imbalanced data set.  
Figures 8-10 show the confusion matrix after balanced data and normalization for RF, LR, and NB algorithms, respectively.  
Figure 6: Confusion matrix before balanced data and normalization for NB.  
Figure 7: Percentage of classification results with imbalanced data set.  
Figure 8: Confusion matrix after balanced data and normalization for RF.  
Figure 9: Confusion matrix after balanced data and normalization for RF.  
From Figures 4-6 and 8-10, it can be summarized that the prediction performances of RF, LR, and NB algorithms are better for the balanced data set compared to the imbalanced data set.  
We used the SMOTE technique to handle the imbalanced data set. For the balanced data set, the prediction performances of RF, LR, and NB algorithms are improved when compared to the imbalanced data set. From Figure 11, we observe that the prediction accuracies of RF, LR, and NB algorithms for balance data set is 77%, 69%, and 62%, respectively. In this case, the RF algorithm provided the highest detection accuracy, precision, recall, and F1-score values than the LR and NB algorithms. Whereas the NB algorithm provided the lowest detection accuracy, precision, recall, and F1-score values. Therefore, the RL algorithm provided better detection performance than the other two algorithms for our balanced data set.  
Figure 11: Percentage of classification results with balanced data set.  
Figure 10: Confusion matrix after balanced data and normalization for NB.  
From Figures 7 and 11, it can be summarized that the prediction performances of RF, LR, and NB algorithms are better for the balanced data set when compared to the imbalanced data set. Moreover, the RL algorithm provided good family violence detection accuracy for the imbalanced and balanced data set.