Sales Prediction of Kembar Fruit Salad Homemade Products Based on Transaction Data Using K-Nearest Neighbor
DOI:
https://doi.org/10.55537/j-ibm.v5i1.1248Keywords:
k-nearest neighbor, sales prediction, product classification, market trendsAbstract
K-Nearest Neighbor is a method used to classify data with the closest distance or what is called a lazy learning technique. Accurate sales predictions allow owners to plan raw material stock requirements more efficiently, thereby reducing the risk of overstocking (which can cause waste) or understocking (which has the potential to reduce revenue). This research will implement the KNN, K-Nearest Neighbor algorithm to show the extent to which the KNN method can produce accurate predictions in the context of sales. The stages of the method carried out in this study by determining the value of K, calculating the square of the euclid distance (query instance) of each object against the given training data, then sorting the objects into groups that have the smallest euclid distance, using the class label Y (nearest neighbor classification), using the k-nearest neighbor category that is the majority then the calculated query instance value can be predicted. This research produces a jupyter notebook-based sales prediction model that can be used to predict Twin Fruit Salad products based on variations. The dataset used consists of 112 data divided into 89 training data and 23 testing data. With 91% accuracy results, it contributes to increasing the turnover of twin fruit salad and can provide considerations regarding stock availability based on the amount sold.
Downloads
References
Adhi Putra, A. D. (2021). Analisis Sentimen pada Ulasan pengguna Aplikasi Bibit Dan Bareksa dengan Algoritma KNN. JATISI (Jurnal Teknik Informatika Dan Sistem Informasi), 8(2), 636–646. https://doi.org/10.35957/jatisi.v8i2.962
Akbar, F. M. N. (2024). Metode KNN (K-Nearest Neighbor) untuk Menentukan Kualitas Air. Jurnal Tekno Kompak, 18(1), 28. https://doi.org/10.33365/jtk.v18i1.3241
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. https://doi.org/10.29100/jipi.v6i1.1910
Anisa, C., & Andri. (2020). Penerapan Algoritma k-Nearest Neighbor untuk Prediksi Penjualan Obat pada Apotek Kimia Farma Atmo Palembang. Bina Darma Conference on Computer Science, 199–208.
Asyrofi, R. R., & Asyrofi, R. (2023). Implementasi Aplikasi Jupyter Notebook Sebagai Analisis Kreteria Plagiasi Dengan Teknik Simantik. JIPI (Jurnal Ilmiah Penelitian dan Pembelajaran Informatika), 8(2), 627-637.
Ayuni, G. N., & Fitrianah, D. (2019). Penerapan metode Regresi Linear untuk prediksi penjualan properti pada PT XYZ. Jurnal Telematika, 14(2), 79–86.
Ben, A., Amri, Y., Fnaiech, A., & Sahli, H. (2025). Journal of Electronic Science and Technology Automated ECG arrhythmia classi fi cation using hybrid CNN-SVM architectures. Journal of Electronic Science and Technology, 23(3), 100316. https://doi.org/10.1016/j.jnlest.2025.100316
Darmawan, A., Kustian, N., & Rahayu, W. (2018). Implementasi Data Mining Menggunakan Model SVM untuk Prediksi Kepuasan Pengunjung Taman Tabebuya. STRING (Satuan Tulisan Riset Dan Inovasi Teknologi), 2(3), 299. https://doi.org/10.30998/string.v2i3.2439
Dewi, S. P., Nurwati, N., & Rahayu, E. (2022). Penerapan Data Mining Untuk Prediksi Penjualan Produk Terlaris Menggunakan Metode K-Nearest Neighbor. Building of Informatics, Technology and Science (BITS), 3(4), 639–648. https://doi.org/10.47065/bits.v3i4.1408
Elison, M. H., Asrianto, R., & Aryanto. (2020). Prediksi Penjualan Papan Bunga Menggunakan Metode Double Exponential Smoothing. Jurnal Riset Sistem Informasi Dan Teknologi Informasi (JURSISTEKNI), 2(3), 45–56. https://doi.org/10.52005/jursistekni.v2i3.60
Erdiansyah, U., Irmansyah Lubis, A., & Erwansyah, K. (2022). Komparasi Metode K-Nearest Neighbor dan Random Forest Dalam Prediksi Akurasi Klasifikasi Pengobatan Penyakit Kutil. Jurnal Media Informatika Budidarma, 6(1), 208. https://doi.org/10.30865/mib.v6i1.3373
Fauzi, J. R. (2020). Algoritma Dan Flowchart Dalam Menyelesaikan Suatu Masalah Disusun Oleh Universitas Janabadra Yogyakarta 2020. Jurnal Teknik Informatika, 20330044, 4–6.
Hamidi, A. A., Robertson, B., & Ilow, J. (2023). A new approach for ECG artifact detection using fine-KNN new approach for ECG artifact detection using classification and wavelet scattering features in vital health classification and wavelet scattering features in vital health applications applications. Procedia Computer Science, 224, 60–67. https://doi.org/10.1016/j.procs.2023.09.011
Hayami, R., Sunanto, & Oktaviandi, I. (2021). Penerapan Metode Single Exponential Smoothing Pada Prediksi Penjualan Bed Sheet. Jurnal CoSciTech (Computer Science and Information Technology), 2(1), 32–39. https://doi.org/10.37859/coscitech.v2i1.2184
Kafil, M. (2019). Penerapan Metode K-Nearest Neighbors. Jurnal Mahasiswa Teknik Informatika (JATI), 3(2), 59–66.
Lianda, D., & Atmaja, N. S. (2021). Prediksi Data Buku Favorit Menggunakan Metode Naïve Bayes (Studi Kasus: Universitas Dehasen Bengkulu). Pseudocode, 8(1), 27–37. https://doi.org/10.33369/pseudocode.8.1.27-37
Ma’arif, A. (2020). Buku Ajar Pemrograman Lanjut Bahasa Pemrograman Python Oleh : Alfian Ma ’ Arif. Universitas Ahmad Dahlan, 62.
Mardiyyah, N. W., Rahaningsih, N., & Ali, I. (2024). Penerapan Data Mining Menggunakan Algoritma K-Nearest Neighbor Pada Prediksi Pemberian Kredit Di Sektor Finansial. Jurnal Mahasiswa Teknik Informatika, 8(2), 1491–1499.
National Cancer Institute. (2020). Pseudocode – Definition (v1). Qeios. https://doi.org/10.32388/tf77dy
Nugraha, A.R.D, Auliasari, K., & Agus Pranoto, Y. (2020). IMPLEMENTASI METODE K-NEAREST NEIGHBOR (KNN) UNTUK SELEKSI CALON KARYAWAN BARU (Studi Kasus : BFI Finance Surabaya). JATI (Jurnal Mahasiswa Teknik Informatika), 4(2), 14–20. https://doi.org/10.36040/jati.v4i2.2656
Ritonga, A. S., & Muhandhis, I. (2021). Teknik Data Mining Untuk Mengklasifikasikan Data Ulasan Destinasi Wisata Menggunakan Reduksi Data Principal Component Analysis (Pca). Edutic - Scientific Journal of Informatics Education, 7(2). https://doi.org/10.21107/edutic.v7i2.9247
Setiyani, L., Wahidin, M., Awaludin, D., & Purwani, S. (2020). Analisis Prediksi Kelulusan Mahasiswa Tepat Waktu Menggunakan Metode Data Mining Naïve Bayes : Systematic Review. Faktor Exacta, 13(1), 35. https://doi.org/10.30998/faktorexacta.v13i1.5548
Syahril, M., Erwansyah, K., & Yetri, M. (2020). Penerapan Data Mining Untuk Menentukan Pola Penjualan Peralatan Sekolah Pada Brand Wigglo Dengan Menggunakan Algoritma Apriori. J-SISKO TECH (Jurnal Teknologi Sistem Informasi Dan Sistem Komputer TGD), 3(1), 118. https://doi.org/10.53513/jsk.v3i1.202
Ziarahah, L. I., & Anwar, R. (2023). Akad Mudharabah Dan Relevansinya Dengan Tafsir Qur’an Surah an-Nisa Ayat 29 Tentang Larangan Mencari Harta Dengan Cara Yang Bathil. Equality: Journal of Islamic Law (EJIL), 1(1), 26-38. https://doi.org/10.15575/ejil.v1i1.480
Downloads
Published
How to Cite
Issue
Section
License
Copyright (c) 2025 Anisa Rahman, Muhammad Siddik Hasibuan, Aidil Halim Lubis

This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License.