A New Triple-Weighted K-Nearest Neighbor Algorithm for Tomato Maturity Classification

Dublin Core

Title

A New Triple-Weighted K-Nearest Neighbor Algorithm for Tomato Maturity Classification

Subject

DW-KNN; HSV; KNN; TW-KNN; W-KNN

Description

As climatic products, tomatoes are highly sensitive to harvesting and processing. The sorting of tomatoes can be significantly improved by utilizing Hue Saturation Value (HSV) color features that are classified using neighboring algorithms, such as K-Nearest Neighbor (KNN), Weighted K-Nearest Neighbor (W-KNN), and DW-KNN. However, the DW-KNN algorithm does not consider the relative relationship between the farthest, nearest, and surrounding neighbors, which may impact the classification accuracy, particularly in datasets with uneven distributions. This study proposes a Triple Weighted K-Nearest Neighbor (TW-KNN) algorithm for tomato image classification. This algorithm effectively handles the problem of sensitivity and outliers in the data distribution and considers the relationship between neighboring distances. The classification data consisted of 400 tomato images with five maturity levels divided into training and testing sets using k-fold cross-validation. Tests were conducted using several variations of parameter k, namely 4, 6, 9, and 15, to evaluate the classification performance. The results show that the proposed TW-KNN algorithm consistently outperforms other methods by producing better classification results. This is demonstrated by an accuracy rate of 95.52% across different values of k. The superior performance of the TW-KNN highlights its ability to provide robust and stable classification results compared to conventional KNN variants. This finding indicates that the TW-KNN is more effective in consistently classifying tomato fruits, making it a promising approach for automated fruit sorting applications

Creator

Lidya Ningsih1*, Arif Mudi Priyatno2, Addini Yusmar3

Source

https://jurnal.iaii.or.id/index.php/RESTI/article/view/6441/1128

Publisher

Department of Digital Business, Faculty of Economics and Business, Universitas Pahlawan Tuanku Tambusai, Kampar, Indonesia

Date

August 29, 2025

Contributor

FAJAR BAGUS W

Format

PDF

Language

ENGLISH

Type

TEXT

Files

Collection

Citation

Lidya Ningsih1*, Arif Mudi Priyatno2, Addini Yusmar3, “A New Triple-Weighted K-Nearest Neighbor Algorithm for Tomato Maturity Classification,” Repository Horizon University Indonesia, accessed February 3, 2026, https://repository.horizon.ac.id/items/show/10562.