# Blockchain-Driven Intelligent Scheme for IoT-Based Public Safety System beyond 5G Networks
## 5 Result and Discussion
### Performance Evaluation of the Proposed Architecture  
In this subsection, we discuss the results of the ML classifiers, blockchain, and 6G communication. First, we analyze the performance of the different ML classifiers, such as XGBoost, RF, KNN, LR, and SVM, for UAV-based public safety applications such as fire incidents, road accidents, and criminal activity. Here, ML classifiers are used to classify the data into attack means class 1 and nonattack means class 0. We considered the criminal activity dataset that has the crime type, location, weapon type, and criminal behavior records. These records are useful for classifying the arrest and nonarrest categories, which identifies whether the data are vulnerable to attack or not. Here, we fed 80% of the data into the ML classifier that provide training to the classifier. Then, the 20% testing dataset is passed into the ML classifier that validates the training dataset. It also ensures that the trained data will behave consistently and produce the expected results. Here, Figure 3 depicts the performance of the ML classifiers in terms of the accuracy, log loss score, and validation curve. The accuracy (\(\alpha\)) of the ML classifiers represents the ratio of the correctly predicted values out of a total number of predictions. Using an accuracy measure, we know how many times the ML classifier correctly classified the dataset. We can express accuracy in true positive (\(\mathcal{T}_{\rho}\)), false positive (\(\mathcal{F}_{\rho}\)), true negative (\(\mathcal{T}_{\eta}\)), and false negative (\(\mathcal{F}_{\eta}\)) values that are used to represent the number of correct and incorrect predictions of the proposed ML classifier. During the simulation, we observe that a single accuracy parameter is insufficient to remark on the best ML classifier. Therefore, we require additional measures such as precision (\(\beta\)) and recall (\(\gamma\)). Precision represents the correctness of the ML classifier. It determines how good the classifier is at predicting a specific class. It shows the ratio between the true positive samples and all the positive outcomes \(\mathcal{T}_{\rho}+\mathcal{F}_{\rho}\). The recall measure represents the count, which shows how many times the ML classifier was able to determine a specific class. It gives the ratio between true positive samples out of all the cases of true positive and false negative samples \(\mathcal{T}_{\rho}+\mathcal{F}_{\eta}\). Furthermore, harmonic mean of the precision and recall is called F1-score (\(\delta\)). The mathematical representation of these performance measures are represented as follows:  
\[\alpha=\frac{\mathcal{T}_{\rho}+\mathcal{T}_{\eta}}{\mathcal{T}_{\rho}+ \mathcal{F}_{\rho}+\mathcal{T}_{\eta}+\mathcal{F}_{\eta}} \tag{13}\]  
\[\beta=\frac{\mathcal{T}_{\rho}}{\mathcal{T}_{\rho}+\mathcal{F}_{\rho}} \tag{14}\]  
\[\gamma=\frac{\mathcal{T}_{\rho}}{\mathcal{T}_{\rho}+\mathcal{F}_{\eta}} \tag{15}\]  
\[\delta=2*\frac{\beta*\gamma}{\beta+\gamma} \tag{16}\]  
Figure 3a illustrates the accuracy of the different ML classifiers such as XGBoost, RF, KNN, LR, and SVM. From the graph, we found that XGBoost classifier gives better accuracy (87.93%) compared to the other classifiers because it handles sparse data and executes parallel computing. On the contrary, SVM did not perform well because it required high  
training time for the large dataset. Table 4 shows that the XGBoost classifier outperforms any other ML classifiers in terms of accuracy, precision, recall, and F1-score. To further measure the ML classifier's performance, we used a log loss score that indicates how close the prediction probability is to the corresponding actual value in the binary classification case. It represents the probabilities of the correct class label, which means that if the predicted probability is high, it will obtain a low log loss core and vice versa. Figure 3b shows the log loss score of the different ML classifiers that evaluate the performance of the classifiers.