Prediction of Selected Minerals in Beef-Type Tomatoes Using Machine Learning for Digital Agriculture
Aylin Kabaş, Uğur Ercan, Onder Kabas, Georgiana Moiceanu
Tomato is one of the most important vegetables due to its high production and nutritional value. With the development of digital agriculture, the tomato breeding and processing industries have seen a rapid increase in the need for simple, low-labor, and inexpensive methods for analyzing tomato composition. This study proposes a digital method to predict four minerals (calcium, potassium, phosphorus, and magnesium) in beef-type tomato using machine learning models, including k-nearest neighbors (kNN), artificial neural networks (ANNs), and Support Vector Regression (SVR). The models were discriminated using the coefficient of determination (R2), root mean square error (RMSE), mean absolute error (MAE), and mean absolute percentage error (MAPE). The kNN model showed the best performance for estimation of quantity of calcium, potassium, phosphorus, and magnesium. The results demonstrate that kNN consistently outperforms ANNs and SVR across all target nutrients, achieving the highest R2 and the lowest error metrics (RMSE, MAE, and MAPE). Notably, kNN achieved an exceptional R2 of 0.8723 and a remarkably low MAPE of 3.95% in predicting phosphorus. This study highlights how machine learning can provide a versatile, accurate, and efficient solution for tomato mineral analysis in digital agriculture.