## 6 Results
### Comparison with Related Work  
This study compared S-2 EC-ERF with EES-WCA-SVM and EES-WCA-MLP in [26]. Figure 8: Comparison of mean energy consumption between S-2 EC-ERF, S-2 EC-LR, S-2 EC-DT, and S-2 EC-Ada. Figure 9: Comparison of end-to-end delay between S-2 EC-ERF, S-2 EC-LR, S-2 EC-DT, and S-2 EC-Ada. When analyzing the packet delivery ratio in the shade of varying numbers of attack nodes ranging from 5 to 25, significant disparities became apparent among S-2 EC-ERF, EES-WCA-SVM, and EES-WCA-MLP, as depicted in Figure 10. S-2 EC-ERF consistently demonstrated higher packet delivery ratios across varying numbers of attack nodes. When confronted with five attack nodes, S-2 EC-ERF achieved a packet delivery ratio of 93%, thereby surpassing EES-WCA-SVM by 14 percentage points and EES-WCA-MLP by 11 percentage points. This trend persisted as the number of attack nodes increased, with S-2 EC-ERF maintaining higher packet delivery ratios of 89%, 85%, 81%, and 76% compared to EES-WCA-SVM and EES-WCA-MLP in all scenarios. These findings underscore the robustness of S-2 EC-ERF in mitigating the adverse effects of malicious nodes on packet delivery, thereby suggesting its potential effectiveness in ensuring reliable communication in the presence of network attacks. Figure 11 depicts a comparison of S-2 EC-ERF with EES-WCA-SVM and EES-WCA-MLP concerning average throughput across different numbers of attack nodes (5, 10, 15, 20, and 25). S-2 EC-ERF consistently demonstrated significantly higher average throughput values compared to both EES-WCA-SVM and EES-WCA-MLP across all scenarios. At five attack nodes, S-2 EC-ERF achieved an average throughput of 177.739 KBPS, while EES-WCA-SVM and EES-WCA-MLP exhibited substantially lower throughputs of 110 KBPS and 122 KBPS, respectively. As the number of attack nodes increased, S-2 EC-ERF maintained relatively high average throughputs, thus ranging from 187.87 KBPS to 167.429 KBPS. In contrast, both EES-WCA-SVM and EES-WCA-MLP demonstrated decreasing throughput values as the number of attack nodes increased, with EES-WCA-SVM yielding throughputs ranging from 100 KBPS to 83 KBPS and EES-WCA-MLP ranging from 110 KBPS to 95 KBPS. These findings underscore the superior efficiency of S-2 EC-ERF in data transmission under adversarial conditions compared to EES-WCA-SVM and EES-WCA-MLP. Figure 10: Comparison of packet delivery ratio between S-2 EC-ERF, EES-WCA-SVM, and EES-WCA-MLP. When examining the mean energy consumption across different numbers of attack nodes (5, 10, 15, 20, and 25), significant differences in energy efficiency emerged between S-2 EC-ERF, EES-WCA-SVM, and EES-WCA-MLP, as depicted in Figure 12. S-2 EC-ERF consistently demonstrated significantly lower mean energy consumption values compared to both EES-WCA-SVM and EES-WCA-MLP across all scenarios. At five attack nodes, S-2 EC-ERF exhibited a mean energy consumption of 10.3505 J, while EES-WCA-SVM and EES-WCA-MLP consumed substantially higher energy, with values of 21 J and 18 J, respectively. As the number of attack nodes increased, S-2 EC-ERF maintained relatively low mean energy consumption values, ranging from 10.3505 J to 10.8479 J. Conversely, both EES-WCA-SVM and EES-WCA-MLP demonstrated increasing energy consumption as the number of attack nodes increased, with EES-WCA-SVM consuming energy ranging from 21 J to 29 J, and EES-WCA-MLP ranging from 18 J to 28 J. These findings underscore the superior energy efficiency of S-2 EC-ERF compared to EES-WCA-SVM and EES-WCA-MLP. Table 4 shows a comparison between the related works and S-2 EC-ERF in terms of energy remaining and accuracy, thereby highlighting the effectiveness of S-2 EC-ERF  
Figure 11: Comparison of average throughput between S-2 EC-ERF, EES-WCA-SVM, and EES-WCA-MLP. Figure 12: Comparison of mean energy consumption between S-2 EC-ERF, EES-WCA-SVM, and EES-WCA-MLP. compared to existing approaches. Looking at the energy remaining, the related works exhibited varying levels ranging from 50% to 96%.