Retail businesses in the agricultural industry often face difficulties in estimating inventory needs, especially plant medicines which are important for protecting plants from pests and diseases. The lack of an accurate inventory prediction system can cause stock discrepancies, as happened at the Anugrah Tani Store, Brebes Regency, thereby disrupting operations and customer satisfaction. This research uses the Decision Tree classification technique to increase the accuracy of predicting the need for plant medicine supplies, with a clustering approach using the K-Means algorithm to determine the optimal K value through the Davies-Bouldin Index (DBI) calculation. A DBI value of -0.065 indicates good cluster quality with an optimal K of 2, where Cluster 0 has high inventory needs (1138 data) and Cluster 1 has low needs (4 data). The analysis results show that the accuracy level of the Decision Tree model is 98.25%, which is quite high. This model is not only able to predict inventory patterns accurately but also provides in-depth insights to support stock decision making. This research proves that the Decision Tree algorithm can help inventory management with a faster response to customer needs, while contributing to the development of machine learning-based classification models for the agricultural and retail sectors.
Copyrights © 2025