Optimasi Algoritma KNN dengan Parameter K dan PSO Untuk Klasifikasi Status Gizi Balita - Rochman, Bagus Fathur; Rahim, Abdul; Siswa, Taghfirul Azhima Yoga (Universitas Budi Darma, 2024)
The toddler years are a crucial phase that requires constant nutritional monitoring, because rapid growth and development require optimal nutritional intake. Nutritional problems in toddlers can hinder physical growth and can even be fatal. In assessing the nutritional status of toddlers, it is important to use efficient methods. One approach that can be used is machine learning, which can help determine the nutritional status of toddlers. K-Nearest Neighbors (KNN) is an algorithm commonly used in object classification based on nearest neighbors. Even though it is simple, determining the correct K value is very important because it can significantly influence KNN performance. This research emphasizes the importance of choosing the right parameters to increase the accuracy of the KNN model in classifying the nutritional status of toddlers. The test results show that the optimal combination for KNN is at K=4, using the 'distance' weight and distance metric p=1, producing the highest accuracy of 91.15% on the test data. Furthermore, the research applied Particle Swarm Optimization (PSO) to optimize KNN parameters, and it was found that the optimal combination was with K=6, 'distance' weight, and distance metric p=1, achieving a mean accuracy of 93.44% and a test accuracy of 93.98%. PSO is proven to be effective in finding the best parameters that increase model generalization to test data. Test results with a training data ratio of 80% and testing 20% show the best accuracy of 93.98%. .The use of PSO for parameter optimization succeeded in increasing model accuracy by 3.10% compared to the model without optimization