## 3 Results
### Results of Ensemble Models
In summarizing the methodology employed in this study to predict maize yield using an ensemble ML model with IoT environmental data and UAV vegetation indices, we focused on assessing the performance of diverse models through various approaches to feature selection, hyperparameter tuning, and ensembling. The comparative evaluation of the scores for different models and methods is presented in Table 8 and Figure 9.  
For feature scaling, the \(R^{2}\) feature scaler utilized the StandardScaler to scale the training and testing datasets, standardizing them to have a mean of 0 and a standard deviation of 1. This process ensures that all features have the same scale, which is crucial for certain algorithms sensitive to feature scaling. Feature importance, evaluated through the \(R^{2}\) feature SHAP, involved employing SHAP to understand the importance of features in the model. SHAP provides a unified measure of feature importance, aiding in understanding which features the model deems significant. Hyperparameter tuning, denoted as the \(R^{2}\) feature hyperparameter, involved fine-tuning the model's hyperparameters using GridSearchCV. This step ensures the selection of the best set of hyperparameters for the model, optimizing its performance. In the ensembling phase, labeled as the \(R^{2}\) ensemble, the models were combined using four different methods and weights. PENemble 1 combined Huber, M estimators, linear regression, and ridge regression with weights of [0.5, 0.3, 0.1, 0.1], resulting in an \(R^{2}\) score of 0.924202. PENemble 2 combined Huber, M estimators, and linear regression with weights of [0.45, 0.35, 0.2], resulting in an \(R^{2}\) score of 0.924131. PENemble 3 combined Huber, M estimators, and ridge regression with weights of [0.45, 0.35, 0.2], resulting in an \(R^{2}\) score of 0.924017. PENemble 4 combined Huber and M estimators with weights of [0.6, 0.4], achieving the highest \(R^{2}\) score of 0.925427. \begin{table}
\begin{tabular}{c c c c c} \hline \hline
**Model** & \(R^{2}\) **Feature Scaler** & \(R^{2}\) **Feature\_SHAP** & \(R^{2}\) **Feature\_Hyperparameter** & \(R^{2}\) **Ensemble** \\ \hline Huber & 0.926222 & 0.926313 & 0.926266 & 0.924202 \\ M-estimators & 0.921954 & 0.924826 & 0.924030 & 0.924131 \\ Linear Regression & 0.904104 & 0.918302 & 0.918302 & 0.924017 \\ Ridge Regression & 0.911118 & 0.916077 & 0.916892 & 0.925427 \\ \hline \hline \end{tabular}
\end{table} 
Table 8: Comparison of \(R^{2}\) scores for different models. Figure 9: Comparison of \(R^{2}\) scores for different models and ensemble methods. In summary, the use of different strategies yielded diverse \(R^{2}\) scores. Through ensembling, the strengths of individual models were effectively combined, potentially leading to improved and more robust predictions. Notably, the results indicate that the ensemble method, particularly Method 4 (incorporating Huber and M estimators), achieved a slightly superior \(R^{2}\) score compared to the other ensemble methods and individual models. Importantly, the ensemble model demonstrated robustness in handling unseen data, enhancing its utility for predictive tasks. In the context of our study, the accuracy of our model, validated with previously unseen data on the number of subgrids to coverage in each plot, is visually presented in Figure 10b. Plot 1, Plot 2, and Plot 3 comprise 1393 grids, 1612 grids, and 1693 grids, respectively. Figure 10a illustrates the accuracy trends of various prediction models across these distinct plots, encompassing both traditional and ML methodologies. * Breeder (traditional method): Our traditional approach exhibited varying accuracy levels across plots, with the lowest accuracy observed in Plot 1 and higher accuracies in Plots 2 and 3. Notably, it appears less effective for Plot 1, indicating potential limitations when predicting yields for certain scenarios. * ML models (Huber, M estimators, linear regression, ridge regression): These models consistently demonstrated a stable accuracy range of 75-90% across all three plots.