Application Of The Metaheuristic Algorithm To Optimize The K Value In K-NN In Grouping Factors Causing Stunting - Antoni Antoni; Mbera Mehuli; Satria Yudha Prayogi (JET (Journal of Electrical Technology), 2026)
Stunting is a health problem that has a long-term impact on the quality of life of individuals and the development of a nation. Accurately identifying the factors that cause stunting is an important step in developing effective mitigation strategies. K-Nearest Neighbor (K-NN) is a machine learning algorithm that is widely used in data classification and grouping, but its performance is greatly influenced by the selection of optimal K value parameters. This research proposes the application of metaheuristic algorithms, such as genetic algorithms (GA) and Particle Swarm Optimization (PSO), to optimize the K value in K-NN in grouping factors that cause stunting. This method integrates the power of exploration and exploitation of metaheuristic algorithms to find K parameters that produce optimal accuracy. Based on the results of applying the metaheuristic algorithm, it was found that without optimization, K-NN only produces an accuracy of 63%, which shows the importance of choosing the right K value. The use of GA in K-NN optimization provides a substantial increase in accuracy, reaching 73%, thanks to its ability to explore the solution space effectively. Meanwhile, PSO also increases accuracy by up to 74%. It is hoped that the findings of this research will be a significant contribution in the development of a more accurate grouping model for analyzing factors causing stunting, so that it can support data-based decision making in an effort to address the stunting problem holistically.