# Intra-Plot Variable N Fertilization in Winter Wheat through Machine Learning and Farmer Knowledge
## 3 Results and Discussion
### Fertilization Prescription Map  
After validating the predictive ability of the RF algorithm to forecast yield for an entire plot and adjusting the hyperparameters to optimize its performance, it was run over the Torres plot (Figure 1, green dots) belonging to farmer 2. The mean estimated yield with the model was 5.3 t ha\({}^{-1}\), which is within the range of the production of the other plots (Table 1). The maximum and minimum values obtained from the model do not show anomalous data as they ranged from 7.4 ha\({}^{-1}\) to 4.3 t ha\({}^{-1}\). To facilitate the interpretation of the information by the end user, a continuous map without gaps was created by an interpolation using the ordinary kriging method (Figure 5A). The RMSE between the interpolated map and the measured values was 0.127. The interpolated map was considered good as there was no distortion compared to the original data. Figure 5A shows the estimated yield map once interpolated and classified into four different homogeneous zones using the ISODATA algorithm. The plot was divided into four different zones at the request of the farmer. Zone 1, with an average yield of 4.6 t ha\({}^{-1}\), was the least productive while zones 2 and 3 had average yields of 5.1 and 5.5 t ha\({}^{-1}\), respectively. With a production of more than 6 t ha\({}^{-1}\), zone 4 was the most productive (Figure 5A). While the predictive ability for a whole plot was validated (Table 2), the results obtained showed that the prediction accuracy was variable. Detailed yield information is usually not available because few smallholder farmers have a yield monitor [43], and so the use of common metrics (R\({}^{2}\), RMSE, accuracy, Kappa index) to validate the result has to be discarded. To try to solve this handicap and in view of the farmer's in-depth knowledge of the field, he was invited to represent the yield map that he had in mind (Figure 5B) before showing him the map obtained using the model. Previous works published by [PERSON] et al. [44] have shown the usefulness of this type of information. A simple visual comparison of both maps shows similar production patterns, strengthening the accuracy of the results obtained in the validation of the algorithm for the whole parcel in the previous section. Seeing the similarities between the map obtained by the algorithm and the one presented by farmer 2, he was asked about how he was able to differentiate the  
Figure 5: (**A**) Interpolated map based on the estimated yield data according to the RF algorithm. (**B**) Yield map provided by the farmer. (**C**) Nitrogen fertilizer prescription map derived from maps (**A**,**B**). Afterwards, to verify whether there were differences in production between the zones, an ANOVA, and subsequent post hoc HSD Tukey test were conducted. The analysis showed that there were significant differences (\(p<0.001\)) in production between the four zones (**A**). production areas so well. His surprising answer was that that the noise of the grain hitting the hopper was much louder in the higher production areas. These models work with high-resolution data that provide information on the current state of the crop. However, they do not supply information on the cause of yield differences. Collaborative work with the farmer allows scientists to understand the reasons behind yield variability. In this case, the southernmost part of zone 1 is characterized by shallow and pale-colored surface soils and as being the least productive area of the field (Figure 5A). Due to the smaller soil volume and pale surface color, it heats up faster, and, for this reason, cereals tend to sprout abundantly. However, because of a low soil water-holding capacity, the crop does not grow adequately later due to water stress. The farmer indicated that the origin of the low production of the northern part of zone 1 was different (Figure 5A). Until 30 years ago, this zone was a \"ribazo\" (an area characterized by a steep slope between two plots).