Perbandingan Algoritma K-Nearest Neighbor dan Naive Bayes Untuk Klasifikasi Status Penjualan Furniture dengan Data Historis


  • Bangkit Dwi Sucahyo * Mail Universitas Teknokrat Indonesia, Bandar Lampung, Indonesia
  • Sampurna Dadi Riskiono Universitas Teknokrat Indonesia, Bandar Lampung, Indonesia
  • (*) Corresponding Author
Keywords: K-Nearest Neighbor; Naïve Bayes; Sales Prediction; Data Mining; Machine Learning

Abstract

This study aims to evaluate the performance of two machine learning classification methods, K-Nearest Neighbor (KNN) and Naive Bayes, in predicting the sales status of furniture products at CV. Surya Gemilang. The data used comes from previous sales records and includes details such as product category, product name, price, sales amount, revenue, and sales status, which are labeled "Best Selling" and "Not Selling". This study follows several steps, including data collection, data cleaning and organization, labeling, model training, and performance assessment using accuracy, precision, recall, and F1-score. The research process includes data preprocessing, handling missing values, encoding categorical features, normalizing numeric features, separating training and testing data, model training, and performance evaluation using accuracy, precision, recall, and F1-score. The results show that the KNN algorithm achieves 97% accuracy, 100% precision, 95% recall, and 0.97 F1-score. Meanwhile, the Naïve Bayes algorithm achieved 85% accuracy, 92% precision, 81% recall, and an F1-score of 0.86. These findings indicate that KNN is better able to recognize complex patterns in sales data than Naïve Bayes. The contribution of this research is to provide a machine learning-based classification model that can be used to support production planning and marketing strategies by predicting furniture product sales levels. The results show that KNN achieved 97% accuracy, while Naïve Bayes only achieved 85%. This indicates that KNN is better at identifying complex relationships between features in sales data, while Naïve Bayes is less effective because it assumes all variables are independent. In summary, KNN is more effective in classifying furniture product sales status and can be the basis for making informed business decisions based on data. This research makes a significant contribution to the application of machine learning in small and medium-sized enterprises, helping to improve sales forecasting and develop more effective marketing strategies.

Downloads

Download data is not yet available.

References

F. Sholekhah, A. D. Putri, R. Rahmaddeni, and L. Efrizoni, “Perbandingan Algoritma Naïve Bayes dan K-Nearest Neighbors untuk Klasifikasi Metabolik Sindrom: Comparison of Naive Bayes and K-Nearest Neighbors Algorithms for Metabolic Syndrome Classification,” MALCOM Indones. J. Mach. Learn. Comput. Sci., vol. 4, no. 2, pp. 507–514, 2024, doi: https://doi.org/10.57152/malcom.v4i2.1249.

H. A. Dwi Fasnuari, H. Yuana, and M. T. Chulkamdi, “Penerapan Algoritma K-Nearest Neighbor Untuk Klasifikasi Penyakit Diabetes Melitus,” Antivirus J. Ilm. Tek. Inform., vol. 16, no. 2, pp. 133–142, 2022, doi: 10.35457/antivirus.v16i2.2445.

A. Muflih and Z. Fatah, “PREDIKSI PRODUK PENJUALAN DI SUPERMARKET DENGAN METODE ALGORITMA K-NEAREST NEIGHBORS (KNN),” J. Ilm. SAINS Teknol. DAN Inf., vol. 3, no. 1, pp. 75–82, 2024, doi: DOI:10.59024/jiti.v3i1.1056.

S. Wirma, “Jurnal Informatika Ekonomi Bisnis Data Mining Dengan Metode Naïves Bayes Classifer dalam Memprediksi Tingkat,” J. Inform. Ekon. Bisnis, vol. 4, no. 3, pp. 5–9, 2022, doi: 10.37034/infeb.v4i.

I. Rahmawati and Mustafa, “IMPLEMENTASI ALGORITMA NAÏVE BAYES DALAM PENYEDERHANAAN TEKS UNTUK ANAK DISLEKSIA,” J. Rekayasa Sist. Inf. dan Teknol., vol. 3, no. 1, pp. 86–102, 2025, doi: ttps://doi.org/10.70248/jrsit.v3i1.2925.

S. R. Pratama and I. N. Fajri, “Comparison of K-Nearest Neighbor (KNN) and Support Vector Machine (SVM) Algorithms in Predicting Customer Satisfaction,” J. Comput. Sci. Informatics Eng., vol. 4, no. 3, pp. 135–146, 2025, doi: https://doi.org/10.55537/cosie.v4i3.1160.

Avinash, A. Widjaja, and O. Karnalim, “Comparative Analysis Of Machine Learning Algorithms For Forecasting Of Basic Goods Products,” J. Tek. Inform. dan Sist. Inf., vol. 10, no. 2, pp. 361–378, 2024, doi: https://doi.org/10.28932/jutisi.v10i2.9357.

Dinni Aulia, “Transformasi Komunikasi Pemasaran di Era Artificial Intelligence,” J. Lensa Mutiara Komun., vol. 8, no. 2, pp. 1–16, 2024, doi: https://dx.doi.org/10.51544/jlmk.v8i2.5120.

V. Listy and I. Ilham, “Revolusi Sistem Informasi Manajemen di Era AI dan Big Data Mengubah Cara Bisnis Bekerja,” Simpatik J. Sist. Inf. dan Inform., vol. 5, no. 1, pp. 27–36, 2025, doi: 10.31294/simpatik.v5i1.7621.

A. M. Husein, F. R. Lubis, and M. K. Harahap, “Analisis Prediktif untuk Keputusan Bisnis : Peramalan Penjualan,” Data Sci. Indones., vol. 1, no. 1, pp. 32–40, 2021, doi: 10.47709/dsi.v1i1.1196.

H. R. Ami, K. Andrean, T. S. Gultom, and A. Hasibuan, “Peran Big Data dan AI (Artificial Intelligence) dalam Mendukung Kewirausahaan Technopreneurship,” Fact. J. Ind. Manaj. dan Rekayasa Sist. Ind., vol. 3, no. 2, pp. 41–46, 2025, doi: 10.56211/factory.v3i2.716.

N. M. Putry, “KOMPARASI ALGORITMA KNN DAN NAÃVE BAYES UNTUK KLASIFIKASI DIAGNOSIS PENYAKIT DIABETES MELLITUS,” EVOLUSI J. Sains dan Manaj., vol. 10, no. 1, pp. 45–57, 2022, doi: https://doi.org/10.31294/evolusi.v10i1.12514.

A. O. Permana and S. Saepudin, “Perbandingan Algoritma K-Nearst Neighbor dan Naïve Bayes pada Aplikasi Shopee,” J. Comput. Sci. Inf. Technol., vol. 4, no. 1, pp. 25–32, 2023, doi: https://doi.org/10.37859/coscitech.v4i1.4474.

D. Susanto, B. Erlangga, A. Peryanto, and Y. F. Widodo, “Komparasi Efektifitas Analisis Sentimen pada Ulasan Produk E-Commerce Menggunakan Naive Bayes dan K-Nearest Neighbor,” J. RESTIKOM Ris. Tek. Inform. dan Komput., vol. 7, no. 2, pp. 226–236, 2025, doi: 10.52005/restikom.v7i2.463.

M. K. Al Fatach and A. Wibowo, “Perbandingan Metode Algoritma C4.5 Dan Naive Bayes Untuk Memprediksi Penjualan Kosmetik Pada Toko Jelita,” J. Mnemon., vol. 7, no. 2, pp. 220–225, 2024, doi: 10.36040/mnemonic.v7i2.10730.

Y. Yulhendri, M. Malabay, and K. Kartini, “Correlated Naïve Bayes Algorithm to Determine Healing Rate of Hepatitis Patients,” Int. J. Sci. Technol. Manag., vol. 4, no. 2, pp. 401–410, 2023, doi: 10.46729/ijstm.v4i2.776.

I. Arfanda, W. Ramdhan, and R. A. Yusda, “Naive Bayes Dalam Menentukan Penerima Bantuan Langsung Tunai,” Digit. Transform. Technol., vol. 1, no. 1, pp. 9–16, 2021, doi: https://doi.org/10.47709/digitech.v1i1.1091.

Tresi Aprilia, “Klasifikasi Kanker Payudara Menggunakan Algoritma K-Nearest Neighbor dan Metode Naive Bayes,” SATESI J. Sains Teknol. dan Sist. Inf., vol. 4, no. 2, pp. 156–163, 2024, doi: 10.54259/satesi.v4i2.3167.

S. Sathyanarayanan and B. R. Tantri, “Confusion Matrix-Based Performance Evaluation Metrics,” African J. Biomed. Res., vol. 27, no. 4, pp. 4023–4031, 2024, doi: 10.53555/ajbr.v27i4s.4345.

B. A. Hamed, O. A. S. Ibrahim, and T. Abd El-Hafeez, “Optimizing classification efficiency with machine learning techniques for pattern matching,” J. Big Data, vol. 10, no. 1, 2023, doi: 10.1186/s40537-023-00804-6.

V. Sheth, U. Tripathi, and A. Sharma, “A Comparative Analysis of Machine Learning Algorithms for Classification Purpose,” Procedia Comput. Sci., vol. 2015, pp. 422–431, 2022, doi: https://doi.org/10.1016/j.procs.2022.12.044.

S. A. Ajagbe, J. B. Awotunde, and H. Florez, “Intrusion Detection: A Comparison Study of Machine Learning Models Using Unbalanced Dataset,” SN Comput. Sci., vol. 5, no. 8, 2024, doi: 10.1007/s42979-024-03369-0.


Bila bermanfaat silahkan share artikel ini

Berikan Komentar Anda terhadap artikel Perbandingan Algoritma K-Nearest Neighbor dan Naive Bayes Untuk Klasifikasi Status Penjualan Furniture dengan Data Historis

Dimensions Badge
Article History
Submitted: 2025-11-10
Published: 2026-01-31
Abstract View: 182 times
PDF Download: 221 times
How to Cite
Sucahyo, B., & Riskiono, S. (2026). Perbandingan Algoritma K-Nearest Neighbor dan Naive Bayes Untuk Klasifikasi Status Penjualan Furniture dengan Data Historis. Journal of Information System Research (JOSH), 7(2), 555-566. https://doi.org/10.47065/josh.v7i2.8675
Section
Articles