## 3 Experimental Results and Analysis  
As discussed earlier, we used three sets of features to deeply analyze the behavior of algorithms. Table 3 shows the comparison of accuracies of models for the original feature set along with extracted feature sets. We observe that 14 features is the optimal number of features that achieves the best accuracies for all classifiers used. The dropping of features has resulted in a significant decrease in accuracy. We can see in other sets of features that when the feature'subcategory_UDP' has been dropped, then the accuracy also decreases significantly. Furthermore, by analyzing and comparing the accuracies, we can deduce the model that can give the best performance if used as an IoT network intrusion detector. From the achieved results, it is evident that the Random Forest algorithm outperforms all other algorithms. With an optimal feature set, it gives an accuracy of 99.2%. With other feature sets, it also achieved the highest accuracies. The second-best performing classifier is the Naive Bayes algorithm, with an accuracy of 98.8%. Thus, by evaluating the accuracies of all the classifiers, we can obtain the idea of which classifier best suits NIDS concerning the IoT environment.  
Scalability and Computational Cost of the Proposed System  
The proposed INIDS, trained using the Random Forest classifier, demonstrates exceptional accuracy (99.2%) and robustness, making it an ideal candidate for IoT-based intrusion detection. However, we recognize the importance of addressing its scalability and computational cost, especially in larger datasets and complex IoT environments. Random Forest is a powerful ensemble learning method that excels in handling high-dimensional data, as it combines multiple decision trees to deliver accurate predictions while reducing overfitting. Although computationally more expensive than simpler models, such as Logistic Regression or Naive Bayes, its high accuracy and abil  
\begin{table}
\begin{tabular}{l c c c c c c c} \hline \hline
**Feature Set** & **LR** & **SVM** & **KNN** & **NB** & **DT** & **RF** & **ANN** \\ \hline Original feature set & 0.877 & 0.899 & 0.910 & 0.932 & 0.888 & 0.948 & 0.885 \\
14 features & 0.926 & 0.963 & 0.971 & 0.988 & 0.961 & 0.992 & 0.931 \\
11 features & 0.852 & 0.879 & 0.946 & 0.956 & 0.826 & 0.968 & 0.914 \\
10 features & 0.831 & 0.850 & 0.928 & 0.948 & 0.803 & 0.958 & 0.899 \\ \hline \hline \end{tabular}
\end{table}
Table 3: Relative accuracies of different cited supervised learning algorithms.  
relationships justify its selection for real-time IDS in many practical scenarios. To assess scalability, we conducted experiments with progressively larger subsets of the BoT-IoT dataset. The results revealed that the training time and inference time of Random Forest increase linearly with dataset size. However, the computational requirements remain manageable, especially with modern computing resources, such as multicore processors or distributed computing systems. Moreover, techniques such as parallelization, dimensionality reduction, and optimized hyperparameter tuning can further enhance its efficiency and scalability.  
In real-time IoT scenarios, where computational resources may be constrained, simpler models like Naive Bayes, which achieved 98.8% accuracy in our experiments, can serve as a viable alternative when prioritizing speed over marginal gains in accuracy. However, in critical applications requiring the highest accuracy and reliability, the computational cost of Random Forest is a justified trade-off given its superior performance. This analysis highlights the versatility of INIDS in adapting to diverse IoT environments, with the choice of the classifier depending on the specific constraints and requirements of the application. Future work could further optimize Random Forest for resource-constrained devices by exploring techniques like pruning, incremental learning, or hybrid approaches that balance accuracy and computational efficiency. For detailed comparison in this regard, see Table 4.