## 8 Experiments and Discussions
In each RGB image, the mango's defect, length, and width were extracted through the image conversion stages: Calibration image, HSV image, and binary image. In Figure 13, The distributions of length, width, and volume in the dataset have a shape similar to the Gaussian function. Besides, we observed that length and width have a linear relationship to volume (\(V\)). Hence, the volume of mango is predicted from its length and width based on the prediction model of linear regression shown in Equation (31). \[V=-1088.2+4.1e+11.7 wi \tag{31}\]  
The estimated sizes as length and width from pixels of the binary image of mango were compared with the actual ones. Additionally, the estimated values of volume by external features were different from actual volumes, which determined by the overflow method. Thus, we utilized three measures to compare the performance of the estimation features. These measures (Table 2) are the mean absolute error (_MAE_), the root mean square error (_RMSE_) [29], and the mean absolute percentage error (_MAPE_) [30]. According to Table 2, the results show good performance. The _MAPE_ with the maximum value of 0.01283 and the minimum value of 0.00486 are acceptable. The _MAE_ of length, width, defect, volume, and density are 0.65371, 0.50863, 0.02954, 5.79612, and 0.01376, respectively. Five features show that there are small error distributions due to insignificant differences between _RMSE_ and _MAE_. Figure 12: The process of extracting dimensions and defects of mangoes. The importance of data normalization and elimination of outliers (_DNEO_) in model accuracy was mentioned in Section 7. The impact of the _DNEO_ process on model performance is therefore presented in this section. As can be seen from Table 3, four features are in very different ranges which are determined by min and max values of variables. The ranges of _we_, _he_, _wi_ account for (112,784), (15,300), (16,300), respectively while that of defect only from (0-29) and it is the lowest scale. Although _de_ is important as a predictor, it intrinsically influences the result less due to its smaller value. After using the _DNEO_ process, in Table 4, there is a significant decrease of 218 outliers in the original data. In Figure 14a,  
models, if the _DNEO_ is used. In the original dataset, the accuracy of \(RF\), \(LDA\), \(KNN\), and \(SVM\) models account for 41.31%, 44.00%, 41.31%, and 44.28%, respectively. After using _DNEO_, the corresponding performances of these models considerably grow up to 91.50%, 86.56%, 86.20%, and 81.90%. According to Figure 15, the accuracy of the \(RF\) model is the highest, the \(SVM\) model is the lowest. Additionally, the prediction for class \(G_{2}\) in all models is lower in the two other classes. After the implementation of the _DNEO_, result has unqualified performance because of uncontrolled overfitting. Additionally, models' parameters have still not been identified optimally. [PERSON] and [PERSON] [21] showed that overly optimistic performance estimates can be produced by using the same data to validate and train models. They also suggested the unbiased performance estimates given in nested cross-validation (\(NCV\)). \(NCV\) method used to tune parameters with an internal \(NCV\) loop while an external \(NCV\) was used to calculate an estimate of the error. Considering the accuracy of the models by the size of the training data to select the number of folds in the \(NCV\) method (Figure 16). The horizontal axis denotes the percentage of the initial data used for training models. The vertical axis denotes the accuracy of the models that match the horizontal axis values. In Figure 16, when training about 80% of the original dataset, the accuracy of models is the highest. Therefore, in both the inner and outer loops of the \(NCV\) method, 10 folds were used to ensure that 80% of the data was used in training models. The performance of the models was determined by testing data divided 10 times in the outer layer.