Abstract:
Sales prediction is an important strategy that helps business owners optimize inventory management, plan marketing strategies, and minimize the risk of losses due to overstock or stock shortages. Toko Grosir Rizki, as the research object, still applies a manual sales recording system, making it difficult to identify sales patterns and determine best-selling products accurately. This condition highlights the need for the application of data mining techniques to process historical sales data into useful and actionable information.
This study aims to apply the K-Nearest Neighbor (KNN) method to predict best-selling products based on historical sales data from January to December 2024. The dataset used consists of 50 product categories with 12 monthly entries. The research stages include data selection, pre-processing, transformation, applying the KNN algorithm with parameter K=3 using RapidMiner software, and model evaluation using a confusion matrix. Classification criteria are divided into two categories, “Best-Selling” and “Non-Best-Selling,” based on the average annual total sales value.
The results of the study show that the KNN method with K = 3 successfully classified 50 product categories, consisting of 23 Best-Selling and 27 Non-Best-Selling products. Best-Selling products are characterized by high and stable sales, while Non-Best-Selling products require an evaluation of sales strategies and stock management. With good accuracy and affordable implementation costs, this method is effective in supporting decision-making and expanding the application of machine learning in the MSME sector to improve efficiency and competitiveness.