Enhancing K-Nearest Neighbors Algorithm in Wireless Sensor Networks through Stochastic Fractal Search and Particle Swarm Optimization

 

Ahmed Mohamed Zaki1, Abdelaziz A. Abdelhamid2, Abdelhameed Ibrahim3, Marwa M. Eid4,5, El-Sayed M. El-Kenawy*5

 

1 Computer Science and Intelligent Systems Research Center, Blacksburg 24060, Virginia, USA

2 Computer Science Department, Faculty of Computer and Information Sciences, Ain Shams University, Cairo, 11566, Egypt

3 School of ICT, Faculty of Engineering, Design and Information & Communications Technology (EDICT), Bahrain Polytechnic, PO Box 33349, Isa Town, Bahrain

4 Faculty of Artificial Intelligence, Delta University for Science and Technology, Mansoura 35712, Egypt

5 Department of Communications and Electronics, Delta Higher Institute of Engineering and Technology, Mansoura, 35111, Egypt

 

 

Emails: azaki@jcsis.org; abdelaziz@cis.asu.edu.eg; abdelhameed.fawzy@polytechnic.bh; mmm@ieee.org; skenawy@ieee.org  

 

Abstract

The utilization of wireless sensor networks (WSNs) holds significant importance in diverse data collection applications. Efficient operation of computers, especially in predictive tasks, is imperative for obtaining accurate results within WSNs. This research introduces an innovative approach employing Stochastic Fractal Search-Particle Swarm Optimization (SFS-PSO) to enhance the performance of the K-Nearest Neighbors (KNN) algorithm. The proposed methodology initiates with the establishment of a particle population, dynamically adjusting their positions and velocities and integrating a diffusion process. Through an iterative process of incremental adjustments and evaluations, the algorithm fine-tunes its parameters, resulting in a refined KNN regression model. The enhanced model exhibits substantial improvements, as indicated by the notable reduction in root mean square error (RMSE) and mean absolute error (MAE), accompanied by a strengthened correlation between variables. The favorable outcomes underscore the efficacy of the SFS-PSO optimization technique in augmenting the KNN algorithm's performance within wireless sensor networks. In simpler terms, the application of SFS-PSO in conjunction with KNN leads to a significant decrease in RMSE, reaching a value as low as 0.00894, demonstrating the notable effectiveness of this optimization approach in refining the predictive capabilities of the KNN algorithm in the context of WSNs.

 

Keywords: Wireless Sensor Network; Optimization; Stochastic Fractal Search; Particle Swarm Optimization; K-Nearest Neighbors; Algorithm.