Abstract
Applying at the economic optimal nitrogen rate (EONR) has the potential to increase nitrogen (N) fertilization efficiency and profits while reducing negative environmental impacts. On-farm precision experimentation (OFPE) provides the opportunity to collect large amounts of data to estimate the EONR. Machine learning (ML) methods such as generalized additive models (GAM) and random forest (RF) are promising methods for estimating yields and EONR. Twenty OFPE N trials in wheat and barley were conducted and analyzed with soil, terrain and remote-sensed variables to address the following objectives: (1) to quantify the spatial variability of winter crops yield and the yield response to N using OFPE, (2) to evaluate and compare the performance of GAM and RF models to predict yield and yield response to N and, (3) to quantify the impact of soil, crop and field characteristics on the EONR estimation. Machine learning techniques were able to model wheat and barley yield with an average error of 13.7% (624 kg ha−1). However, similar yield prediction accuracy from RF and GAM resulted in widely different economic optimal nitrogen rates. Across sites, soil available phosphorus and soil organic matter were the most influential variables; however, the magnitude and direction of the effect varied between fields. These indicate that training a model using data coming from different fields may lead to unreliable site-specific EONR when it is applied to another field. Further evaluation of ML methods is needed to ensure a robust automation of N recommendation while producers transition into the digital ag era.
Similar content being viewed by others
Avoid common mistakes on your manuscript.
Introduction
Nitrogen (N) management is one of the most critical management decisions to maximize yield and profit in cereal grain production. However, applying sufficient N to meet the crop demand while minimizing environmental N losses is still a challenge (Rockström et al., 2009; Zhang et al., 2015). This challenge remains due to the high variability of the economic optimal N rate (EONR) associated with the spatial and temporal variability in the yield response to N (Kahabka et al., 2004; Mamo et al., 2003; Pierce & Nowak, 1999) and to the uncertainty in modeling the relationship between N rates and yields (Kyveryga et al., 2009; Scharf et al., 2005; Tremblay et al., 2012). Despite the extensive knowledge about the complexity of N recommendations, current N recommendations are usually simplified versions of the true yield response function and they are not as accurate as needed to provide consistently reliable estimates of N needs across years at the field or subfield scale (Morris et al., 2018). For example, the use of yield goal as a proxy for estimating the EONR is a simplified method that often fails due to the lack of correlation between yield and EONR (Bachmaier & Gandorfer, 2009; Rodriguez et al., 2019; Scharf et al., 2006). Accurate recommendation systems are needed to optimize economic returns for farmers, maintain or increase yield required to meet global food demand and preserve the long-term functionality of terrestrial and aquatic ecosystems. Large variation in EONR poses a great challenge in attaining these goals.
Site-specific crop N management has been proposed as an effective way to increase N use efficiency (NUE), profit and yields by capturing the spatial and temporal variability of the optimal N rate (Mamo et al., 2003; Mulla, 2013; Trivelli et al., 2019). Unfortunately, the selection of a site-specific EONR is difficult to predict (Setiyono et al., 2011; Van Es et al., 2006). A site-specific N recommendation relies on the knowledge of the heterogeneous yield responses to N within the field and the ability to describe the response as a function of crop management, soil characteristics and weather (Pringle et al., 2004; Trevisan et al., 2021). However, site-specific information about crop yield responses to N rate is limited (Trevisan et al., 2021) and the benefits of a site-specific N management are often not fully understood (Lobell, 2007; Whelan & McBratney, 2000). Thus, the level of adoption has remained low despite the increasingly available site-specific technologies (e.g., yield monitors, remote sensing and variable rate applications). Scalable availability of site-specific information is fundamental to improve N recommendations, benchmark the value of precision and digital agriculture technology in crop production systems and promote adoption (Morris et al., 2018; Rodriguez et al., 2019).
Fortunately, variable-rate technology can be used to systematically control input levels in highly mechanized, large-scale production systems, making it possible to run large-scale on-farm precision experimentation (OFPE) (Kyveryga et al., 2009; Piepho et al., 2011). These experiments generate large amounts of site-specific yield response to input data that can be used, for example, to understand the spatial variation of EONR (Bullock et al., 2019). OFPE can be combined with inexpensive soil, terrain and crop characteristics such as apparent electrical conductivity, organic matter, elevation and vegetation indices (VI). This enables researchers to better capture the spatial structure of field attributes and their effect on yield response to N (Derby et al., 2005; Kitchen et al., 2008; Tremblay et al., 2012). Thus, site-specific yield response models can be estimated (Morris et al., 2018; Rodriguez et al., 2019). Therefore, OFPE allow for testing whether input rates can be profitably varied within fields by matching site-specific requirements (Bachmaier & Gandorfer, 2009; Lark & Wheeler, 2003).
Machine learning (ML) methods, such as random forest (RF), have gained popularity in fields related to yield modeling and N status estimation due to their capability of processing large and different types of data and analyzing both linear and non-linear relationships (Chlingaryan et al., 2018; Krause et al., 2020; Qiu et al., 2016). However, ML models tend to require large amounts of data and results could be difficult to interpret (Chlingaryan et al., 2018). The generalized additive models (GAM) may offer a middle ground between sophisticated ML techniques and simple linear models allowing for reliable predictions of complex processes while maintaining interpretability (Gardner et al., 2021; Wood, 2017). The large amount of site-specific yield response data from OFPE provides an opportunity for deploying site-specific ML models for yield and EONR estimation. To the authors’ knowledge, their use for EONR prediction has not been yet tested (Liakos et al., 2018).
This study proposed to improve the understanding of the spatial variability of crop yield response to N and to deploy ML based models to predict yield and EONR. OFPE on wheat and barley, field-specific crop and soil characteristics data and ML methods were used to address the following objectives: (1) to quantify the spatial variability of winter crops yield and the yield response to N using OFPE, (2) to evaluate and compare the performance of GAM and RF models to predict yield and yield response to N, and (3) to quantify the impact of soil, crop and field characteristics on the EONR estimation.
Materials and methods
OFPE designs and treatments
Thirteen wheat and seven barley N rate trials were conducted on commercial fields within the northwest region of Buenos Aires Province, Argentina (37.2017° S, 59.8411° W) from 2017 to 2019 (Fig. 1A, B). Soils in the experimental sites were sandy loams, thermic Typic Hapludoll, corresponding to the transitions between hills and the lowest areas; sandy loams, thermic Entic Hapludolls, corresponding to the sandy hills and Thapto-argic Hapludolls, associated with shallow soils with presence of a clay pan layer at fluctuating depths. Precipitation varied from 680 to 1012 mm with an average of 850 mm across sites and years.
Field trials were part of the Data-Intensive Farm Management (DIFM) project described in Bullock et al. (2019), with N as a treatment (DIFM N-trial). Each DIFM-N trial had six target N rates applied as broadcasted urea (0, 46, 92, 138, 184 and 230 kg N ha−1) or sprayed as urea ammonium nitrate (0, 32, 64, 96, 128 and 160 kg N ha−1) at early tillering. The allocation of the N rates in the experimental units followed a completely randomized factorial design replicated over a portion of the field considered to be the most spatially variable in soil properties and yield within the field (Fig. 1C). All N rates were implemented in the field using a variable rate fertilizer applicator and the as-applied data were used for further analysis. Each experimental unit with a unique N rate (“plot”) was given a dimension to match the swath width of the machinery available. Equipment swath varied from 12 to 35 m for the N applicators and from 6 to 12 m for the harvester. Size of the plots were adjusted to ensure two harvester passes within the as-applied N area. Thus, plot size varied among years, from 90 m2 to 200 m2. Other farming practices were kept constant throughout the field, and they were conducted by the farmers following standard protocols for the region.
Field measurements and remote sensing data
Soil apparent electrical conductivity at 0.30 and 0.90 m depth (EC30 and EC90, respectively), soil organic matter (SoilOM), P-Bray (SoilP) and pH (SoilpH) to a depth of 0.20 m were measured at each site. Soil ECa was collected in a series of parallel transects spaced approximately 30 m apart, using a Veris model 3100 (Veris Technologies, Salina, Kansas, USA). The ratio of the electrical conductivity at 0.30 m and 0.90 m was calculated (ECratio). Soil sampling was performed following a systematic grid with a density of one sample per hectare during the fall season after harvesting of the previous crop. Elevation data (Elev) was measured with a real time kinematic system (RTK, Trimble 5700, USA) and terrain parameters such as aspect (Asp), curvature (Curv), slope (Slo), terrain position index (TPI) and topographic wetness index (TWI) were derived using ArcMap 10.7 raster calculator (Environmental Systems Research Institute, Redlands, CA, USA). Two VIs were calculated using Sentinel-2 via Google Earth Engine platform (Gorelick et al., 2017), the normalized difference red edge index (NDRE) and the normalized difference vegetation index (NDVI). Previous findings have promoted these VIs as important indices to track key traits such as biomass, N status and leaf area index (Foster et al., 2017; Magney et al., 2017; Samborski et al., 2015). Published research supports the use of proxies, such as NDVI or NDRE, of the previous crop biomass to improve the prediction of optimal N rates due to their role in the N cycle (Archontoulis et al., 2020; Puntel et al., 2019). The NDRE from the previous crop (NDREpc) and NDVI from the previous crop (NDVIpc) were selected from the remote sensing variables based on their low correlation with other covariates and high correlation with yield.
Data processing and spatial aggregation
The DIFM N-trial OFPE prescriptions (Fig. 2A) were used to select the raw as-applied data from the feedback sensors in the variable rate applicator corresponding to the experiment area within the field. Raw as-applied point data from the applicator controller was transformed into polygons based on the distance and width of the machinery (raw as-applied polygon areas). Raw as-applied polygon areas (Fig. 2B) were cleaned by removing overlapping polygon areas and outliers. To facilitate data aggregation of field characteristics, consecutive as applied polygons (Fig. 2B) corresponding to N rates within 20 kg N ha−1 from each other were merged into a single as-applied uniform N application area (Fig. 2C).
Yield data was collected using combine yield monitoring system and cleaned with the Yield Editor 2.0 software (Sudduth et al., 2012). Further quality control of the yield data was performed by relating it with NDVI (Trevisan et al., 2019a). Field_ID 12 and 13 were removed from the database due to lack of quality in the data. These fields had extremely low and high yield values, abnormal patterns across the field and poor correlation between yield and maximum NDVI from the growing season. Cleaned yield data points were transformed into polygons using the width and the traveled distance recorded in the yield monitor (now called “yield harvest area”) and an overlap between yield polygons was allowed up to 5%. Final database contained 40% barley and 60% wheat yield data points.
Yield harvest area was then spatially joined with the as-applied uniform N application area (Fig. 2C, Fig. S1) and interpolated field characteristics. Point-based data layers (e.g., EC and grid soil sampling) were interpolated using empirical Bayesian kriging at one-meter square resolution. Soil properties and VIs characteristics were averaged within the yield harvest area. Data processing was performed using ArcMap 10.7 (Environmental Systems Research Institute, Redlands, CA, USA) and Quantum GIS (QGIS Development Team, 2021).
Analysis of spatial yield variability
To evaluate the yield variability between and within fields (spatial), the coefficient of variability (CV) was used (Kravchenko et al., 2005). The CV for yields with no N fertilizer (Yield-N0, less than 26 kg N ha−1), and yield with high N fertilizer (Yield-NH, more than 161 kg N ha−1) were calculated per field, year and across all site-years. In addition, the mean yield response to N was calculated as the difference between Yield-NH and Yield-N0 and analyzed for statistical differences using a t-test and considered significantly different at a p value < 0.05.
ML yield modeling
Yield was modeled using RF and GAM. The explanatory variables used to fit the models vary field by field (see Table S1 for a selection of the variables characterizing each field). The “grf” and “mgcv” packages in R were used to train GAM and RF models, respectively (Tibshirani et al., 2022). The RF model does not require explanatory variables to be specified quantitatively in relation to the dependent variable. In contrast, the GAM model needs to specify what variables to be modeled flexibly using smoothing splines and what and how variables interact with each other. Let \({x}_{j}\) denote \(j\) explanatory variable (\(j\) total number of variables) and N denote nitrogen rate. The yield model for GAM is specified as follows:
In the above formulation, \(f()\) is the smoother of the impact of nitrogen on yield, \({g}_{j}()\) is the smoother of the impact of \({x}_{j}\), and \({x}_{j}\times N\) is the interaction of nitrogen rate and \({x}_{j}\) that captures how the impact of N is altered by other variables (\({x}_{j}\)). For both \(f\)() and \(g\)(), thin plate splines are used for smoothing (Wood, 2003). Yield predictions were run for each yield harvest area.
RF and GAM were tuned using spatial cross-validation. When spatial autocorrelation is present in the dataset, such as DIFM N-trials (Miller, 2004), hyper-parameter tuning using spatial cross-validation is recommended instead of regular cross-validation (Lovelace et al., 2019; Vucetic et al., 1999). RF was tuned on three hyper-parameters and two sets of variable collections using spatial cross-validation. Specifically, the number of variables used for sample splitting, minimum number of observations per tree leaf and the sample fraction parameter for RF were tuned. Further, two sets of variable collections were considered. The first set included all the explanatory variables, and the second set included only variables that are not highly correlated with one another. For the second set, one of the variables with a correlation coefficient higher than 0.8 was dropped. For GAM and RF, spatial cross-validation was conducted to select one of the two sets of variable collections based on the model performance (Table S2).
Spatial cross-validation was conducted using tenfold spatially clustered train and test datasets generated using the “spatial sample” package (Silge & Mahoney, 2022). The area per fold varied from 2 to 4.5 ha with a range of 200 to 300 observations per fold. Figure 3 illustrates how spatially clustered train and test datasets were laid out for the 10 folds for field 1 as an example. The optimal set of hyper-parameters and variables that had the lowest average root mean square error (RMSE) of yield prediction from the spatial cross validation for each model and field was selected (Table S2). RF and GAM were then trained using all the observations entire dataset with their respective selected hyper-parameters and a set of variables for each field. For RF, the number of trees was set to 2000 to stabilize predictions.
Estimation of EONR and YEONR
Site-specific EONR for each field was obtained by solving the profit maximization problem at each yield harvest area. Let \(s\) denote a site within a field.
In the above equation, \(\widehat{f()}\) is the trained model, \(\widehat{f\left(N,{X}_{s}\right)}\) is the estimated yield based on nitrogen rate \(\left(N\right)\) and characteristics of the site \(\left({X}_{s}\right)\), \(Pw\) is the price of wheat and barley (set at \(\mathrm{\$}160\) Mg−1), \(Pn\) is the price of nitrogen (set at \(\mathrm{\$}0.76\) kg−1).
To test the performance of RF and GAM models at estimating site-specific EONR, estimated EONR was compared against a local approximation of the “true” EONR. It is an extremely hard task to verify the accuracy of the estimated site-specific EONR because the “true” EONR site-specifically is not observed. The EONR is always derived from yield observations. In contrast, validating models for yield prediction accuracy is straightforward because real yields are observed. Here, the same tenfold test datasets used for spatial cross validation was used to check the accuracy of the simulated site-specific EONR. Specifically, the following steps for each fold were taken: (1) fit a quadratic plateau model using the test dataset to estimate the yield response to N function, (2) derive a local EONR based on the estimated yield response function obtained in the previous step using Eq. (2), (3) calculate the average of the EONRs estimated using RF and GAM for all points, (4) compare the estimated EONR with the average RF and GAM estimated EONR. For this analysis, fields with less than 1000 observations were excluded to ensure that each fold has at least 100 observations. After this screening, 14 fields had sufficient observations per fold to perform this analysis. It is worth emphasizing that this testing of EONR estimation is not a formal test of how accurate the site-specific EONRs from RF and GAM were. The reference points for the RF and GAM are not the true EONR, but instead an estimate of EONR derived from localized regressions as described above. The proposed method is intended to give a partial insight into how well the ML EONR estimates were.
Drivers of variability in yield response to N
The relative importance of each predictor in the ML models were analyzed to understand what factors contributed to the spatial variability of EONR. To do this, for each site, first the RF model was trained to estimate the site-specific EONR using the same explanatory variables used to estimate yield. Then, the Shapley value analysis (Lundberg et al., 2017) was run for each explanatory variable using the “shapr” package (Sellereite et al., 2020). The Shapley values obtained from each explanatory variable measured the degree and direction of their contribution to the heterogeneity (variation) in the estimated EONR. Shapley values are widely accepted measures to enhance the interpretability of machine learning methods (Redell, 2019), and they are more suitable than the variable of importance measure because variable of importance does give the direction of the impact. Please note that Shapley value analysis on the model trained to predict yield (not EONR) will only give information about what factors contribute variation in yield but not in EONR.
Results and discussion
Observed spatial variability of yields
In this study, the spatial variability of wheat and barley yield response to N was quantified using OFPE. Yield ranged from 1.32 Mg ha−1 to 8.83 Mg ha−1 with an average of 4.54 Mg ha−1 across all sites, which is higher than the national average (3.2 Mg ha−1, MAGyP, 2019). Wheat yield was on average 4.7% higher than barley (4.67 Mg ha−1 vs 4.46 Mg ha−1, respectively).
The relationship between yield and N showed a non-linear pattern in most sites (Fig. 4). In 12 sites, a significant and positive response to N was found (yield-NH minus yield-N0 > 0) with a maximum of 1.5 Mg ha−1 (Fig. 4, Table 1, p < 0.05). The magnitude of the yield response to N is in agreement with other published studies in similar climatic conditions (Barbieri et al., 2008). Two sites showed a reduction in yield at NH when compared with yield at N0 of 0.19 Mg ha−1 and 0.33 Mg ha−1 (Fig. 4, Table 1, p < 0.05). A negative yield response in wheat and barley is rare in the northwest region of the Buenos Aires province. The lack of yield response could be partially attributed to errors associated with the yield monitoring process and temporal shifts in the yield monitor and as-applied data. As reported in other studies, the dispersion of yield values for the same input rate is much higher in OFPE than what is commonly observed in small plot research and can be also associated with the spatial variability of yield that would be observed even if inputs were applied at a uniform rate throughout the field (Fig. 4, Trevisan et al., 2019a). Despite the variability in the yield response curves, a subset of sites showed a clear positive yield response to N rates (e.g., Field_ID 1 and 16). The distribution of points also supports the decision to use linear regression to represent the yield responses.
The CV within fields for yield-N0 ranged from 5.3% to 28.5%, and for yield-NH from 4.7% to 31.7% (Table 1). Within-field yield variability is mainly associated with the spatial variability of the field soil properties and landscape position (Tremblay et al., 2012). Interestingly, a significant and positive correlation between the yield CV and the size of the N trial was found (R2 = 0.29, data not shown). This indicates that the yield CV not only depends on the natural variability of the field but also on the experiment’s scale and field location (Trevisan et al., 2019a). A larger experimental area could represent bigger within-field spatial variability in factors (e.g., organic matter, texture) other than the treatments, also known as random effects (Kravchenko et al., 2005). The larger scale of the OFPE compared with the plot-scale research gave the opportunity to better estimate the treatment and the random effects under different soil and crop conditions, therefore providing valuable data for ML modeling purposes (Rodriguez et al., 2019). However, further research is needed to optimize the size of the OFPE to better represent spatial variability of the site (Bullock et al., 2019).
Despite the challenges associated with the on-farm research trials such as the precision of the trial implementation, data quality and processing (Bullock et al., 2019; Kyveryga, 2019; Trevisan et al., 2021), results showed the value of OFPE to benchmark current production systems at the field level and help to quantify the impact of a particular nutrient management practice such as N management (Trevisan et al., 2019b). Most of the fields showed an average yield-N0 and yield-NH CV greater than 10%, suggesting potential economic benefits from a variable rate N application considering the site-specific yield response to N fertilization (Bullock et al., 1998; Robertson et al., 2008). For this study region, a site-specific N rate might be needed to maximize yields and profit (Fig. 4).
ML modeling of yield, EONR and YEONR
The performance of GAM and RF models to predict yield and yield response to N was evaluated and compared. Figure 5 presents the RMSE of the yield prediction for the trained data set (top panel) and the average of RMSE for the tenfold spatial cross validation (bottom panel). RF performed better than GAM in predicting yield consistently across fields (Fig. 5). Average RMSE for the training dataset was 476 and 772 kg ha−1 for RF and GAM, respectively. In most of the fields, RF RMSE from the training dataset was ~ 10% smaller than GAM (except Field_ID 3). Differences in model performance between RF and GAM were likely due to their different ability to handle the complex interactions existing between the yield, N rates and covariates.
RF and GAM suggested wildly different EONR estimates, while their YEONR estimates were similar (Fig. 6) even for fields where their yield modeling accuracy was the same (Figs. 5 and 7). A total of 14 sites showed visual differences in the EONR distributions between the two types of models (Fig. 6). In almost all fields, GAM models estimated EONR with an average of 26.7 kg N ha−1 higher than RF (Figs. 6 and 7). While both models predict no N to maximize profit in many parts of the field, GAM tended to have high frequency of N rates above zero and more heterogeneous N rates than RF (Fig. 6). Noteworthy, RF suggested almost no N application (< 10 kg N ha−1) for nine fields to obtain the highest profit (e.g., Field_ID 2, 5, 6, 8, 11, 13, 15, 16 and 17).
The average EONR was 43.6 and 20.4 kg N ha−1 across sites and years for GAM and RF models, respectively (Fig. 7, Table S4). Both values were below the national fertilization averages of 71 kg N ha−1 for wheat and 63 kg N ha−1 for barley (Bolsa de Cereales, 2020). The EONR ranged from 0 to 244 kg N ha−1 and 0 to 225 kg N ha−1, for GAM and RF models, respectively (Table S4). This suggests that the yield response to N and the related EONR cannot be generalized for a region or field (Scharf et al., 2005) likely due to complex relationships occurring between soil, management and weather that govern the yield response to N (Kyveryga et al., 2009; Morris et al., 2018; Tremblay et al., 2012).
Comparison between ML site-specific EONR and a localized approximation of the EONR
Despite the comparison between ML models, the observed site-specific EONR value is unknown (not observed) and thus drawing a conclusion about what model was closer to the true EONR is not possible (Kakimoto et al., 2022). In this work, a local approximation of the “true” EONR was carried out to test the accuracy of the estimated site-specific EONR by RF and GAM. Testing the validity of a model for EONR estimation is fundamentally different from validating a model for yield prediction. For yield prediction, the observe yield values is observed directly which allow us to validate the model with ground truth data. However, the same validation with EONR cannot be done as EONR is derived from yield observations. While the local approximation of the “true” EONR is appealing, there is no statistical guarantee nor peer review literature that confirms the approach indeed works. The local estimate of EONR could be error prone. Figure 7 presents the estimated local EONR for individual folds for all the fields compared with the average EONR from GAM and RF model.
RF and GAM-based EONR were not close to the locally approximated EONR (Fig. 7; Table S3). The average local EONR was 46.9 ± 54.4 kg N ha−1. Several folds within fields seemed to be underestimated by RF or GAM, which suggest N rates below 10 kg N ha−1 while the local EONR was higher (e.g., Field_ID 2 and 7). RF-based EONR consistently underestimated the EONR by 29 kg N ha−1 on average compared to the local approximation (Tables S3 and S4). In contrast, the GAM model underestimated EONR in seven fields by 16 kg N ha−1 on average and overestimated EONR by 21 kg N ha−1 in the remaining fields. The regional average N rates of 71 kg N ha−1 for wheat and 63 kg N ha−1 for barley (Bolsa de Cereales, 2020) also corroborate the conjecture that RF-based EONR underestimates the EONR.
Despite its limitation, this analysis provided useful insights into the nature of RF and GAM-based EONR estimates. The fact that RF and GAM suggested different EONR when compared to the local approximation indicated that further research is needed to understand the cause of such disagreement. The model’s ability to predict yield well may not mean that it will also predict EONR well (Puntel et al., 2016). While RF consistently performed better in predicting yield than GAM (low RMSE for RF, Fig. 5), its EONR prediction seemed to underperform compared to GAM (Fig. 7, Table S3 and S4). Indeed, RF consistently underestimated EONR (Fig. S2, Table S3). If this is truly the case, relying on RF can be potentially dangerous because under-application of N is much more harmful to profitability than over-application of N due to the nature of the yield response curve to N (Mandrini et al., 2021).
Drivers of the spatial variability in yield response to N
The factors contributing to the heterogeneity of EONR varied between methods and fields (Figs. 8 and 9). For example, for GAM-based EONR estimation in field 14, the SoilP was the top contributor to the heterogeneity of the estimated EONR. Low and high values of SoilP were associated with low and high values of EONR, respectively. This indicates that EONR increases as SoilP increases. In contrast, SoilP was not found as an important factor for GAM-based EONR in field 2 (Fig. 9). These findings indicate that training a model using data coming from different fields may lead to highly unreliable site-specific EONR when it is applied to another distinct field. The EONR and the factors contributing to its variability are site-specific (Morris et al., 2018; Puntel et al., 2019; Tremblay et al., 2012). Thus, more studies are needed to generate site-specific data to develop N management strategies that better account for soil, weather and management variation under diverse on-farm conditions (Wang et al., 2020).
The variability in EONR estimated by RF was mainly explained by the measured covariates in only five fields (Field_ID 1, 3, 4, 14 and 18, Fig. 8). This is rather expected due to low variability in RF-based EONR estimates of those fields (Fig. 6). In contrast, the impact of measured covariates for GAM-based EONR were high for most of the fields (Fig. 9). Thus, the inclusion of the measured explanatory variables in GAM models contributed to explaining the variability of the EONR more than in RF models.
According to the Shapley analysis on GAM-based EONR model, SoilP is the most or second-most influential factor for the spatial variability in the EONR for six fields. However, the direction of its impact on the EONR was not consistent across the fields (Fig. 9; Duncan et al., 2018; Holford et al., 1992). Higher SoilP led to higher EONR for four fields (Field_ID 1, 14, 17, 18) but led to lower EONR for two fields (Field_ID 4 and 13). This is not surprising given that there is evidence of interactions between N and P that affect crop root length, plant growth and N uptake (Duncan et al., 2018).
Normalized Elev was a key driver of EONR heterogeneity for fields 3, 7 and 9 using GAM model (Fig. 9). Similarly to SoilP, the direction of its impact was not consistent across fields. While a higher normalized Elev led to a lower EONR in fields 3 and 9, it led to a higher EONR in field 7. A similar observation can be made for SoilOM for fields 7 and 14. The interaction between site-specific terrain attributes, SoilOM and the weather conditions at each field probably had a unique effect on the spatial distribution of soil water content. These interactions affect the mineralization rates from the soil organic pool, which in turn, determines the spatial variability of soil mineral N and ultimately the yield response to N (Peralta et al., 2015; Ruffo et al., 2006; Tremblay et al., 2012). These results reinforce the need for recommendation models with site-specific covariates tailored to a unique environment to optimize field N fertilizer management (Cook et al., 2013; Saikai et al., 2020).
Conclusions
The presented approach showed that DIFM N-trials could be used to characterize yields, yield response to N and to test ML models to estimate EONR. This work is the first study predicting yield and EONR in winter cereal crops using OFPE and ML techniques.
Across all sites, yield ranged from 1.32 Mg ha−1 to 8.83 Mg ha−1 with an average of 4.54 Mg ha−1 and a yield response to N from 0 to 1.5 Mg ha−1 that varied between and within fields. Even though GAM and RF models performed well at predicting yield (RMSE of 476 and 772 kg ha−1 for RF and GAM, respectively), both approaches produced widely different EONR values even for fields where their yield modeling accuracy was the same. In addition, ML produced very different EONR estimates when compared to the local approximation. This indicated that further research is needed to understand the causes of such disagreement.
The factors contributing to the heterogeneity of EONR varied between methods and fields. Across sites, SoilP, SoilOM, terrain attributes and EC were the most influential variables; however, the magnitude and direction of the effect varied between fields. These findings indicate that training a model using data coming from different fields may lead to highly unreliable site-specific EONR when it is applied to another distinct field. Further evaluation of ML methods is needed to ensure a robust automation of N recommendation while producers transition into the digital-ag era.
References
Archontoulis, S. V., Castellano, M. J., Licht, M. A., Nichols, V., Baum, M., Huber, I., Martinez-Feria, R., Puntel, L., Ordóñez, R. A., Iqbal, J., & Wright, E. E. (2020). Predicting crop yields and soil-plant nitrogen dynamics in the US Corn Belt. Crop Science, 60(2), 721–738. https://doi.org/10.1002/csc2.20039
Bachmaier, M., & Gandorfer, M. (2009). A conceptual framework for judging the precision agriculture hypothesis with regard to site-specific nitrogen application. Precision Agriculture, 10(2), 95–110. https://doi.org/10.1007/s11119-008-9069-x
Barbieri, P. A., Rozas, H. S., & Echeverría, H. (2008). Time of nitrogen application affects nitrogen use efficiency of wheat in the humid pampas of Argentina. Canadian Journal of Plant Science, 88(5), 849–857.
Bolsa de Cereales. (2020). Relevamiento de Tecnología Agrícola Aplicada (ReTAA)(Applied Technologycal Survey) Retrieved December 2021, from https://www.bolsadecereales.com/tecnologia-informes
Bullock, D. G., Bullock, D. S., Nafziger, E. D., Doerge, T. A., Paszkiewicz, S. R., Carter, P. R., et al. (1998). Does variable rate seeding of corn pay? Agronomy Journal, 90(6), 830–836. https://doi.org/10.2134/agronj1998.00021962009000060019x
Bullock, D. S., Boerngen, M., Tao, H., Maxwell, B., Luck, J. D., Shiratsuchi, L., et al. (2019). The data-intensive farm management project: changing agronomic research through on-farm precision experimentation. Agronomy Journal, 111(6), 2736–2746. https://doi.org/10.2134/agronj2019.03.0165
Chlingaryan, A., Sukkarieh, S., & Whelan, B. (2018). Machine learning approaches for crop yield prediction and nitrogen status estimation in precision agriculture: A review. Computers and Electronics in Agriculture, 151, 61–69. https://doi.org/10.1016/j.compag.2018.05.012
Cook, S., Cock, J., Oberthür, T., & Fisher, M. (2013). On-farm experimentation. Better Crops, 97(4), 17–20.
Derby, N. E., Steele, D. D., Terpstra, J., Knighton, R. E., & Casey, F. X. (2005). Interactions of nitrogen, weather, soil, and irrigation on corn yield. Agronomy Journal, 97(5), 1342–1351. https://doi.org/10.2134/agronj2005.0051
Duncan, E. G., O’Sullivan, C. A., Roper, M. M., Biggs, J. S., & Peoples, M. B. (2018). Influence of co-application of nitrogen with phosphorus, potassium and sulphur on the apparent efficiency of nitrogen fertiliser use, grain yield and protein content of wheat. Field Crops Research, 226, 56–65. https://doi.org/10.1016/j.fcr.2018.07.010
Foster, A., Atwell, S., & Dunn, D. (2017). Sensor-based nitrogen fertilization for midseason rice production in Southeast Missouri. Crop, Forage & Turfgrass Management, 3(1), 1–7. https://doi.org/10.2134/cftm2017.01.0005
Gardner, G., Mieno, T., & Bullock, D. S. (2021). An economic evaluation of site-specific input application Rx maps: Evaluation framework and case study. Precision Agriculture, 22(4), 1304–1316. https://doi.org/10.1007/s11119-021-09785-z
Gorelick, N., Hancher, M., Dixon, M., Ilyushchenko, S., Thau, D., & Moore, R. (2017). Google earth engine: Planetary-scale geospatial analysis for everyone. Remote Sensing of Environment, 202, 18–27. https://doi.org/10.1016/j.rse.2017.06.031
Holford, I. C. R., Doyle, A. D., & Leckie, C. C. (1992). Nitrogen response characteristics of wheat protein in relation to yield responses and their interactions with phosphorus. Australian Journal of Agricultural Research, 43(5), 969–986. https://doi.org/10.1071/AR9920969
Kakimoto, S., Mieno, T., Tanaka, Takashi ST., & Bullock, D. S. (2022). Causal forest approach for site-specific input management via on-farm precision experimentation. Computers and Electronics in Agriculture, 199, 107164. https://doi.org/10.1016/j.compag.2022.107164
Kahabka, J. E., Van Es, H., McClenahan, E., & Cox, W. (2004). Spatial analysis of maize response to nitrogen fertilizer in central New York. Precision Agriculture, 5(5), 463–476. https://doi.org/10.1007/s11119-004-5320-2
Kitchen, N., Goulding, K., & Shanahan, J. (2008). Proven practices and innovative technologies for on-farm crop nitrogen management. In Nitrogen in the Environment (pp. 483–517). Elsevier. https://doi.org/10.1016/B978-0-12-374347-3.00015-9
Krause, M. R., Crossman, S., DuMond, T., Lott, R., Swede, J., Arliss, S., et al. (2020). Random forest regression for optimizing variable planting rates for corn and soybean using high-resolution topographical and soil data. bioRxiv. https://doi.org/10.1002/agj2.20442
Kravchenko, A. N., Robertson, G. P., Thelen, K. D., & Harwood, R. R. (2005). Management, topographical, and weather effects on spatial variability of crop grain yields. Agronomy Journal, 97(2), 514–523. https://doi.org/10.2134/agronj2005.0514
Kyveryga, P., Blackmer, A., & Zhang, J. (2009). Characterizing and classifying variability in corn yield response to nitrogen fertilization on subfield and field scales. Agronomy Journal, 101(2), 269–277. https://doi.org/10.2134/agronj2008.0168
Kyveryga, P. M. (2019). On-farm research: Experimental approaches, analytical frameworks, case studies, and impact. Agronomy Journal, 111(6), 2633–2635. https://doi.org/10.2134/agronj2019.11.0001
Lark, R., & Wheeler, H. (2003). A method to investigate within-field variation of the response of combinable crops to an input. Agronomy Journal, 95(5), 1093–1104. https://doi.org/10.2134/agronj2003.1093
Liakos, K. G., Busato, P., Moshou, D., Pearson, S., & Bochtis, D. (2018). Machine learning in agriculture: A review. Sensors, 18(8), 2674. https://doi.org/10.3390/s18082674
Lobell, D. B. (2007). The cost of uncertainty for nitrogen fertilizer management: A sensitivity analysis. Field Crops Research, 100(2–3), 210–217. https://doi.org/10.1016/j.fcr.2006.07.007
Lovelace, R., Nowosad, J., & Muenchow, J. (2019). Geocomputation with R. Online. Retrieved Januay 2022, from https://geocompr.robinlovelace.net. Chapman and Hall/CRC.
Lundberg, S. M., & Lee, S. I. (2017). A unified approach to interpreting model predictions. Advances in Neural Information Processing Systems. In 31st Conference on Neural Information Processing Systems (NIPS 2017) (pp. 4765–4774)
Magney, T. S., Eitel, J. U., & Vierling, L. A. (2017). Mapping wheat nitrogen uptake from RapidEye vegetation indices. Precision Agriculture, 18(4), 429–451. https://doi.org/10.1007/s11119-016-9463-8
MAGyP. (2019). Ministerio de Agroindustria de la Argentina. Datos Abiertos Agroindustria: Estimaciones. (Ministery of Agronindustry in Argentina. Open data: estimations). Retrieved December, 2021, from https://www.magyp.gob.ar/datosabiertos/
Mamo, M., Malzer, G. L., Mulla, D., Huggins, D., & Strock, J. (2003). Spatial and temporal variation in economically optimum nitrogen rate for corn. Agronomy Journal, 95(4), 958–964. https://doi.org/10.2134/agronj2003.9580
Mandrini, G., Pittelkow, C. M., Archontoulis, S. V., Mieno, T., & Martin, N. F. (2021). Understanding differences between static and dynamic nitrogen fertilizer tools using simulation modeling. Agricultural Systems, 194, 103275. https://doi.org/10.1016/j.agsy.2021.103275
Miller, H. J. (2004). Tobler’s first law and spatial analysis. Annals of the Association of American Geographers, 94(2), 284–289. https://doi.org/10.1111/j.1467-8306.2004.09402005.x
Morris, T. F., Murrell, T. S., Beegle, D. B., Camberato, J. J., Ferguson, R. B., Grove, J., et al. (2018). Strengths and limitations of nitrogen rate recommendations for corn and opportunities for improvement. Agronomy Journal, 110(1), 1–37. https://doi.org/10.2134/agronj2017.02.0112
Mulla, D. J. (2013). Twenty five years of remote sensing in precision agriculture: Key advances and remaining knowledge gaps. Biosystems Engineering, 114(4), 358–371. https://doi.org/10.1016/j.biosystemseng.2012.08.009
Peralta, N. R., Costa, J. L., Balzarini, M., Franco, M. C., Córdoba, M., & Bullock, D. (2015). Delineation of management zones to improve nitrogen management of wheat. Computers and Electronics in Agriculture, 110, 103–113. https://doi.org/10.1016/j.compag.2014.10.017
Piepho, H.-P., Richter, C., Spilke, J., Hartung, K., Kunick, A., & Thöle, H. (2011). Statistical aspects of on-farm experimentation. Crop and Pasture Science, 62(9), 721–735. https://doi.org/10.1071/CP11175
Pierce, F. J., & Nowak, P. (1999). Aspects of precision agriculture. Advances in Agronomy, 67, 1–85. https://doi.org/10.1016/S0065-2113(08)60513-1
Pringle, M., McBratney, A. B., & Cook, S. (2004). Field-scale experiments for site-specific crop management. Part II: A geostatistical analysis. Precision Agriculture, 5(6), 625–645. https://doi.org/10.1007/s11119-004-6347-0
Puntel, L. A., Pagani, A., & Archontoulis, S. V. (2019). Development of a nitrogen recommendation tool for corn considering static and dynamic variables. European Journal of Agronomy, 105, 189–199.
Puntel, L. A., Sawyer, J. E., Barker, D. W., Dietzel, R., Poffenbarger, H., Castellano, M. J., et al. (2016). Modeling long-term corn yield response to nitrogen rate and crop rotation. Frontiers in Plant Science, 7, 1630. https://doi.org/10.3389/fpls.2016.01630
QGIS Development Team. (2021). QGIS Geographic Information System. Open Source Geospatial Foundation. http://qgis.osgeo.org
Qiu, J., Wu, Q., Ding, G., Xu, Y., & Feng, S. (2016). A survey of machine learning for big data processing. EURASIP Journal on Advances in Signal Processing, 2016(1), 1–16. https://doi.org/10.1186/s13634-016-0355-x
Redell, N. (2019). Shapley decomposition of R-squared in machine learning models. Non-peer reviewed preprint at arXiv preprint arXiv:1908.09718.
Robertson, M. J., Lyle, G., & Bowden, J. W. (2008). Within-field variability of wheat yield and economic implications for spatially variable nutrient management. Field Crops Research, 105(3), 211–220.
Rockström, J., Steffen, W., Noone, K., Persson, Å., Chapin, F. S., Lambin, E. F., et al. (2009). A safe operating space for humanity. Nature, 461(7263), 472–475. https://doi.org/10.1038/461472a
Rodriguez, D. G. P., Bullock, D. S., & Boerngen, M. A. (2019). The origins, implications, and consequences of yield-based nitrogen fertilizer management. Agronomy Journal, 111(2), 725–735. https://doi.org/10.2134/agronj2018.07.0479
Ruffo, M. L., Bollero, G. A., Bullock, D. S., & Bullock, D. G. (2006). Site-specific production functions for variable rate corn nitrogen fertilization. Precision Agriculture, 7(5), 327–342. https://doi.org/10.1007/s11119-006-9016-7
Saikai, Y., Patel, V., & Mitchell, P. D. (2020). Machine learning for optimizing complex site-specific management. Computers and Electronics in Agriculture, 174, 105381. https://doi.org/10.1016/j.compag.2020.105381
Samborski, S. M., Gozdowski, D., Walsh, O. S., Lamb, D. W., Stępień, M., Gacek, E. S., et al. (2015). Winter wheat genotype effect on canopy reflectance: Implications for using NDVI for in-season nitrogen topdressing recommendations. Agronomy Journal, 107(6), 2097–2106. https://doi.org/10.2134/agronj14.0323
Scharf, P. C., Brouder, S. M., & Hoeft, R. G. (2006). Chlorophyll meter readings can predict nitrogen need and yield response of corn in the north-central USA. Agronomy Journal, 98(3), 655–665. https://doi.org/10.2134/agronj2005.0070
Scharf, P. C., Kitchen, N. R., Sudduth, K. A., Davis, J. G., Hubbard, V. C., & Lory, J. A. (2005). Field-scale variability in optimal nitrogen fertilizer rate for corn. Agronomy Journal, 97(2), 452–461. https://doi.org/10.2134/agronj2005.0452
Sellereite, N., Jullum, M., & Redelmeier, A. (2020). An R-package for explaining machine learning models with dependence-aware Shapley values. Journal Open Source Software. https://doi.org/10.21105/joss.02027
Setiyono, T., Yang, H., Walters, D., Dobermann, A., Ferguson, R., Roberts, D., et al. (2011). Maize-N: A decision tool for nitrogen management in maize. Agronomy Journal, 103(4), 1276–1283. https://doi.org/10.2134/agronj2011.0053
Silge, J. & Mahoney, M. (2022). spatialsample: Spatial Resampling Infrastructure. Retrieved October, 2021 from https://github.com/tidymodels/spatialsample, https://spatialsample.tidymodels.org.
Sudduth, K. A., Drummond, S. T., & Myers, D. B. (2012). Yield Editor 2.0: Software for Automated Removal of Yield Map Errors. Paper No. 121338243. ASABE.
Tibshirani, J., Athey, S., Sverdrup, E., & Wager, S. (2022). grf: Generalized Random Forests. R package version 2.1.0. Retrieved January, 2022, from https://github.com/grf-labs/grf
Tremblay, N., Bouroubi, Y. M., Bélec, C., Mullen, R. W., Kitchen, N. R., Thomason, W. E., et al. (2012). Corn response to nitrogen is influenced by soil texture and weather. Agronomy Journal, 104(6), 1658–1671. https://doi.org/10.2134/agronj2012.0184
Trevisan, R., Bullock, D., & Martin, N. (2021). Spatial variability of crop responses to agronomic inputs in on-farm precision experimentation. Precision Agriculture, 22(2), 342–363. https://doi.org/10.1007/s11119-020-09720-8
Trevisan, R. G., Bullock, D. S., & Martin, N. F. (2019a). Improving yield mapping accuracy using remote sensing. In J. V. Stafford (Ed.) Precision Agriculture ‘19, Proceedings of the 12th European Conference on Precision Agriculture (pp. 925–931). Wageningen Academic Publishers. https://doi.org/10.3920/978-90-8686-888-9_114
Trevisan, R. G., Bullock, D. S., & Martin, N. F. (2019b). Site-specific treatment responses in on-farm precision experimentation. In J. V. Stafford (Ed.) Precision Agriculture ‘19, Proceedings of the 12th European Conference on Precision Agriculture (pp. 925–931). Wageningen Academic Publishers. https://doi.org/10.3920/978-90-8686-888-9_111
Trivelli, L., Apicella, A., Chiarello, F., Rana, R., Fantoni, G., & Tarabella, A. (2019). From precision agriculture to Industry 4.0. British Food Journal, 12(8), 1730–1743. https://doi.org/10.1108/BFJ-11-2018-0747
Van Es, H., Kay, B., Melkonian, J., Sogbedji, J., & Bruulsma, T. (2006). Nitrogen management for maize in humid regions: Case for a dynamic modeling approach. In Managing Crop Nitrogen for Weather: Proceedings of the Symposium “Integrating Weather Variability into Nitrogen Recommendations,” (Vol. 15, pp. 6–13). International Plant Nutrition Institute.
Vucetic, S., Fiez, T., & Obradovic, Z. (1999). A data partitioning scheme for spatial regression. In IJCNN'99. International Joint Conference on Neural Networks. Proceedings (Cat. No. 99CH36339) (Vol. 4, pp. 2474–2479). Electrical and Electronics Engineers Inc.
Wang, X., Miao, Y., Dong, R., Chen, Z., Kusnierek, K., Mi, G., et al. (2020). Economic optimal nitrogen rate variability of maize in response to soil and weather conditions: Implications for site-specific nitrogen management. Agronomy, 10(9), 1237. https://doi.org/10.3390/agronomy10091237
Whelan, B., & McBratney, A. (2000). The “null hypothesis” of precision agriculture management. Precision Agriculture, 2(3), 265–279. https://doi.org/10.1023/A:1011838806489
Wood, S. N. (2003). Thin plate regression splines. Journal of the Royal Statistical Society Series B (Statistical Methodology), 65(1), 95–114.
Wood, S. N. (2017). Generalized additive models: An introduction with R. Chapman and Hall/CRC.
Zhang, X., Davidson, E. A., Mauzerall, D. L., Searchinger, T. D., Dumas, P., & Shen, Y. (2015). Managing nitrogen for sustainable development. Nature, 528(7580), 51–59. https://doi.org/10.1038/nature15743
Acknowledgements
This work was supported by a USDA-NRCS Conservation Innovation Grant from the On-farm Trials Program, titled "Improving the Economic and Ecological Sustainability of US Crop Production through On-Farm Precision Experimentation" (Award Number NR213A7500013G021) and a USDA-NIFA-AFRI Food Security Program Coordinated Agricultural Project, titled "Using Precision Technology in On-farm Field Trials to Enable Data-Intensive Fertilizer Management," (Accession Number 2016-68004-24769). We also thank the support of cooperating farmers.
Author information
Authors and Affiliations
Corresponding author
Ethics declarations
Conflict of interest
The authors declare that they have no conflict of interest.
Additional information
Publisher's Note
Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.
Supplementary Information
Below is the link to the electronic supplementary material.
Rights and permissions
Open Access This article is licensed under a Creative Commons Attribution 4.0 International License, which permits use, sharing, adaptation, distribution and reproduction in any medium or format, as long as you give appropriate credit to the original author(s) and the source, provide a link to the Creative Commons licence, and indicate if changes were made. The images or other third party material in this article are included in the article's Creative Commons licence, unless indicated otherwise in a credit line to the material. If material is not included in the article's Creative Commons licence and your intended use is not permitted by statutory regulation or exceeds the permitted use, you will need to obtain permission directly from the copyright holder. To view a copy of this licence, visit http://creativecommons.org/licenses/by/4.0/.
About this article
Cite this article
de Lara, A., Mieno, T., Luck, J.D. et al. Predicting site-specific economic optimal nitrogen rate using machine learning methods and on-farm precision experimentation. Precision Agric 24, 1792–1812 (2023). https://doi.org/10.1007/s11119-023-10018-8
Accepted:
Published:
Issue Date:
DOI: https://doi.org/10.1007/s11119-023-10018-8