K-Nearest Neighbor (KNN) Algorithm to Determine the Stock of Building Material Store Materials


  • Delilla Safitri * Mail State Islamic University of North Sumatera, Medan, Indonesia
  • Muhammad Fakhriza State Islamic University of North Sumatera, Medan, Indonesia
  • (*) Corresponding Author
Keywords: K-Nearest Neighbor; Algorithm; RapidMiner; UML

Abstract

In recent months, a lot of infrastructure has been built, resulting in a shortage of goods in the warehouse due to increased demand for consumer goods and some goods not being sold. Such was the case in January and February 2024 when Riko Jaya panglong experienced a shortage of sand and cement supplies, causing losses. This makes it difficult to predict the inventory of an item in the warehouse. Inventory of goods has great strategic importance for the company. This prediction is very useful in determining the amount of goods to be shipped in the following month. Therefore, companies must implement proactive inventory management. The K-Nearest Neighbor algorithm which looks at the ecluiden distance between old cases and is compared with new cases in an effort to recognize supervised data or data that already exists and has been recorded to help make decisions on the latest cases, this algorithm is very widely applied in other studies because this algorithm has very simple steps and logical reasoning processes by producing the right data and decisions. This data is processed to determine the classification of goods whether increasing or decreasing. And the K-NN algorithm with a value of k = 3 is used to predict stock items. The test results show that K-NN can provide accurate predictions by calculating the Euclidean distance between testing data and training data. The prediction accuracy obtained from the Confusion Matrix reached 100%, indicating the high reliability of this model. Implementation of the K-NN algorithm in RapidMiner with cross-validation technique resulted in a performance of 71.43% for decreasing classification and 67.57% for increasing classification, showing the efficiency of the algorithm in classifying stock data.

Downloads

Download data is not yet available.

References

S. Silvilestari, “Data Mining Menggunakan Algoritma K-Nearest Neighbor Dalam Menentukan Kredit Macet Barang Elektronik,” mib, vol. 5, no. 3, p. 1063, Jul. 2021, doi: 10.30865/mib.v5i3.3100.

D. Handoko, H. S. Tambunan, and J. T. Hardinata, “Analisis Penjualan Produk Paket Kuota Internet Dengan Metode K-Nearest Neighbor,” jurasik, vol. 6, no. 1, p. 111, Feb. 2021, doi: 10.30645/jurasik.v6i1.275.

Amanda Pratiwi, Ananto Tri Sasongko, and D. K. Pramudito, “ANALISIS PREDIKSI GILINGAN PLASTIK TERLARIS MENGGUNAKAN ALGORITMA K-NEAREST NEIGHBOR DI CV MENEMBUS BATAS,” JINTEKS, vol. 5, no. 3, pp. 437–445, Aug. 2023, doi: 10.51401/jinteks.v5i3.3323.

A. A. Arif, M. Firdaus, and Y. Maruhawa, “Comparison of Data Mining Methods for Predition of Rainfall with C4.5, Naïve Bayes, and KNN Algorithm,” 2022.

M. Kafil, “PENERAPAN METODE K-NEAREST NEIGHBORS UNTUK PREDIKSI PENJUALAN BERBASIS WEB PADA BOUTIQ DEALOVE BONDOWOSO,” jati, vol. 3, no. 2, pp. 59–66, Sep. 2019, doi: 10.36040/jati.v3i2.860.

D. Desyanti and D. Wulandari, “Implementasi Algoritma K-Nearest Neighbour dalam Memprediksi Stok Sepeda Motor,” bits, vol. 4, no. 3, Dec. 2022, doi: 10.47065/bits.v4i3.2579.

Y. Findawati and M. Rosid Alfan, Buku Ajar Text Mining. Sidoarjo: UMSIDA Press, 2020.

I. L. Putra, “IMPLEMENTASI ALGORITMA PARTICLE SWARM OPTIMIZATION(PSO) DAN K-NEAREST NEIGHBOR(K-NN) DALAM MEMPREDIKSI KEBERHASILAN ANAK SMK MENDAPATKAN KERJA,” Technologia, vol. 13, no. 4, p. 339, Oct. 2022, doi: 10.31602/tji.v13i4.8167.

R. Bahtiar, “Implementasi Data Mining Untuk Prediksi Penjualan Kusen Terlaris Menggunakan Metode K-Nearest Neighbor,” 2023.

I. S. Muallif, H. Budiman, and N. Ransi, “Penerapan Data Mining untuk Prediksi Pergerakan Harga Saham Menggunakan Algoritma K-Nearest Neighbor” 2023.

D. M. Meliala and P. Hasugian, “Perbandingan Algoritma K-Nearest Neighbor Dengan Decision Tree Dalam Memprediksi Penjualan Makanan Hewan Peliharaan Di Petshop Dore Vet Clinic,” jtir, vol. 15, no. 3, p. 35, Nov. 2020, doi: 10.35842/jtir.v15i3.369.

V. P. Virza, G. Tri Pranot, and F. Eko Putra, “Klasifikasi Kebutuhan Sparepart Dengan Algoritma K-Nearest Neighbor Untuk Meningkatkan Penjualan Sparepart,” bit, vol. 4, no. 3, pp. 287–293, Sep. 2023, doi: 10.47065/bit.v4i3.729.

D. A. Saputri, S. Oyama, and S. Wardani, “Implementasi Data Mining Menggunakan Metode K-Nearest Neighbor Untuk Menentukan Stok Obat- Obatan Pada Apotek: Studi Kasus Apotek Salaam,” 2021.

L. Suryadi, N. Ngajiyanto, N. E. Pratiwi, F. Ardhy, and P. Riswanto, “PENERAPAN DATA MINING PREDIKSI PENJUALAN MEBEL TERLARIS MENGGUNAKAN METODE K-NEAREST NEIGHBOR(K-NN) (STUDI KASUS : TOKO ZERITA MEUBEL),” jusim, vol. 7, no. 2, pp. 174–184, Dec. 2022, doi: 10.32767/jusim.v7i2.1697.

A. Nurfajri and M. Subroto, “Hubungan Komunikasi Interpersonal Antar Narapidana Perempuan Dalam Merestorasi Mental di Dalam Lapas Perempuan Kelas II B Bengkulu,” Jurnal Pendidikan Kewarganegaraan UNDIKSHA, vol. Volume 9, No 3, Sep. 2021.

J. A. Septian, T. M. Fachrudin, and A. Nugroho, “Analisis Sentimen Pengguna Twitter Terhadap Polemik Persepakbolaan Indonesia Menggunakan Pembobotan TF-IDF dan K-Nearest Neighbor,” INSYST, vol. 1, no. 1, pp. 43–49, Aug. 2019, doi: 10.52985/insyst.v1i1.36.

Amanda Pratiwi, Ananto Tri Sasongko, and D. K. Pramudito, “ANALISIS PREDIKSI GILINGAN PLASTIK TERLARIS MENGGUNAKAN ALGORITMA K-NEAREST NEIGHBOR DI CV MENEMBUS BATAS,” JINTEKS, vol. 5, no. 3, pp. 437–445, Aug. 2023, doi: 10.51401/jinteks.v5i3.3323.

A. P. Nardilasari, A. L. Hananto, S. S. Hilabi, T. Tukino, and B. Priyatna, “Analisis Sentimen Calon Presiden 2024 Menggunakan Algoritma SVM Pada Media Sosial Twitter,” JOINTECS, vol. 8, no. 1, p. 11, Mar. 2023, doi: 10.31328/jointecs.v8i1.4265.

E. B. Pratama and U. Saparingga, “Pemodelan UML Sistem Informasi Administrasi Kependudukan Untuk Kantor Desa,” jims, vol. 15, no. 2, pp. 107–118, Oct. 2021, doi: 10.33998/mediasisfo.2021.15.2.1085.

M. Ikhsan and R. Kurniawan, “Penerapan Text Mining pada Sistem Rekomendasi Pembimbing Skripsi Mahasiswa Menggunakan Algoritma Naïve Bayes Classifier,” Indonesian Journal of Computer Science, vol. 12, no. 6, 2023.


Bila bermanfaat silahkan share artikel ini

Berikan Komentar Anda terhadap artikel K-Nearest Neighbor (KNN) Algorithm to Determine the Stock of Building Material Store Materials

Dimensions Badge
Article History
Submitted: 2024-08-04
Published: 2024-08-12
Abstract View: 403 times
PDF Download: 366 times
Section
Articles