The Prediction Of Product Sales Level Using K-Nearest Neighbor and Naive Bayes Algorithms (Case Study : PT Kotamas Bali)

  • Aris Setiawan Miha Djami (1*) Primakara University
  • Nengah Widya Utami (2) Primakara University
  • A. A. Istri Ita Paramitha (3) Primakara University

  • (*) Corresponding Author
Keywords: Data Mining, Product Sales Level, Knowledge Discovery in Databases, K-Nearest Neighbor, Naïve Bayes.


PT Kotamas Bali is a company that operates in tableware and kitchenware, where every sale is sold at various counters. Product sales are permanently printed and entered in sales reports, and there are problems such as the fact that the product is sold very much and it is difficult to see the rate of sale of most products, lots, and not lots. Then, to see the level of product sales, it is necessary to use data mining techniques with the method of Knowledge Discovery in Databases to predict the purchase rate of products using the two algorithms K-Nearest Neighbor and Naïve Bayes. The purpose of this research is so that PT Kotamas Bali can see the sales rate of each product sold so that there is no accumulation of goods and more focus on the most marketed products. These two algorithms result in different accuracy on the 90:10 data split, where the K-Nearest Neighbor algorithm successfully predicted the sales rate of the product with a 99% accuracy rate and was categorized as an excellent classification. The Naïve Bayes algorithm failed to make predictions with an accuracy of only 54% and was classified as a failure classification. ROC performance results on the K-Nearest Neighbor algorithm with an AUC value of 99% and the Naïve Bayes algorithm with an AUC of 74%. K-Nearest Neighbor managed to obtain the highest accuracy, while the Naïve Bayes algorithm failed to conduct classification.


Download data is not yet available.


Alfani W.P.R., A., Rozi, F., & Sukmana, F. (2021). Prediksi Penjualan Produk Unilever Menggunakan Metode K-Nearest Neighbor. JIPI (Jurnal Ilmiah Penelitian Dan Pembelajaran Informatika), 6(1), 155–160.

Arhami, M., & Muhammad, N. (2020). Data Mining Algoritma Dan Implementasi. Penerbit Andi, 2020.

Astuti, N. K. M., Utami, N. W., & Juliharta, I. G. P. K. (2022). Classification of Blood Donor Data Using C4.5 and K-Nearest Neighbor Methods (Case Study: Utd Pmi Bali Province). Jurnal Pilar Nusa Mandiri, 18(1), 9–16.

Budiyanto, A., & Dwiasnati, S. (2018). The Prediction of Best-Selling Product Using Naïve Bayes Algorithm ( A Case Study at PT Putradabo Perkasa ). Ijctjournal.Org, 5(6), 68–74.

Fayyad, U., Piatetsky-shapiro, G., & Smyth, P. (1996). From Data Mining to Knowledge Discovery in. 17(3), 37–54.

Kotamas Makmur - Houseware & Lifestyle Products. (2022). Diakses dari

Muqorobin, M., Kusrini, K., Rokhmah, S., & Muslihah, I. (2020). Estimation System for Late Payment of School Tuition Fees. International Journal of Computer and Information System (IJCIS), 1(1), 1–6.

Rahmad, F. Suryanto, Y. Ramli, K. (2020). Performance Comparison of Anti-Spam Technology Using Confusion Matrix Classification Performance Comparison of Anti-Spam Technology Using Confusion Matrix Classification. IOP Conference Series: Materials Science and Engineering, 1–11.

Romadhon, M. R., & Kurniawan, F. (2021). A Comparison of Naive Bayes Methods, Logistic Regression, and KNN for Predicting Healing of Covid-19 Patients in Indonesia. 3rd 2021 East Indonesia Conference on Computer and Information Technology, EIConCIT 2021, 41–44.

Saputra, I., & Ajeng Kristiyanti, D. (2022). Machine Learning Untuk Pemula. Informatika, Bandung, Indonesia.

Soepriyanto, B. (2021). Comparative Analysis of K-NN and Naïve Bayes Methods to Predict Stock Prices. International Journal of Computer and Information System (IJCIS) Peer Reviewed-International Journal, 02(02), 2745–9659.

Suyanto. (2017). Data Mining Untuk Klasifikasi Dan Klasterisasi Data. Informatika, Bandung, Indonesia.

Swamynathan, M. (2019). Mastering Machine Learning With Python In Six Steps. Bangalore, Karnataka, India. programming concept and implementation&lr&hl=id&pg=PA3#v=onepage&q=python programming concept and implementation&f=false

Tarmizi. (2021). Marketing Strategy to Increase Sales Volume. 2(2), 322–328.

Yulianto, T. (2019). Prediksi Penjualan Produk Menggunakan Algoritma Naive Bayes. Journal Teknologi Yogyakarta, 1(2), 3–10.

How to Cite
Miha Djami, A., Utami, N., & Paramitha, A. A. I. (2023). The Prediction Of Product Sales Level Using K-Nearest Neighbor and Naive Bayes Algorithms (Case Study : PT Kotamas Bali). Jurnal Pilar Nusa Mandiri, 19(2), 77-84.
Article Metrics

Abstract viewed = 57 times
PDF downloaded = 24 times