# Topdressing Nitrogen Demand Prediction in Rice Crop Using Machine Learning Systems
## 3 Method Overview  
The methodology developed in this research constitutes a precision agriculture approach using machine learning. In machine learning, algorithms are trained to find patterns and features in massive amounts of data to make decisions and predictions based on new data. With precision agriculture, crop fields are divided into management zones, so that variability is minimized within every zone and maximized between them [19].  
In this study, management zones were delineated with segmentation of a RapidEye image time-series of year 2015 [15] and ancillary with visual interpretation of unmanned aerial system (UAS) data. The created management zones were used as the spatial units of the machine learning modelling framework.  
Then, a representative soil sample was extracted from every zone with soil surveys conducted from 2016 to 2018. The extracts were sent for laboratorial analysis, including estimation of Soil Texture (Sand, Clay and Silt), Bulk Density, pH, Electrical Conductivity (EC), Organic Matter (OM), CaCO\({}_{3}\), Nitrate-Nitrogen, Phosphorus, Potassium, Magnesium, Iron, Zinc, Manganese, Copper, Boron and Calcium.  
The next step was the determination of rice growth stage in every zone. The last step was to estimate leaf nitrogen concentration (LNC) close before topdressing applications using spectral indices derived from Sentinel-2 images (years 2016-2019). The growth stage was determined in terms of days after seeding, by subtracting the seeding date from the LNC date.  
In the first cultivation season (2016), the fertilization applications were done manually, i.e., without the use of Variable-Rate Technologies (VRT). From 2017 and on, the applications were carried out using VRT. Variable-rate applications can be conducted today by modern tractors having the potential for applying different rates of fertilizers (or other inputs) within the fields in response to spatially variable factors. The tractors are guided by Global Positioning Systems (GPS) and should read maps including information about the optimum application rate for each part of the field. The yield was recorded with yield monitors mounted on harvesters on a yearly basis from 2017 to 2019. The whole dataset was organized into a dynamic geodatabase (GIS).  
Finally, the measured soil properties, the rice growth (in terms of days after seeding), the LNC values before fertilization, and yield records per zone were inserted into Machine Learning Systems (MLS) to train yield prediction algorithms. Using the trained algorithms, alternative fertilization schemes were tested, with the optimum one selected according to the resulting yield curves (Table 2). A workflow between the different parts of the methodology is illustrated in Figure 2.  
\begin{table}
\begin{tabular}{c c c} \hline \hline
**Steps** & **Technologies** & **Years** \\ \hline
1. Zone delineation & Segmentation of RapidEye (a) and ancillary visual interpretation of & 2015 (a) \\  & Unmanned Aerial System (UAS) data (b) & 2016 (b) \\ \hline
2. Soil sampling & Global Positioning System (GPS)-guided field surveys & 2016–2018 \\ \hline
3. Inundation mapping & Convolution neural network (CNN), Computer Vision, with Sentinel-1 (SAR data) & 2017–2019 \\ \hline
4. Growth stage determination & Time-series analysis & 2017–2019 \\ \hline
5. Leaf nitrogen concentration (LNC) & Spectral indices derived from Sentinel-2 (optical data) & 2016–2019 \\ mapping & & Manually (2016) \\
6. Zonal applications & Variable-Rate Technologies (VRT) (2017–2019) & 2016–2019 \\ \hline
7. Yield mapping & Yield mapper mounted on harvester & 2017–2019 \\ \hline
8. Yield prediction & Machine learning & 2017–2019 \\ \hline
9. N-demand suggestions & Optimal Nitrogen-yield curves & 2017–2019 \\ \hline \hline \end{tabular}
\end{table}
Table 2: A summary of the methodological steps accomplished, and technologies used.