## 9 Conclusions and Future Work  
Building efficient and effective AMiDS systems to detect intrusions in MioT and CioT environments requires the AMiDS model to be trained using low-complexity models and a sufficient dataset representing real-world events. However, such ground truth data may not be available due to data scarcity, data restrictions, or both. As a result, the use of synthesized and simulated data is common in such situations. However, synthetic data can be unrealistic and potentially biased, and simulated data can become irrelevant and obsolete. While using ground truth data to train models is highly desirable, the existing real-time data are usually imbalanced, thus leading to undesired results, such as prediction inaccuracies. Data-driven learning using imbalanced learning methods to sample, resample, and generate ground truth data can lessen the adverse impact of imbalanced data on the performance and prediction accuracy of low-complexity AMiDS models. This study examined the impact of imbalanced learning on the performance of two low-complexity AMiDS models. Figure 15: Better-case scored AMiDS model performance based on the weighted average. \begin{table}
\begin{tabular}{c c c c c c c} \hline \hline
**Method** & **A** & **P** & **R** & **F** & **AUC** & \
\begin{tabular}{c} **Training** \\ **Time (s)** \\ \end{tabular} &
\begin{tabular}{c} **Inference** \\ **Time (s)** \\ \end{tabular} \\ \hline PCA-based AMiDS (KMS) & 0.97 & 0.97 & 0.0.97 & 0.97 & 0.75 & 1.36 & 0.23 \\ PCA-based AMiDS (ROS) & 0.97 & 0.97 & 0.97 & 0.75 & 1.73 & 0.18 \\ PCA-based AMiDS (SMT) & 0.97 & 0.97 & 0.97 & 0.75 & 1.53 & 0.24 \\ PCA-based AMiDS (SMTEN) & 0.97 & 0.97 & 0.97 & 0.76 & 1.98 & 0.25 \\ PCA-based AMiDS (SMTEK) & 0.97 & 0.97 & 0.97 & 0.97 & 0.75 & 1.77 & 0.21 \\ PCA-based AMiDS (ENSMB) & 0.77 & 0.92 & 0.77 & 0.83 & 0.64 & 2.20 & 0.22 \\ PCA-based AMiDS (BALCAS) & 0.76 & 0.92 & 0.76 & 0.82 & 0.64 & 1.71 & 0.42 \\ PCA-based AMiDS (AE) & 0.97 & 0.88 & 0.94 & 0.91 & 0.50 & 1.62 & 0.22 \\ PCA-based AMiDS (VAEOS) & 0.94 & 0.89 & 0.94 & 0.92 & 0.50 & 0.68 & 0.20 \\ oSVM-based AMiDS (ROS) & 0.79 & 0.92 & 0.79 & 0.84 & 0.63 & 0.47 & 0.044 \\ oSVM-based AMiDS (SMTEK) & 0.80 & 0.91 & 0.80 & 0.85 & 0.60 & 0.48 & 0.063 \\ oSVM-based AMiDS (BALCAS) & 0.82 & 0.91 & 0.82 & 0.86 & 0.56 & 0.006 & 0.004 \\ oSVM-based AMiDS (AE) & 0.94 & 0.94 & 0.94 & 0.91 & 0.5 & 0.26 & 0.03 \\ \hline \hline \end{tabular}
\end{table} 
Table 35: Performance of the best-case scored AMiDS model based on the weighted average under imbalanced learning conditions. Given the distribution of the normal and anomalous events, these ground truth data can be highly imbalanced. Imbalanced learning using the ROS and SMTEK methods significantly improved the performance of the PCA-based AMiDS model. Additionally, it boosted the performance of the oSVM-based AMiDS model compared to regular learning. On the other hand, the oSVM-based model performed better than the PCA-based model when using imbalanced learning when the BALCAS ensemble-based method was applied. When considering regular learning, both models significantly improved under imbalanced learning conditions. In addition, the PCA-based AMiDS model performed significantly better than the oSVM-based AMiDS model when using imbalanced learning when applying the KMS and SMTEN methods. However, using the EENSMB methods only boosted the performance of the PCA-based AMiDS model. Invariably, imbalanced learning improved the performance of the AMiDS models compared to regular learning, where the models performed poorly. Nonetheless, the methods used in this study did not achieve equally significant performance gains. Therefore, choosing the appropriate sampling or resampling method for imbalanced learning depends primarily on the AMiDS model.