Data Mining Analysis Using K-Means and Naive Bayes Methods for Drug Inventory Prediction

Authors

  • Filsha Rifi Maharani Universitas Putra Indonesia YPTK Padang
  • Rini Sovia Universitas Putra Indonesia Yptk Padang
  • Gunadi Widi Nurcahyo Universitas Putra Indonesia Yptk Padang

DOI:

https://doi.org/10.35134/komtekinfo.v13i3.708

Keywords:

Drug inventory, Data Mining, K-Means, Naive Bayes, Prediction

Abstract

The management of drug inventory still encounters issues related to unstable stock fluctuations, such as drug shortages and overstocking. This condition has the potential to cause operational losses and degrade the quality of patient care. This study aims to analyze categorized drug inventory using the K-Means Clustering and Naive Bayes algorithms. The K-Means algorithm is employed to group drug data into three categories: low, sufficient, and excessive. The Naive Bayes algorithm is utilized to classify and predict the status of drug inventory requirements. The dataset was obtained from RSUD Tualang over the past two years, comprising 206 drug data points with variables including name, category, stock, price, demand, and expiration date. The test results indicate that the K-Means algorithm successfully grouped the data into three clusters, namely Low (14 items), Sufficient (125 items), and Excessive (67 items), while the Naive Bayes algorithm successfully classified the status of drug inventory requirements with an accuracy of 95.63%. The findings demonstrate that the combination of Data Mining utilizing K-Means and Naive Bayes is effective for drug inventory analysis at RSUD Tualang, thereby assisting management in identifying inventory status and supporting more accurate, efficient, and timely procurement decision-making compared to conventional methods previously employed.

References

A. Thahir, N. D. Hani, and M. J. Masri, “DAMPAK PERKEMBANGAN TEKNOLOGI TERHADAP POLA INTERAKSI SOSIAL PESERTA DIDIK DI SEKOLAH DAN KELUARGA,” Al-Irsyad J. Educ. Sci., vol. 4, no. 1, pp. 13–26, Feb. 2025, doi: 10.58917/aijes.v4i1.140.

N. Imtikhani, A. Nugroho, and T. Farina, “Pengaruh Artificial Intelligence dalam Menggantikan Peran Manusia di Dunia Kerja Ditinjau dari Peraturan Pemerintah No 33 Tahun 2013 Tentang Perluasan Kesempatan Kerja,” J. Sos. Teknol., vol. 5, no. 5, pp. 1475–1496, Jun. 2025, doi: 10.59188/jurnalsostech.v5i5.32118.

I. Antika, Y., Sabila, M., Natalia, D., Sari, D. A., & Nuddin, “Digitalisasi Pelayanan Publik di Era Revolusi Industri 4.0,” J. Ris. Multidisiplin Edukasi, vol. 2, no. 5, pp. 358–369, 2025, doi: https://doi.org/10.71282/jurmie.v2i5.337.

Z. Cao, L. Song, and S. Zhang, “Deep Learning-Driven Bus Short-Term OD Demand Prediction via a Physics-Guided Adaptive Graph Spatio-Temporal Attention Network,” pp. 1–26, 2025.

A. Ramazani, W. Fuadi, and R. Meiyanti, “Prediksi Jumlah Kebutuhan Pemakaian Air Menggunakan Metode Fuzzy Time Series Pada Perumda Aceh Utara,” J. Ilm. Ilk. - Ilmu Komput. Inform., vol. 8, no. 2, pp. 200–209, Jul. 2025, doi: 10.47324/ilkominfo.v8i2.360.

M. Medi, S. P. A. Alkadri, and B. C. Octariadi, “Sistem Prediksi Kebutuhan Obat di Puskesmas Berbasis Website Menggunakan Metode Regresi Linear,” Jutisi J. Ilm. Tek. Inform. dan Sist. Inf., vol. 12, no. 3, p. 1215, Dec. 2023, doi: 10.35889/jutisi.v12i3.1543.

D. Sela and A. H. Hasugian, “Metode Simple Additive Weighting Untuk Menentukan Jumlah Persedian Stok Obat Tbc Pada Puskesmas Bagan Asahan,” J. Process., vol. 19, no. 2, Oct. 2024, doi: 10.33998/processor.2024.19.2.1961.

H. R. Sahra and E. V. Haryanto, “Rancang Bangun Peramalan Stok Obat Dengan Metode Statistical Parabolic Projection Pada PT. Tempo Scan Pacifik, Tbk Berbasis Web,” JID (Jurnal Info Digit., vol. 2, no. 3A, pp. 1812–1825, 2024.

P. Hsu and S. Chen, “Communications of the Association for Information Systems Data Mining Augmented Survey Research,” vol. 54, pp. 491–518, 2024.

M. Y. Zidane, B. Nurina Sari, I. Maulana, A. Primaya, and G. Garno, “PENERAPAN DATA MINING DALAM KLASIFIKASI DATA TRANSAKSI PRODUK KOPERASI DI SMK PGRI 2 KARAWANG,” JATI (Jurnal Mhs. Tek. Inform., vol. 9, no. 1, pp. 263–269, Dec. 2024, doi: 10.36040/jati.v9i1.12196.

S. Pujiono, R. Astuti, and F. Muhamad Basysyar, “IMPLEMENTASI DATA MINING UNTUK MENENTUKAN POLA PENJUALAN PRODUK MENGGUNAKAN ALGORITMA K-MEANS CLUSTERING,” JATI (Jurnal Mhs. Tek. Inform., vol. 8, no. 1, pp. 615–620, Feb. 2024, doi: 10.36040/jati.v8i1.8360.

P. A. Gbadega, Y. Sun, and lufunke A. OBalogun, “Optimized energy management in Grid-Connected microgrids leveraging K-means clustering algorithm and Artificial Neural network models,” vol. 336, no. 1, 2025.

R. Rahmad, S. Defit, and R. Sovia, “Analisis Data Mining dengan Metode K-Means Clustering Dalam Pengelompokan Penggunaan Alat Kontrasepsi,” Bull. Comput. Sci. Res., vol. 5, no. 5, pp. 1174–1181, Aug. 2025, doi: 10.47065/bulletincsr.v5i5.750.

Jaelani, Octaviana, and Elkin Rilvani, “Studi Literatur: Perbandingan Algoritma K-Means dan Fuzzy C-Means dalam Analisis Clustering,” J. Comput. Sci. Technol., vol. 5, no. 2, pp. 52–58, Aug. 2025, doi: 10.54840/jcstech.v5i2.382.

Siti Maghfiroh and Zaehol Fatah, “Analisis Data Mining dengan Algoritma K-Means Clustering untuk Menentukan Siswa Berprestasi di MTS miftahul ulum bengkak,” J. Mhs. Tek. Inform., vol. 4, no. 2, pp. 133–140, Oct. 2025, doi: 10.35473/jamastika.v4i2.4527.

D. Irawan, G. Wijaya, and T. T. Warisaji, “Penerapan Algoritma K-Means Clustering untuk Segmentasi Nasabah Bank,” BIOS J. Teknol. Inf. dan Rekayasa Komput., vol. 6, no. 1, pp. 47–53, Mar. 2025, doi: 10.37148/bios.v6i1.162.

P. Zhahiran Herlambang, N. Rahaningsih, and I. Ali, “OPTIMASI MANAJEMEN PERSEDIAAN DENGAN KLASIFIKASI NAIVE BAYES DI TOKO BAJA MANDIRI,” JATI (Jurnal Mhs. Tek. Inform., vol. 9, no. 4, pp. 5651–5657, May 2025, doi: 10.36040/jati.v9i4.13900.

A. S. Perdana, Istian Kriya Almanfaluti, and Alshaf Pebrianggara, “Klasifikasi Ulasan Pelanggan pada Aplikasi MitraShopee Menggunakan Metode Support Vector Machine dan Naïve Bayes,” Teknologi, vol. 15, no. 1, pp. 19–31, Jun. 2025, doi: 10.26594/teknologi.v15i1.5577.

M. Afriansyah, Joni Saputra, V. Y. P. Ardhana, and Yuan Sa’adati, “ALGORITMA NAIVE BAYES YANG EFISIEN UNTUK KLASIFIKASI BUAH PISANG RAJA BERDASARKAN FITUR WARNA,” J. Inf. Syst. Manag. Digit. Bus., vol. 1, no. 2, pp. 236–248, Jan. 2024, doi: 10.59407/jismdb.v1i2.438.

D. S. Bahri and U. Pamulang, “Analisis Perbandingan Algoritma Naïve Bayes dengan SVM ( Support Vektor Machine ) Dalam Mendiagnosis Penyakit Asma Comparative Analysis of Naïve Bayes and Support Vector Machine ( SVM ) Algorithms in Diagnosing Asthma,” vol. 5, no. 2, pp. 189–198, 2025, doi: 10.59395/m9qa0357.

F. Zafira, B. Irawan, and A. Bahtiar, “PENERAPAN DATA MINING UNTUK ESTIMASI STOK BARANG DENGAN METODE K-MEANS CLUSTERING,” JATI (Jurnal Mhs. Tek. Inform., vol. 8, no. 1, pp. 156–161, Feb. 2024, doi: 10.36040/jati.v8i1.8319.

S. A. B. Telaumbanua, F. Setiadi, and S. Nurjanah, “Analisis Clustering Menggunakan Metode Enhanced Fuzzy C-Means Clustering Dengan Algoritma Rock Pada Student Performance Dataset,” bit-Tech, vol. 7, no. 3, pp. 984–994, Apr. 2025, doi: 10.32877/bt.v7i3.2287.

M. A. Septianto, A. Faqih, and A. R. Rinaldi, “KLASTERISASI DATA PRODUKSI PERTANIAN DI KABUPATEN CIREBON DENGAN ALGORITMA K-MEANS,” J. Inform. dan Tek. Elektro Terap., vol. 13, no. 2, Apr. 2025, doi: 10.23960/jitet.v13i2.6174.

P. Lu and Z. Zhang, “The Model of Food Nutrition Feature Modeling and Personalized Diet Recommendation Based on the Integration of Neural Networks and K-Means Clustering,” vol. 5, no. 5, pp. 1–17, 2025.

H. Yzzogh and H. Benaboud, “Flooding distributed denial of service detection in software-defined networking using k-means and naïve Bayes,” vol. 15, no. 1, pp. 817–826, 2025, doi: 10.11591/ijece.v15i1.pp817-826.

M. A. K-means, J. Firmandanu, A. Hiswara, and F. N. Khasanah, “Pengelompokkan Sembako Terlaris,” vol. 1, no. 2, pp. 71–74, 2025.

H. Hartono, A. Hajjah, and Y. N. Marlim, “PENERAPAN METODE NAÏVE BAYES CLASSIFIER UNTUK KLASIFIKASI JUDUL BERITA,” J. Simantec, vol. 12, no. 1, pp. 37–46, Dec. 2023, doi: 10.21107/simantec.v12i1.19398.

N. P. Sari, “Analisis Performa Algoritma CNN dalam Klasifikasi Citra Medis Berbasis Deep Learning,” J. Komput., vol. 2, no. 2, pp. 87–92, Jun. 2024, doi: 10.70963/jk.v2i2.113.

F. Handayani, R. Firdaus, A. Wahyudi, H. Fu’adah Amran, and R. Medikawati Taufiq, “Kombinasi Algoritma Gaussian Naïve Bayes Dan Adaboost Untuk Meningkatkan Akurasi Dalam Klasifikasi Penyakit Diabetes,” J. FASILKOM, vol. 15, no. 2, pp. 238–244, Aug. 2025, doi: 10.37859/jf.v15i2.9279.

Downloads

Published

2026-09-30

How to Cite

Maharani, F. R., Sovia, R., & Nurcahyo, G. W. (2026). Data Mining Analysis Using K-Means and Naive Bayes Methods for Drug Inventory Prediction. Jurnal KomtekInfo, 13(3), 121–129. https://doi.org/10.35134/komtekinfo.v13i3.708

Issue

Section

Articles