Prediksi Penjualan Barang Menggunakan Metode K-Means dan Regresi Linear
DOI:
https://doi.org/10.47065/bulletincsr.v5i4.541Keywords:
Sales Prediction; K-Means; Linear Regression; Data Mining; Model EvaluationAbstract
Sales data analysis plays an important role in supporting business decision making, especially to optimise stock management and improve operational efficiency. the main problem faced by Vapestore XYZ in Karawang is the difficulty in accurately predicting the number of product sales, so there is often an imbalance between inventory and market demand. This can cause losses due to overstocks or shortages of goods. Currently, the estimation of stock requirements still relies on intuition and personal experience, without the support of objective data analysis. This research aims to build a sales prediction model by combining the K-Means method for product clustering and Linear Regression for sales quantity prediction. Sales data is taken directly from the store POS application, then goes through the stages of cleaning, labelling, and clustering into three groups, namely ‘Less Sold’, “Sold”, and ‘Very Sold’. Sales prediction is performed using Linear Regression by utilising the clustering results and time variables as inputs. Model performance evaluation is performed using error metrics, namely Mean Absolute Error (MAE), Mean Squared Error (MSE), and Root Mean Squared Error (RMSE). Based on the test results, the developed Linear Regression model obtained MAE of 3.20, MSE of 52.34, and RMSE of 7.23. These error values indicate that the model is able to provide sales estimates that are close enough to the actual data to be reliable in stock planning. Visualisation of the prediction results in the form of tables and heatmaps makes it easy to identify sales trends and compare performance between products. The findings of this study prove that the combination of K-Means and Linear Regression methods is effectively used to support stock decision making and marketing strategies in vape retail stores. Further development is recommended by enriching the dataset and exploring other prediction methods to improve model performance.
Downloads
References
R. Isnaen, P. Zaeni, and R. Renaldy, “IN-FEST 2024 Systematic Literature Review?: Penerapan dan Teknik Data Mining pada Sistem Pengambilan Keputusan Pemasaran di Perusahaan IN-FEST 2024,” Prosiding Seminar Nasional Informatika, vol. 2, pp. 578–584, 2024.
I. T, “Penerapan Data Mining Dalam Dunia Bisnis Menggunakan Metode Clustering.,” J. Intsitution Sharia Financ., vol. 2, pp. 40–53, 2019.
G. Gustientiedina, M. H. Adiya, and Y. Desnelita, “Penerapan Algoritma K-Means Untuk Clustering Data Obat-Obatan,” J. Nas. Teknol. dan Sist. Inf., vol. 5, no. 1, pp. 17–24, 2019, doi: 10.25077/teknosi.v5i1.2019.17-24.
F. Dikarya and S. Muharni, “Penerapan Algoritma K-Means Clustering Untuk Pengelompokan Universitas Terbaik Di Dunia,” J. Inform., vol. 22, no. 2, pp. 124–131, 2022, doi: 10.30873/ji.v22i2.3324.
C. Science, “Implementasi Algoritma K-Means untuk Mengetahui Minat Siswa SMA Terhadap Mata Pelajaran Teknologi Informasi dan Komunikasi,” Indonesian Journal of Machine Learning and Computer Science, vol. 5, no. 1, pp. 168–174, 2025, doi 10.57152/malcom.v5i1.1639
M. Djaka Permana, A. Lia Hananto, E. Novalia, B. Huda, and T. Paryono, “Klasterisasi Data Jamaah Umrah pada Tanurmutmainah Tour Menggunakan Algoritma K-Means,” J. KomtekInfo, vol. 10, no. 1, pp. 15–20, 2023, doi: 10.35134/komtekinfo.v10i1.332.
D. S. Annam, A. Hananto, F. Nurapriani, and T. Tukino, “Clustering User Sentiment Transportasi Online Gojek Dan Grab Dengan Metode K-Means,” J. Tika, vol. 8, no. 2, pp. 164–171, 2023, doi: 10.51179/tika.v8i2.2165.
A. H. Helyatin, N. Nadzirotul, F. Syarif, A. Khoiri, and M. Fauzen, “Perancangan Sistem Informasi Presensi Guru Berbasis Web,” JUSTIFY?: Jurnal Sistem Informasi, vol. 3, no. 1, pp. 21–29, 2024, doi: 10.35316/justify.v3i1.5565.
M. D. Kurniawan, B. Priyatna, and F. Nurapriani, “Implementasi Algoritma K-Means Untuk Klasterisasi Data Obat Puskesmas Kotabaru,” J. Sains Komput. Inform. (J-SAKTI, vol. 7, no. 2, pp. 882–890, 2023, DOI : http://dx.doi.org/10.30645/j-sakti.v7i2.693.
F. P. Azizah, S. S. Hilabi, and A. Hananto, “Perbandingan Algoritma K-Means dan Hierarchical Untuk Klasterisasi Data Kehadiran Karyawan,” Jutisi, vol. 14, no. 1, pp. 351–361, doi: http://dx.doi.org/10.35889/jutisi.v14i1.2644.
T. P. Sari, A. L. Hananto, E. Novalia, T. Tukino, and S. S. Hilabi, “Implementasi Algoritma K-Means dalam Analisis Klasterisasi Penyebaran Penyakit Hiv/Aids,” Infotek J. Inform. dan Teknol., vol. 6, no. 1, pp. 104–114, 2023, doi: 10.29408/jit.v6i1.7423.
W. W. Kristianto and C. Rudianto, “Penerapan Data Mining Pada Penjualan Produk Menggunakan Metode K-Means Clustering (Studi Kasus Toko Sepatu Kakikaki),” J. Pendidik. Teknol. Inf., no. 5, pp. 90–98, 2020.
M. Khaerudin, I. Zaenuddin, and Tukino, “Prediksi Barang Sering dan Jarang Terjual Dengan Menggunakan Algorithma K-Mean Clustering (Studi Kasus Toko Bina Mulia),” J. Inform. Inf. Secur., vol. 3, no. 1, pp. 1–12, 2022, doi: 10.31599/jiforty.v3i1.1229.
R. Nazar, “Implementasi Pemrograman Python Menggunakan Google Colab,” J. Inform. dan Komput. , vol. 15, no. 1, pp. 50–56, 2024.
R. A. A. Yanuar, “Sentimen Analisis Aplikasi Posaja Pada Google Playstore Untuk Peningkatan Pospay Superapp Menggunakan Support Vector Meachine” Jurnal Teknik Informatika, Vol. 16, No. 2, 1–7, 2024, [Online]. Available: https://ejurnal.ulbi.ac.id/index.php/informatika/article/view/3533
N. P. A. Widiari, I. M. A. D. Suarjaya, and D. P. Githa, “Teknik Data Cleaning Menggunakan Snowflake untuk Studi Kasus Objek Pariwisata di Bali,” J. Ilm. Merpati (Menara Penelit. Akad. Teknol. Informasi), vol. 8, no. 2, p. 137, 2020, doi: 10.24843/jim.2020.v08.i02.p07.
H. Firda et al., “Perbandingan Pelabelan Rating - based dan Inset Lexicon - based dalam Analisis Sentimen Menggunakan SVM ( Studi Kasus?: Ulasan Aplikasi GoBiz di Google Play Store ),” Jurnal Sistemasi vol. 14, no. 2, pp. 516–528, 2025 DOI : https://doi.org/10.32520/stmsi.v14i2.4795.
M. F. Fadhillah, A. Lovely, A. Suyoso, and I. Puspitasari, “Attributes Segmentasi Pelanggan dengan Algoritma Clustering Berdasarkan Atribut Recency , Frequency dan Monetary ( RFM ),” Indonesian Journal of Machine Learning and Computer Science vol. 5, no 1, pp. 48–56, 2025, DOI : https://doi.org/10.57152/malcom.v5i1.1491.
A. Anggrawan, H. Hairani, and N. Azmi, “Prediksi Penjualan Produk Unilever Menggunakan Metode Regresi Linear,” J. Bumigora Inf. Technol., vol. 4, no. 2, pp. 123–132, 2022, doi: 10.30812/bite.v4i2.2416.
K. Puteri and A. Silvanie, “Machine Learning untuk Model Prediksi Harga Sembako Dengan Metode Regresi Linear Berganda,” J. Nas. Inform., vol. 1, no. 2, pp. 82–94, 2020,.
Y. Aqsho Ramadhan, A. Faqih, and G. Dwilestari, “Prediksi Penjualan Handphone di Toko X menggunakan Algoritma Regresi Linear,” J. Inform. Terpadu, vol. 9, no. 1, pp. 40–44, 2023, doi: 10.54914/jit.v9i1.692.
N. R. Setyoningrum, P. J. Rahimma, S. T. Teknologi, I. Tanjungpinang, and K. Tanjungpinang, “Implementasi Algoritma Regresi Linear Dalam Sistem Prediksi Pendaftar Mahasiswa Baru Sekolah Tinggi Teknologi Indonesia Tanjungpinang,” Pros. Semin. Nas. Ilmu Sos. dan Teknol., no. 4, pp. 13–18, 2022, [Online]. Available: https://ejournal.upbatam.ac.id/index.php/prosiding/article/view/5200
T. Tukino and F. Fifi, “Penerapan Support Vector Machine Untuk Analisis Sentimen Pada Layanan Ojek Online,” J. Desain Dan Anal. Teknol., vol. 3, no. 2, pp. 104–113, 2024, doi: 10.58520/jddat.v3i2.59.
T. Tukino and B. Huda, “Penerapan Algoritma K-Means Untuk Mendukung Keputusan Dalam Pemilihan Tema Tugas Akhir Pada Prodi Sistem Informasi Universitas Buana Perjuangan Karawang.,” Techno Xplore J. Ilmu Komput. dan Teknol. Inf., vol. 4, no. 1, pp. 1–10, 2019, doi: 10.36805/technoxplore.v4i1.542.
Bila bermanfaat silahkan share artikel ini
Berikan Komentar Anda terhadap artikel Prediksi Penjualan Barang Menggunakan Metode K-Means dan Regresi Linear
ARTICLE HISTORY
How to Cite
Issue
Section
Copyright (c) 2025 Henry Adam, Tukino, Elfina Novalia, April Lia Hananto

This work is licensed under a Creative Commons Attribution 4.0 International License.
Authors who publish with this journal agree to the following terms:
- Authors retain copyright and grant the journal right of first publication with the work simultaneously licensed under Creative Commons Attribution 4.0 International License that allows others to share the work with an acknowledgment of the work's authorship and initial publication in this journal.
- Authors are able to enter into separate, additional contractual arrangements for the non-exclusive distribution of the journal's published version of the work (e.g., post it to an institutional repository or publish it in a book), with an acknowledgment of its initial publication in this journal.
- Authors are permitted and encouraged to post their work online (e.g., in institutional repositories or on their website) prior to and during the submission process, as it can lead to productive exchanges, as well as earlier and greater citation of published work (Refer to The Effect of Open Access).