Optimasi Algoritma K-Nearest Neighbor dengan Particle Swarm Optimization untuk Klasifikasi Penyakit Liver - Bagus Prindo Sugihartono Putro; Handayani, Yuni; Hidayat, Taufik (Jurnal Teknik Informatika dan Desain Komunikasi Visual, 2024)
This study optimizes the K-Nearest Neighbor (KNN) algorithm using Particle Swarm Optimization (PSO) for liver disease classification. With the increasing number of liver disease patients due to unhealthy lifestyles, early detection is vital. The disease is often asymptomatic early on, earning it the name "silent killer." The study utilized 583 clinical entries from the Indian Liver Patient Dataset (ILPD) in the Machine Learning Repository (UCI). After pre-processing to clean and transform the data, it was divided into training and testing sets for model development. The KNN algorithm was applied to the training data to build a classification model, evaluated using a confusion matrix and accuracy metrics. PSO was implemented to find the optimal K value, aiming to enhance classification accuracy and address KNN's existing weaknesses. The KNN algorithm alone achieved its highest accuracy of 68.34% at K=11. However, with PSO, the optimal K value was identified as 21, resulting in an improved accuracy of 75.02%. The results indicate that the PSO optimization on the KNN algorithm successfully increased the accuracy by 6.91%, as observed in the test results with K=21, making it a superior solution for liver disease classification.