Main Article Content
Abstract
Oranges are among the most widely consumed fruits globally. While many farmers possess extensive knowledge of orange cultivation, they often lack expertise in post-harvest handling and processing. Classification or grading is a crucial step after harvest to ensure quality. Machine learning offers an efficient solution for automating this process and decreasing the time consumed. This study implements two machine learning algorithms, Naïve Bayes and K-Nearest Neighbor, to classify Gerga oranges based on different training-to-test data ratios (75:25, 50:50, and 25:75). The results indicate that as the training data decreases, the accuracy of Naïve Bayes improves, but its precision declines, whereas K-Nearest Neighbor exhibits the opposite trend. The best accuracy (90% accuracy) was produced by NB-25 and KNN-75. Meanwhile, precision and recall value were more important in order to reduce economic losses and buyer dissatisfaction, so that users can profit more. In this case, the KNN-75 model is the best to classify Gerga oranges into the
right groups (85% precision, 91% recall). Despite the differences in class importance, KNN offers a steadier and more balanced outcome for both sides of the dataset. KNN is also more reliable to handle many number of samples in real practice when the model is used to design sorting or grading machines for oranges.
Keywords
Article Details
Copyright (c) 2026 Fadli Hafizulhaq, Andasuryani Andasuryani

This work is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License.
Authors who publish with this journal agree to the following terms:
- Authors retain copyright and grant the journal right of first publication with the work simultaneously licensed under a Creative Commons Attribution License that allows others to share the work with an acknowledgment of the work's authorship and initial publication in this journal.
- Authors are able to enter into separate, additional contractual arrangements for the non-exclusive distribution of the journal's published version of the work (e.g., post it to an institutional repository or publish it in a book), with an acknowledgment of its initial publication in this journal.
- Authors are permitted and encouraged to post their work online (e.g., in institutional repositories or on their website) prior to and during the submission process, as it can lead to productive exchanges, as well as earlier and greater citation of published work (See The Effect of Open Access).
References
- B. P. Statitik, Ekspor Buah-Buahan Tahunan menurut Negara Tujuan Utama, 2012-2023, 2024. https://www.bps.go.id/id/statistics-table/1/MjAyMCMx/ekspor-buah-buahan-tahunan-menurut-negara-tujuan-utama--2012-2023.html
- W. D. Wahyu, D. Syarif, A. Yani, Analysis of Microeconomic , Macroeconomic , and Maqashid Sharia Feasibility of Gerga Orange Agribusiness as a Source of New Economic Growth in Jambi Province , Indonesia, Ekonomis: Journal of Economics and Business 8(2) (2024) 1281–1293.
- N. S. M. Elkaoud, A. M. M. Elglaly, Development of Grading Machine for Citrus Fruits (Valencia Orange), Journal of Soil Sciences and Agricultural Engineering 10(11) 2019 671–677.
- S. K. Behera, A. K. Rath, A. Mahapatra, P. K. Sethy, Identification, classification & grading of fruits using machine learning & computer intelligence: a review, Journal of Ambient Intelligence and Humanized Computing March 2020.
- P. U. Patil, S. B. Lande, V. J. Nagalkar, S. B. Nikam, G. C. Wakchaure, Grading and sorting technique of dragon fruits using machine learning algorithms, Journal of Agriculture and Food Research 4 2021 100118.
- G. Guillergan, Naive Bayes Classifier in Grading Carabao Mangoes, Technium 22 2024 14–32.
- A. Kusuma, D. R. Ignatius, M. Setiadi, Tomato Maturity Classification using Naive Bayes Algorithm and Histogram Feature Extraction, Journal of Applied Intelligent System 3(1) 2018 39–48.
- S. Ghazal, W. S. Qureshi, U. S. Khan, J. Iqbal, N. Rashid, M. I. Tiwana, Analysis of visual features and classifiers for Fruit classification problem, Computers and Electronics in Agriculture 187 (February) 2021 106267.
- I. Rasyid, I. Saputra, R. K. S. Suryanegara, M. R. A. Yudianto, Maimunah, Classification of Tangerines on Fruit Ripening Levels Using K-Nearest Neighbor Algorithm, Prosiding University Research Colloquium 2022 403–409.
- I. B. A. Peling, I. N. Arnawan, I. P. A. Arthawan, I. G. N. Janardana, Implementation of Data Mining To Predict Period of Students Study Using Naive Bayes Algorithm, International Journal of Engineering and Emerging Technology 2 (1) 2017.
- K. U. Syaliman, E. B. Nababan, O. S. Sitompul, Improving the accuracy of k-nearest neighbor using local mean based and distance weight, Journal of Physics: Conference Series 978(1) 2018 1–6.
References
B. P. Statitik, Ekspor Buah-Buahan Tahunan menurut Negara Tujuan Utama, 2012-2023, 2024. https://www.bps.go.id/id/statistics-table/1/MjAyMCMx/ekspor-buah-buahan-tahunan-menurut-negara-tujuan-utama--2012-2023.html
W. D. Wahyu, D. Syarif, A. Yani, Analysis of Microeconomic , Macroeconomic , and Maqashid Sharia Feasibility of Gerga Orange Agribusiness as a Source of New Economic Growth in Jambi Province , Indonesia, Ekonomis: Journal of Economics and Business 8(2) (2024) 1281–1293.
N. S. M. Elkaoud, A. M. M. Elglaly, Development of Grading Machine for Citrus Fruits (Valencia Orange), Journal of Soil Sciences and Agricultural Engineering 10(11) 2019 671–677.
S. K. Behera, A. K. Rath, A. Mahapatra, P. K. Sethy, Identification, classification & grading of fruits using machine learning & computer intelligence: a review, Journal of Ambient Intelligence and Humanized Computing March 2020.
P. U. Patil, S. B. Lande, V. J. Nagalkar, S. B. Nikam, G. C. Wakchaure, Grading and sorting technique of dragon fruits using machine learning algorithms, Journal of Agriculture and Food Research 4 2021 100118.
G. Guillergan, Naive Bayes Classifier in Grading Carabao Mangoes, Technium 22 2024 14–32.
A. Kusuma, D. R. Ignatius, M. Setiadi, Tomato Maturity Classification using Naive Bayes Algorithm and Histogram Feature Extraction, Journal of Applied Intelligent System 3(1) 2018 39–48.
S. Ghazal, W. S. Qureshi, U. S. Khan, J. Iqbal, N. Rashid, M. I. Tiwana, Analysis of visual features and classifiers for Fruit classification problem, Computers and Electronics in Agriculture 187 (February) 2021 106267.
I. Rasyid, I. Saputra, R. K. S. Suryanegara, M. R. A. Yudianto, Maimunah, Classification of Tangerines on Fruit Ripening Levels Using K-Nearest Neighbor Algorithm, Prosiding University Research Colloquium 2022 403–409.
I. B. A. Peling, I. N. Arnawan, I. P. A. Arthawan, I. G. N. Janardana, Implementation of Data Mining To Predict Period of Students Study Using Naive Bayes Algorithm, International Journal of Engineering and Emerging Technology 2 (1) 2017.
K. U. Syaliman, E. B. Nababan, O. S. Sitompul, Improving the accuracy of k-nearest neighbor using local mean based and distance weight, Journal of Physics: Conference Series 978(1) 2018 1–6.