Tsabit
Vol. 2 No. 2 (2025): December Edition

Comparison of Random Forest and Multiple Linear Regression Algorithms in Predicting Daily Drug Expenditure: A Case Study At Bambuan Pharmacy

Muammar Farhan (Universitas Muhammadiyah Sumatera Utara)
Zuli Agustina Gultom (Universitas Muhammadiyah Sumatera Utara)



Article Info

Publish Date
22 Jun 2026

Abstract

Accurate drug inventory management is essential for pharmacies to avoid shortages or excess stock. This study aims to compare the performance of Multiple Linear Regression (MLR) and Random Forest Regression (RFR) in predicting daily drug sales at Apotek Bambuan. The dataset consists of sales records from 2022–2024, which were preprocessed and divided into training and testing sets. Both models were evaluated using Mean Absolute Error (MAE), Mean Absolute Percentage Error (MAPE), Mean Squared Error (MSE), Root Mean Squared Error (RMSE), and R² Score. The results show that Random Forest provides higher prediction accuracy with lower error values compared to MLR, although MLR remains useful for interpreting the contribution of predictor variables. Therefore, Random Forest is recommended for daily drug sales prediction due to its superior accuracy, while MLR offers advantages in model interpretability.

Copyrights © 2025






Journal Info

Abbrev

tsabit

Publisher

Subject

Computer Science & IT

Description

Tsabit Journal of Computer Science is open to researchers and experts in the field of Computer Science. This journal functions as a forum for disclosing research results both conceptually and technically related to computer science. Tsabit journal of computer science is published twice a year, ...