Performance of K-Nearest Neighbors and Advanced Metaheuristic Algorithms for Feature Selection in Classifying the Purity of Civet Coffee - Widyaningtyas, Shinta; Arwani, Muhammad; Nanda, Ririn Fatma (Institut Riset dan Publikasi Indonesia, 2026)
Various studies have shown that feature selection can improve classification accuracy, particularly in agriculture. However, most of these studies still use conventional metaheuristic algorithms, which have certain limitations, including a tendency to get stuck in local optima. Therefore, this study explores the potential of advanced metaheuristic algorithms for selecting colour and texture features to classify the purity of civet coffee. This study used k-Nearest Neighbour (K-NN) model optimized with several advanced metaheuristic algorithms, i.e. Bare Bones Particle Swarm Optimisation (BBPSO), Modified Generalised Flower Pollination Algorithm (MGFPA), Enhanced Salp Swarm Algorithm (ESSA), Improved Salp Swarm Algorithm (ISSA), and Two-Stage Modified Grey Wolf Optimizer (TMGWO). The results show that feature selection can improve model accuracy. The best model was obtained from a combination of K-NN and TMGWO with an accuracy of 0.981, precision of 0.982, recall of 0.981, F1-Score of 0.981, and Area Under Curve (AUC) close to 1 with three selected features, i.e. blue correlation, s_hsl_correlation, and s_hsv_correlation. Furthermore, the results of this study indicate that the development of advanced metaheuristic algorithms can overcome the weaknesses of conventional algorithms, as demonstrated by improvements in classification model accuracy and the number of selected features.