## 3 Results and Discussion
### Ripeness Classification Results
#### 3.2.2 Best ML Models' Performance  
Figure 3 illustrates the confusion matrix for the classification of kiwifruits for each ML model. Classes A, B, and C correspond, respectively, to pre-harvest, harvest, and postharvest stages. The accuracy of DTs is moderate, and there were many wrong classifications between classes A and B, with only 25 out of 45 samples of class A and 18 out of 45 of class B being correctly classified, showing that the model performed poorly toward especially for these two classes. Class C presented worse results, but still, with only 34 correct predictions, the tree model seems able to at least distinguish one class better. The low-to-moderate R\({}^{2}\) (0.50) value confirms the low explanatory power, and the relatively high RMSE (0.45) and MAE (0.38) values reflect inaccuracy in prediction, especially for classes A and B.  
ANN clearly dominates the others, providing almost perfect classification with one misclassified data for each class. It was able to accurately predict 44 out of 45 cases in all classes, indicating the good generalization and pattern recognition ability for the classifier. This indicates that the ANN was able to learn the intricate relationships among the input features and the class label. The extremely high R\({}^{2}\) (0.95) and low RMSE (0.08) and MAE  
Figure 3: Confusion matrices of machine learning models used for classifying three classes of kiwifruit (A, B, and C): model 1 (decision tree), model 2 (artificial neural network), model 3 (linear discriminant analysis), and model 4 (support vector machine). Classification results are shown as a color map, ranging from correct classifications in green to incorrect classifications in red.  
(0.03) indicate a high accuracy and small error for the estimation, which is in agreement with the high classification accuracy found in the confusion matrix.  
Like the DT, the LDA achieved a relatively poor performance, in particular with class A (only 5 correctly classified out of 45 samples). It is prone to classify class A as class B, which means that there are problems in dealing with nonlinearly separable data or overlapping feature distributions. The results of the LDA show a poor ability to discriminate, especially for classes A and B. The fact that the LDA is linear may lead to this loss of performance in a too complex nonlinear classification frontier. The SVM was fairly weak, yet offered a better class separation in comparison to the DTs and the LDA. It accurately predicted 31, 29, and 29 for classes A, B, and C, respectively, but there is still some confusion, particularly for class B, which was frequently misclassified as A or C, which suggests that the SVM was better but not entirely stable with regard to data overlap or kernel bound.  
Recent studies have demonstrated the effectiveness of ML models in classifying fruit quality attributes. [PERSON] & [PERSON]. (2022) [44] developed four common machine learning (ML) classifiers, the k-mean, naive Bayes, Support Vector Machine, and Feed-Forward Artificial Neural Network (FANN), all of which were aimed at classifying the ripeness stage of mangoes at harvest. Further, [PERSON] & [PERSON]. (2025) [45] proposed a novel non-destructive approach for classifying the sweetness of Khao Tang Kwa pomelos by integrating machine learning (ML) techniques with acoustic signal and image processing. They used deep learning and vision-based features to classify, achieving an R\({}^{2}\) of 0.93 and low error values. These findings closely align with our results, where the Artificial Neural Network (ANN) model yielded the best performance for kiwifruit classification (R\({}^{2}\): 0.95, RMSE: 0.08, MAE: 0.03). The effectiveness of ANN in our study mirrors the superior performance of complex, nonlinear models highlighted in these works, reaffirming their capacity to handle subtle variations in fruit morphology and physicochemical properties