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

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.

Authors

Institutions

Publication Details

Journal
Jurnal RESTI (Rekayasa Sistem dan Teknologi Informasi)
Published
2025-08-28
DOI
https://doi.org/10.29207/resti.v9i4.6441
Primary Topic
Spectroscopy and Chemometric Analyses
Type
article
Field-Weighted Citation Impact
0.00
Controls
|||
ALL TIME
JAN
FEB
MAR
APR
MAY
JUN
JUL
AUG
SEP
OCT
article

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

Andréa Dini, Lidya Ningsih Lidya, Arif Mudi Priyatno Arif
1 links
Jurnal RESTI (Rekayasa Sistem dan Teknologi Informasi)
Spectroscopy and Chemometric Analyses
article

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

Andréa Dini, Lidya Ningsih Lidya, Arif Mudi Priyatno Arif
article en

Abstract

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.

Jurnal RESTI (Rekayasa Sistem dan Teknologi Informasi)Vol. 9(4)
Universitas Pahlawan Tuanku Tambusai (ID), Telkom University (ID)
Openalex Percentile: Top 75%
Spectroscopy and Chemometric Analyses
AI Navigator

Ask Laika to Summarize, Analyze, and Connect papers live on the map.

Summarize Papers & Methodologies

Extract key findings, datasets, and comparative methods across publications.

Benchmark Rankings & Visual Analytics

Rank top research institutions, authors, funders, topics, and journals by Field-Weighted Citation Impact (FWCI) and paper volume with instant charts.

Connect Distant Disciplines

Bridge topological clusters on the map to find hidden collaborative intersections.