# Topdressing Nitrogen Demand Prediction in Rice Crop Using Machine Learning Systems
## 6 Results and Discussion  
Using the Root Mean Square (RMS) error between the predicted and observed yield values (from the yield maps) in the relevant years (2017-2019) for all the tested models, it was found that the XGBoost model resulted in the lowest error compared to the other three models (0.73 tn ha\({}^{-1}\)) provided, though, that DATE and LNC*DATE parameters were not included in the algorithm; otherwise, RMS error was found quite high in all cases. In practice, only SVR gave high RMS error in both cases, thus any of the three models, i.e., XGBoost, RF, and ElasticNet, could be selected for the analysis. Finally, the XGBoost model was selected for two reasons: (a) it was found more appropriate for the specific dataset, and (b) it performed slightly better than the other three models in the case of DATE inclusion (Figure 7). Furthermore, XGBoost performed better when the DATE was included in the parameters, as the difference between the observed and predicted values was reduced (Figure 8). \begin{table}
\begin{tabular}{c c c c c} \hline \hline
**Hyperparameter** & **XGBoost** & **RF** & **SVR** & **ElasticNet** \\ \hline learning\_rate & 0.03 & - & - & - \\ \hline max\_depth & 5 (3) * & 90 (80) & - & - \\ \hline n\_estimators & 100 & 1000 (100) & - & - \\ \hline subsample & 0.8 (0.5) & - & - & - \\ \hline early\_stopping\_rounds & 42 & - & - & - \\ \hline min\_samples\_leaf & - & 2 (4) & - & - \\ \hline min\_samples\_split & - & 2 (5) & - & - \\ \hline C & - & - & 100 & - \\ \hline gamma & - & - & 0.01 & - \\ \hline epsilon & - & - & 0.1 & - \\ \hline kernel & - & - & rbf & - \\ \hline alpha & - & - & - & 0.1 \\ \hline l1\_ratio & - & - & - & 0.0 \\ \hline max\_iter & - & - & - & 5 \\ \hline \hline \end{tabular}  
* in brackets, hyperparameter values for model runs without the DATE and LNC*DATE variables.  
\end{table} 
Table 4: A summary of the dataset used in the current research. Among the included parameters, VARIETY_1 (medium-size grain rice variety) was the most influencing parameter for the XGBoost either with or without inclusion of DATE parameter (Figure 9). For the optimally parameterized model, the DATE and LNC*DATE variables are highly weighted. Figure 8: Observed and predicted rice yield values of the XGBoost algorithm per zone (\(x\)-axis) with the inclusion of DATE parameter (**a**) and without (**b**). Figure 7: Root mean square (RMS) error for rice yield prediction for each of the machine learning models with the inclusion of DATE parameter (**a**) and without (**b**). Although soil properties showed to have lower values of relative importance compared to VARIETY, DATE, and LNC*DATE, their importance cannot be ignored, particularly for pH, calcium carbonate (CaCO3), potassium (K), organic matter (OM), and phosphorus (P). Nitrogen (N) is the most deficient nutrient for rice growing in Greece, and this is the reason it is provided in larger amounts compared to other nutrients. However, the N supplied to the rice crop was not considered as a significant feature in the models. Possibly, this has to do with the fact that the grower tends to oversupply with N. Thus, normally in many cases, N supply exceeds crop demand. This is the scope though of the MLS constructed in this research, i.e., to identify the delineated zones where excessive N would limit yield. The yield curves indicated that there is clear yield reduction when rice is supplied with more than 240 to 250 kg of nitrogen per hectare in all management zones. In other words, there is no yield benefit when rice is supplied with more than 250 kg of nitrogen per hectare in all cases (Figure 10). The presented curves in Figure 10 show that the yield range between the zones is small (9.21-9.78 t/ha) for the different N levels. This occurs because the N_need parameter representing the N fertilization rate, as shown in Figure 9, scores low in the feature importance plot.