PENERAPAN ALGORITMA DECISION TREE REGRESSION DALAM PREDIKSI PENJUALAN BARANG UNTUK REKOMENDASI STOK MASUK PADA CV ABC PALEMBANG

APPLICATION OF DECISION TREE REGRESSION FOR PRODUCT SALES PREDICTION AND INVENTORY REPLENISHMENT RECOMMENDATIONS AT CV ABC PALEMBANG

Authors

  • Johannes Universitas Katolik Musi Charitas
  • Aji Pragoyo Universitas Katolik Musi Charitas
  • I Komang Darmawan Universitas Katolik Musi Charitas
  • Latius Hermawan Universitas Katolik Musi Charitas

DOI:

https://doi.org/10.52972/hoaq.vol17no2.p193-202

Keywords:

decision tree regression, machine learning, sales prediction, inventory stock, django

Abstract

Pengelolaan stok barang pada toko bangunan yang tidak berbasis data historis dapat menyebabkan risiko kekurangan atau kelebihan persediaan. Penelitian ini dilakukan pada CV ABC Palembang, yaitu nama samaran dari salah satu toko bangunan di Palembang. Tahapan penelitian diawali dengan identifikasi masalah, studi literatur, pengumpulan data, pre-processing dan pembentukan target, feature engineering, pemodelan, pengujian, evaluasi, serta implementasi sistem web berbasis Django. Data yang digunakan merupakan transaksi penjualan dua produk semen, yaitu Semen Dynamix 40 KG dan Semen Merdeka 40 KG, pada periode 1 Januari 2025 sampai 30 Desember 2025. Dataset mentah berjumlah 243 baris, kemudian melalui proses pembersihan menjadi 241 baris transaksi valid. Target model dibentuk menggunakan variabel Jumlah_Penjualan_Berikutnya sehingga data siap model berjumlah 239 baris. Data dibagi secara berurutan berdasarkan waktu dengan rasio 80% untuk data latih dan 20% untuk data uji. Setelah dilakukan penyesuaian hyperparameter DecisionTreeRegressor, evaluasi model menghasilkan MAE sebesar 5,86 dan RMSE sebesar 7,70. Hasil tersebut menunjukkan bahwa model mampu menghasilkan estimasi awal dalam satuan jumlah penjualan, sedangkan sistem web dapat memberikan rekomendasi stok masuk berdasarkan safety stock dan stok akhir saat ini.

 

Inventory management in a building materials store that is not supported by historical data may increase the risk of stock shortages or excess inventory. This study was conducted at CV ABC Palembang, a pseudonym for a building materials store in Palembang, to apply the Decision Tree Regression algorithm to predict product sales in the next period and generate incoming stock recommendations. The dataset consists of sales transaction data for two cement products, namely Semen Dynamix 40 KG and Semen Merdeka 40 KG. The raw dataset contained 243 rows and was cleaned into 241 valid transaction rows. The model target was constructed using the Jumlah_Penjualan_Berikutnya variable, resulting in 239 rows of modeling data. The research stages include problem identification, literature review, data collection, preprocessing, feature engineering, model training, testing, evaluation, and web-based system implementation using Django. The dataset was split sequentially based on time using an 80% training and 20% testing ratio. After adjusting the DecisionTreeRegressor hyperparameters, the model evaluation produced an MAE of 5.86 and an RMSE of 7.70. The results indicate that the model can provide an initial sales prediction in unit form, while the web system can generate incoming stock recommendations based on safety stock and current ending inventory.

References

F. Petropoulos et al., “Forecasting: theory and practice,” International Journal of Forecasting, vol. 38, no. 3, pp. 705-871, Jul. 2022, doi: 10.1016/j.ijforecast.2021.11.001.

R. Fildes, S. Ma, and S. Kolassa, “Retail forecasting: Research and practice,” International Journal of Forecasting, vol. 38, no. 4, pp. 1283-1318, 2022.

S. Punia, K. Nikolopoulos, S. P. Singh, J. K. Madaan, and K. Litsiou, “Deep learning with long short-term memory networks and random forests for demand forecasting in multi-channel retail,” International Journal of Production Research, vol. 58, no. 16, pp. 4964-4979, 2020, doi: 10.1080/00207543.2020.1735666.

S. Makridakis, E. Spiliotis, and V. Assimakopoulos, “Statistical and machine learning forecasting methods: Concerns and ways forward,” PLOS ONE, vol. 13, no. 3, p. e0194889, Mar. 2018, doi: 10.1371/journal.pone.0194889.

Avinash, A. Widjaja, and O. Karnalim, “Analisis Perbandingan Algoritma Machine Learning untuk Forecasting Persediaan Produk Barang Pokok,” Jurnal Teknik Informatika dan Sistem Informasi, vol. 10, no. 2, pp. 361-378, Aug. 2024, doi: 10.28932/jutisi.v10i2.9357.

A. Sari, “Prediksi Kebutuhan Stok Barang Menggunakan Algoritma Random Forest,” Jurnal JOISIE, vol. 9, no. 2, pp. 340-352, Dec. 2025.

D. Septari, I. Kanedi, and J. Jumadi, “Implementasi Machine Learning Untuk Prediksi Penjualan Oli Shell Pada CV. Harapan Karya Mandiri Bengkulu,” Jurnal Media Infotama, vol. 20, no. 2, pp. 534-541, 2024.

A. Nafi’uzzahidi, G. W. N. Wibowo, and Sarwido, “Peningkatan Akurasi Prediksi Stok Bahan Baku Furnitur Menggunakan Algoritma Random Forest Regressor Berbasis Web,” Journal of Information System Research (JOSH), vol. 7, no. 2, pp. 318-329, Jan. 2026, doi: 10.47065/josh.v7i2.9095.

M. S. Shak et al., “Optimizing Retail Demand Forecasting: A Performance Evaluation of Machine Learning Models Including LSTM and Gradient Boosting,” The American Journal of Engineering and Technology, vol. 6, no. 09, pp. 67-80, Sep. 2024, doi: 10.37547/tajet/Volume06Issue09-09.

F. Pedregosa et al., “Scikit-learn: Machine Learning in Python,” Journal of Machine Learning Research, vol. 12, pp. 2825-2830, 2011.

Scikit-learn Developers, “DecisionTreeRegressor,” scikit-learn documentation. Accessed: Jun. 2, 2026. [Online]. Available: https://scikit-learn.org/stable/modules/generated/sklearn.tree.DecisionTreeRegressor.html

G. James, D. Witten, T. Hastie, R. Tibshirani, and J. Taylor, An Introduction to Statistical Learning with Applications in Python. Cham: Springer, 2023, doi: 10.1007/978-3-031-38747-0.

K. Douaioui, R. Oucheikh, O. Benmoussa, and C. Mabrouki, “Machine Learning and Deep Learning Models

for Demand Forecasting in Supply Chain Management: A Critical Review,” Applied System Innovation, vol. 7, no. 5, p. 93, 2024, doi: 10.3390/asi7050093.

R. Bergsma, C. de Ruijt, and S. Bhulai, “A systematic review of machine learning approaches in inventory control optimization,” Operations Research Perspectives, p. 100367, 2025, doi: 10.1016/j.orp.2025.100367.

Django Software Foundation, “Django documentation,” Accessed: Jun. 4, 2026. [Online]. Available: https://docs.djangoproject.com/en/6.0/.

Downloads

Published

02-11-2026

How to Cite

Johannes, Pragoyo, A., Darmawan, I. K., & Hermawan, L. (2026). PENERAPAN ALGORITMA DECISION TREE REGRESSION DALAM PREDIKSI PENJUALAN BARANG UNTUK REKOMENDASI STOK MASUK PADA CV ABC PALEMBANG: APPLICATION OF DECISION TREE REGRESSION FOR PRODUCT SALES PREDICTION AND INVENTORY REPLENISHMENT RECOMMENDATIONS AT CV ABC PALEMBANG. HOAQ (High Education of Organization Archive Quality) : Jurnal Teknologi Informasi, 17(2), 193–202. https://doi.org/10.52972/hoaq.vol17no2.p193-202