ANALISIS PROBALITAS NAÏVE BAYES BERBASIS LAPLACE SMOOTHING KEBUTUHAN RESTOCK FARMASI - Arga Fauzi Indratna; Adi Fajaryanto Cobantoro; Ismail Abdurrozzaq Zulkarnain (INTI Nusa Mandiri, 2026)
Drug inventory management plays a critical role in supporting hospital health services. Amal Sehat Wonogiri Hospital faces challenges in managing drug stocks due to manual recording processes prone to errors, data update delays, and inaccurate inventory information, creating risks of stock-out and overstock conditions. This study implements the Naive Bayes algorithm with Laplace Smoothing optimization to classify drug stock conditions into three categories: Safe (Aman), Low Stock (Menipis), and Needs Restocking (Restok). To address class imbalance in the dataset, this study applies SMOTE (Synthetic Minority Over-sampling Technique) and provides a comparative analysis against the Decision Tree C4.5 algorithm. The system was developed using the Rapid Application Development (RAD) methodology with the Laravel framework and MySQL database, utilizing 38,531 historical pharmacy transaction records from January to October 2025. Following a stratified 80:20 train-test split, model evaluation on 7,707 test records yielded an accuracy of 84.04%, with weighted-average precision of 87% and recall of 84%. Five-fold cross-validation confirmed model stability with a mean accuracy of 83.16%. Comparative experiments demonstrated that although Decision Tree achieves higher overall accuracy (87.43%), Naive Bayes with Laplace Smoothing significantly outperforms Decision Tree in detecting the critical Low Stock class (F1-score: 54.73% vs 25.23%; recall: 70.69% vs 16.09%), proving its superiority in minimizing the risk of undetected stock shortages.