# Blockchain-Driven Intelligent Scheme for IoT-Based Public Safety System beyond 5G Networks
## 5 Result and Discussion
### Experimental Setup  
The proposed architecture utilizes a Google Colaboratory notebook for developing an intelligence layer that uses ML classifiers, Remix integrated development environment (IDE) for the blockchain layer, and MATLAB 2022a for the communication layer. The Google Colaboratory notebook is a web IDE for Python programming that uses various Python libraries such as Pandas, Numpy, Matplotlib, Sklearn, and Scipy for the ML classifiers. To simulate the working of the intelligent layer, we incorporated the Google Colaboratory notebook that uses ML classifiers and provides the classification of the data. Here, different ML classifiers, such as XGboost, RF, KNN, LR, and SVM, have hyperparameters that tailor the classifiers' behavior and improve performance. Table 3 depicts the parameters used in the proposed architecture. Here, _n_estimators_, _learning_rate_, and _max_depth_ are used for the XGBoost classifier, where _n_estimators_ represents the tree's count. Then, _learning_rate_ is used as the regularization parameter that shows the step size, and the _max_depth_ parameter controls the overfitting in the model. The RF classifier used _n_estimators_ value of 200 and _max_depth_ value of 1. Moreover, KNN uses the _n_neighbors_ parameter to show the total count of neighbors that are utilizedby default for the k-neighbors queries. Furthermore, the uniform weights specify that all points are equally weighted in each neighborhood. The LR classifier uses _random_state_ that shuffles the data and the \"lbfgs\" solver with _max_iter_ that uses the solvers to converge. For the SVM classifier, we use different parameters such as gamma, probability, and kernel. Here, we use rbf and linear kernel with the kernel coefficient value such as gamma = \"auto\", which means \(1/n\_features\).  
The classified data have sensitive and confidential information and require secure storage. Therefore, the classified data are stored in the IPFS-based blockchain network using a smart contract in the blockchain layer. The smart contract is implemented using solidity language on the Remix IDE with different functions, such as criminal behaviors() to identify the criminal, \(\textit{weapon}()\) to determine the crime type, \(\textit{addlocation}()\) to know the crime spot, \(\textit{updatecount}()\), and many more. The smart contract is deployed over the  
\begin{table}
\begin{tabular}{l l} \hline \hline  & **Hyperparameters Used by ML Classifiers** \\ \hline
**ML Classifiers** & **Parameters Used** \\ \hline XGBoost & n\_estimators: 100, learning\_rate: 0.1, max\_depth: 1 \\ RF & n\_estimators: 200, max\_depth: 5 \\ KNN & n\_neighbors: 5, weights: ‘uniform’ \\ LR & random\_state1: solver: lbfgs’, max\_iter: 100 \\ SVM & gamma: auto’, probability: True, kernel: [’rbf’,’linear’] \\ \hline \hline  & Communication Layer Parameters \\ \hline Frequency range & 75-110 GHz \\ Sub-carrier spacing & 240 KHz \\ Channel coding & Polar coding \\ Channel fading & com\_Rayleigh fading channel \\ Modulation & OFDMA \\ \hline  & Blockchain Layer Parameters \\ \hline Compiler language & Solidity \\ Network & Rinkeby’s \\ Environment & Remix VM \\ \hline \hline \end{tabular}
\end{table}
Table 3: Parameters of the proposed architecture.  
[PERSON]'s network. On a successful compilation and deployment of the smart contract, validated or authenticated data from the smart contract are forwarded to the IPFS-based public blockchain for secure storage. Further, the 6G network is simulated on MATLAB 2022a using a 5G toolbox. This is because there is not yet any open-source software available that provides 6G properties and can integrate that with real-world applications. Due to this constraint, we utilized a 5G-based simulation toolbox, where we changed the simulation parameters, for example, changing the bandwidth allocation, transmit power, sub-carrier spacing (240 KHz), and modulation (OFDMA) techniques of the 5G network to impersonate a 6G network.