# Optimization of CART Models Using Metaheuristics for Predicting Peach Firmness
## 6 Discussion  
From the summary of the RMSE results, it is possible to see that the GWO CART model gives the best predictions on test data. Other metaheuristics, such as the WOA, BHO, and DA, are also very successful in improving the accuracy of the default CART model. \begin{table}
\begin{tabular}{c c} \hline \hline
**Models** & \(\mathbf{p}\)**-Value** \\ \hline Default CART and GA Optimized CART & 0.0541 \\ Default CART and BA Optimized CART & 0.07835 \\ Default CART and DE Optimized CART & 2.2 \(\times\) 10\({}^{-16}\) \\ Default CART and PSO Optimized CART & 2.2 \(\times\) 10\({}^{-16}\) \\ Default CART and DA Optimized CART & 2.2 \(\times\) 10\({}^{-16}\) \\ Default CART and GWO Optimized CART & 2.2 \(\times\) 10\({}^{-16}\) \\ Default CART and WOA Optimized CART & 2.2 \(\times\) 10\({}^{-16}\) \\ Default CART and BHO Optimized CART & 2.2 \(\times\) 10\({}^{-16}\) \\ \hline \hline \end{tabular}
\end{table} 
Table 2: The \(t\)-test summary. Figure 5: RMSE sample distribution of the default pruned tree and its optimized variations. The best machine learning model is boosting, which has very similar prediction accuracy to the best-optimized CART models. In the previous research [1], the most accurate model was the CART model optimized using the GA, with an RMSE of 1.589032. Comparing it to the GWO model developed as part of this research, the GWO CART is slightly more accurate. It is important to note that this research uses 1000 samples of test data for predictions, while in [1], only one sample has been used. From the results of the \(t\)-test, it can be seen that the \(p\)-value associated with the Welch two-sample \(t\)-test is sufficiently low. Therefore, it is possible to reject the null hypothesis of no difference between the (true) prediction RMSE averages. The goal of the experiment is to develop an accurate machine learning model for peach firmness prediction and to test if various metaheuristics can be utilized in the optimization of machine learning models, more specifically in the improvement of peach firmness prediction accuracy of CART models. MLR, regression trees, ANFIS, ANN, bagging, boosting, and random forest machine learning models have been developed and compared to obtain the most accurate model for predicting peach firmness. The GA, BA, DE, PSO, DA, GWO, WOA, and BHO metaheuristic algorithms were applied to test the possibility of improving the prediction accuracy of the regression tree model. Other related works that are investigating the optimization of machine learning models using metaheuristics also reported positive results. By improving the performance of regression trees used for predicting peach firmness, this research introduces a new area of application for the mentioned methodology. This empirical experiment shows that by using various metaheuristic optimization techniques implemented in \(GA\) and _metaheuristicOpt_ R packages, it is possible to improve the accuracy of the default CART model. The significance of prediction accuracy improvement between optimized regression trees and default trees is given by the calculated \(t\)-tests. By replacing manual peach evaluation methods with the automated system described in this paper, the efficiency of the farming systems could be improved and food waste reduced. Some practical challenges could arise when implementing the proposed optimized machine learning models in real-world agricultural settings. One of the challenges is the initial cost of the proposed system, as well as the complexity of integrating it into the existing farming system. Future research could focus on introducing more metaheuristic algorithms and comparing their performance with the results shown in this paper. A generative adversarial network (GAN) can be utilized to generate a larger dataset that will be the basis for training and testing new machine learning models. Conceptualization, T.I. ; methodology, T.I. ; software, T.I. ; validation, T.I, M.G. and M.M. ; formal analysis, T.I., M.G. and M.M. ; investigation, T.I. ; resources, T.I. ; data curation, T.I.