Implementation of K-Nearest Neighbors Algorithm in Analyzing Public Interest in Shoping at Supermarkets - Siti Kholijah, Siti Kholijah; Sihombing, Volvo; Irmayani , Deci (International Journal of Science, Technology & Management, 2024)
People's shopping patterns and behaviors continue to develop along with technological advances and lifestyle changes, thus requiring retail business actors, especially supermarkets, to better understand their customers' interests and preferences. In this context, accurate analysis of customer shopping interests is very important to improve customer satisfaction and optimize marketing strategies. One solution that can be implemented to analyze people's shopping interests is the application of the K-Nearest Neighbors algorithm, a simple yet effective nearest neighbor-based classification method for recognizing patterns from existing data. This study aims to apply the K-Nearest Neighbors algorithm to classify people's interest in shopping at supermarkets. This study also evaluates the effectiveness and performance of the algorithm in the context of business decision-making in the retail sector. The research methodology includes collecting data on people's shopping interests, data pre-processing, implementing the K-Nearest Neighbors algorithm, and evaluating model performance using evaluation metrics such as accuracy, precision, recall, and F1-score. The results of this study indicate that the K-Nearest Neighbors algorithm is able to achieve an accuracy of 88%, with precision, recall, and F1-score all reaching 92.86%. These results indicate that the K-Nearest Neighbors model is very effective in classifying people's shopping interests, with a low error rate. The resulting confusion matrix also shows the model's ability to identify customers who are interested in shopping with little prediction error. This study concludes that we can rely on the K-Nearest Neighbors algorithm to analyze people's shopping interests in supermarkets. This model not only shows good performance in classification but also has great potential to be implemented in recommendation systems and customer segmentation in the real world. This study contributes to the development of consumer behavior analysis methods in the retail sector, as well as providing a basis for further research to explore other algorithms or combinations of techniques to improve the accuracy and effectiveness of classification models.