Implementation K-Nearest Neighbor (KNN) Algorithm for Identifying Pattern Differences Between Betel Leaves and Pepper Leaves

Zulham Sitorus, Ade May Luky Harefa, Indra Marto Silaban, Maimuddin Noor, Ica Safrila, Donas Putra

Abstract


This research aims to identify the pattern differences between betel leaf (Piper betle) and black pepper leaf (Piper nigrum) using the K-Nearest Neighbor (KNN) algorithm. The method is applied to classify the two types of leaves based on image features such as texture, shape, and color. A total of 200 leaf images were used, divided into 70% training data and 30% testing data. Feature extraction was conducted to obtain the most relevant characteristics from each image. The classification process was performed with various K values, and the highest accuracy was achieved when K = 3. The results showed an accuracy of 91.5%, with a precision of 90.8%, recall of 92.3%, and F1-score of 91.5%. These findings indicate that the KNN algorithm is effective in distinguishing betel and pepper leaves using digital image processing. Texture and color features contributed the most to the classification performance. This study shows the potential of KNN-based leaf pattern recognition for practical applications in agriculture, herbal identification, and plant classification systems.

Keywords


K-Nearest Neighbor; Leaf Identification; Texture Features; Classification.

Full Text:

PDF

References


M. P. Akmal, Keanekaragaman Hayati (Biodiversitas): Modul Ajar IPA Biologi Kelas X, Fase E. Akmal’s Library, 2022.

A. F. Al Mutahhar, “IDENTIFIKASI KARAKTERISTIK FISIK MINYAK ATSIRI PADA LADA HITAM (Piper nigrum L.) DAN SIRIH HIJAU (Piper betle L.).” Akademi Farmasi Surabaya, 2021.

L. Yuliana, “Studi morfologi genus Piper dan variasinya,” Biocaster J. Kaji. Biol., vol. 3, no. 1, pp. 11–19, 2023.

A. N. B. R. Tarigan, E. Nurtjahya, and T. A. Aththorick, “Obat Tradisional Peningkat Imunitas Tubuh Etnis Karo, Kecamatan Sinembah Tanjung Muda Hulu,” Biocelebes, vol. 16, no. 1, pp. 21–29, 2022.

M. N. Ramdhani, A. Firdaus, H. F. Reine, and A. Supriyatna, “Analisis Morfo-Anatomi Daun Sirih dari Famili Piperaceae dan Araceae di Kampung Warung Peuteuy, Kecamatan Cicalengka,” Polyg. J. Ilmu Komput. dan Ilmu Pengetah. Alam, vol. 2, no. 4, pp. 70–82, 2024.

E. Erwin et al., Pengantar & Penerapan Internet Of Things: Konsep Dasar & Penerapan IoT di berbagai Sektor. PT. Sonpedia Publishing Indonesia, 2023.

J. Saputra, Y. Sa’adati, V. Y. P. Ardhana, and M. Afriansyah, “Klasifikasi Kematangan Buah Alpukat Mentega Menggunakan Metode K-Nearest Neighbor Berdasarkan Warna Kulit Buah,” Resolusi Rekayasa Tek. Inform. dan Inf., vol. 3, no. 5, pp. 196–203, 2023.

G. Rahmawati, S. A. Sanmas, E. Nudyawati, N. D. Syaharani, M. R. Annas, and F. Fauzi, “Studi Perbandingan Performa: Prediksi Status Stunting Pada Anak Berdasarkan Data Antropometri Menggunakan Algoritma Support Vector Machine (SVM) dan K-Nearest Neighbors (KNN),” in PROSIDING SEMINAR NASIONAL SAINS DATA, 2024, pp. 782–790.

R. F. Putra et al., Algoritma Pembelajaran Mesin: Dasar, Teaknik, dan Aplikasi. PT. Sonpedia Publishing Indonesia, 2024.

S. Sugiyono and M. Ruswandi, “Pemodelan Pengolahan Citra untuk Klasifikasi Jenis Buah Pisang Menggunakan Metode KNN,” J. Pendidik. dan Konseling, vol. 4, no. 5, pp. 823–833, 2022.

V. Chandra, J. H. Jaman, and G. Garno, “Identifikasi Varietas Jagung Mutiara Berdasarkan Data Citra Digital Menggunakan Algoritma K-Nearest Neighbor,” NUANSA Inform., vol. 16, no. 2, pp. 1–14, 2022.

N. Saefulloh, J. Indra, R. Rahmat, and A. R. Juwita, “Implementasi Algoritma Convolutional Neural Network (CNN) Untuk Klasifikasi Kecacatan Pada Proses Welding di Perusahaan Manufacturing,” Build. Informatics, Technol. Sci., vol. 6, no. 1, pp. 387–394, 2024.

R. N. J. S. Intam, A. Raihan, M. Alfajri, A. B. Kaswar, and D. D. Andayani, “Sistem Klasifikasi Jenis Sampah Berdasarkan Kombinasi Fitur Warnac Tekstur Menggunakan Artifical Neural Network Berbasis Pengolahan Citra Digital,” J. Teknol. Inf. dan Ilmu Komput., vol. 11, no. 2, pp. 411–420, 2024.

A. H. S. Hadi and S. Agustin, “PENENTUAN KALORI MAKANAN BERDASARKAN FITUR WARNA DAN BENTUK MENGGUNAKAN METODE KNN (K-NEAREST NEIGHBOUR) BERBASIS ANDROID,” Kohesi J. Sains dan Teknol., vol. 4, no. 9, pp. 61–70, 2024.

A. A. Paturrahman, “Analisis pengenalan pola daun berdasarkan fitur canny edge detection dan fitur GLCM menggunakan metode klasifikasi K-Nearest Neighbor (K-NN),” Publ. Tugas Akhir S-1 PSTI FT-UNRAM, 2020.

I. Yolanda and H. Fahmi, “Penerapan Data Mining Untuk Prediksi Penjualan Produk Roti Terlaris Pada PT. Nippon Indosari Corpindo Tbk Menggunakan Metode K-Nearest Neighbor,” J. Ilmu Komput. dan Sist. Inf., vol. 3, no. 1.1, pp. 9–15, 2020.

R. Rina, P. M. Hasan, N. Ayu, and R. A. Saputra, “KLASIFIKASI KERINGANAN UKT MAHASISWA UHO MENGGUNAKAN K-NEAREST NEIGHBOR (KNN),” JATI (Jurnal Mhs. Tek. Inform., vol. 8, no. 6, pp. 11939–11945, 2024.




DOI: http://dx.doi.org/10.52155/ijpsat.v51.2.7350

Refbacks

  • There are currently no refbacks.


Copyright (c) 2025 Zulham Sitorus, Ade May Luky Harefa, Indra Marto Silaban, Maimuddin Noor, Ica Safrila, Donas Putra

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