# Prediction of Harvest Time of Apple Trees: An RNN-Based Approach
## 4 Results  
We performed tests with the implemented prototype of the PredHarv model in order to observe its functioning. We use real data from two agricultural institutions and synthetic data. The results for each scenario are presented below:  
* Results of the First Evaluation Scenario: Table 3 shows the results of the implementation of the first evaluation scenario. The data used come from the DS1 dataset. The objective of implementing this evaluation scenario was to quantify how well this model behaves when making predictions on never-before-seen data and to observe the generalization capacity of the model in different subsets. In the K-fold cross-validation approach used, the dataset was divided 10 into training and test subsets. The RMSE metric values remain at the mean of 0.90 with a standard deviation of 0.17, and the MAE metric values remain at the mean of 0.80 with a standard deviation of 0.15. It was observed in the results obtained in this scenario that the model has a good generalization capacity. No evidence of overfitting and underfitting occurs. \begin{table}
\begin{tabular}{c c c c c} \hline \hline
**Sample** & **Real** & **Predict** & **RMSE** & **MAE** \\ \hline
1 & 104 & 104.3 & 0.35 & 0.34 \\
2 & 108 & 108.5 & 0.99 & 0.94 \\
3 & 110 & 108.7 & 2.37 & 1.97 \\
4 & 115 & 114.3 & 1.02 & 0.89 \\
5 & 122 & 121.2 & 1.32 & 1.08 \\ \hline Average & & & **1.41** & **1.23** \\ \hline \hline \end{tabular}
\end{table} 
Table 4: Prediction results with the second evaluation scenario—dataset DS1. \begin{table}
\begin{tabular}{c c c} \hline \hline
**Subset** & **RMSE** & **MAE** \\ \hline
1 & 0.99 & 0.93 \\
2 & 0.96 & 0.77 \\
3 & 1.13 & 1.01 \\
4 & 0.71 & 0.66 \\
5 & 0.73 & 0.67 \\ \hline Average & 0.90 & 0.80 \\ Standard deviation & 0.17 & 0.15 \\ \hline \hline \end{tabular}
\end{table} 
Table 3: Results of the metrics with K-fold cross-validation method. * Results of the Third Evaluation Scenario: In this scenario, synthetic data with temperature variations were used in specific periods. Figure 8 shows the dynamics of the predictions obtained with the PredHarv model. The initial prediction was made on 8 October, which is the date that marks the beginning of the period of full flowering. Based on the data fed, the estimated duration was 121 days. The blue line, in Figure 8, identifies the predicted value in the initial stage. Subsequently, new predictions were made, which are called adjustment predictions. The first adjustment prediction was made on 8 November, 31 days after the beginning of the period. A period of two weeks was simulated, between the dates of 20 October and 2 November, with temperatures 20% higher than initially predicted. The second adjustment prediction was made on 20 November, 43 days after the beginning of the period. Within this period, temperatures between 12 November and 17 November were simulated 10% below those initial predicted. The third adjustment prediction was made on 30 December, 83 days after the beginning of the period. Between 1 January and 19 January, temperatures were simulated 10% below those initially predicted. In the fourth and last adjustment prediction, carried out on 20 January, 107 days after the beginning of the period, temperatures were simulated 20% below those initially predicted. As can be seen in Figure 8, the red line shows the duration of the period corresponding to the date on which the prediction was made. These values vary, and it can be seen that the model responds to the stimulus of changes in the input data, adjusting the prediction as the data are being introduced. Variations in temperature in specific periods result in a more significant accumulation of heat, shortening the duration of the period. At other times, less accumulation occurs, increasing the duration as expected.