# Prediction of Harvest Time of Apple Trees: An RNN-Based Approach
## 3 Materials and Methods
### Evaluation Methodology
#### 3.3.3 Input Variables  
We selected the variables considered empirically eligible to serve as input to the model. The following variables were selected: daily minimum temperature (\(t_{min}\)), maximum daily temperature (\(t_{max}\)), daily average temperature (\(t_{med}\)), amplitude (\(amplit\)), average daily minimum temperature (\(mt_{min}\)), average of the maximum daily temperature (\(mt_{max}\)), average temperature of the period (\(mt_{med}\)), degree-day (\(DD\)), and cumulative degree days (\(CDD\)). Figure 5 shows a boxplot diagram with the variables used. Thermal accumulation, in the form of the sum of degree-days (\(DDs\)), is an index used to establish a relationship between the amount of heat the plant needs for its development and the average daily temperature. According to [1], the physiological process and the functions of the plant occur under thermal limits in its environmental development. To complete all the physiological sub-periods of the life cycle, some cultures require an accumulation of a certain amount of heat. This accumulation is usually expressed by the \(DD\) index and represents the thermal sum above the minimum base temperature (\(T_{base}\)). \begin{table}
\begin{tabular}{c c c c c c c c} \hline \hline
**Date** & \(Tmin\) & \(Tmax\) & \(Tmed\) & \(Tmin\_acc\) & \(Tmed\_acc\) & \(DD\)  
The concept of \(DD\) admits that there is a base temperature and that below such limit, the growth and development of the plant are interrupted or extremely reduced. In addition, a linear relationship between temperature and plant development is assumed since there are no limitations on other factors [32]. The \(DD\) heat unit index can be calculated using Equation (1), where \(T_{max_{i}}\) and \(T_{min_{i}}\) are the maximum and minimum daily temperature, and \(T_{base}\) is the base temperature. All temperatures are measures in degrees Celsius (\({}^{\circ}\)C). Based on the \(DD\) value, the thermal accumulation of a given period called the cumulative degree-day \(CDD\) could be calculated using Equation (2). The base temperature was determined by the method indicated by [PERSON] [33], which uses the smallest standard deviation. Different values attributed to the base temperature can be found in the literature. We carry out tests with temperatures of 2 \({}^{\circ}\)C, 4 \({}^{\circ}\)C, and 10 \({}^{\circ}\)C. The best result was obtained with a temperature of 2 \({}^{\circ}\)C with a coefficient of variation of 10.46, being 6.6% lower than the results obtained with 10 \({}^{\circ}\)C and 1.9% lower than the results obtained with 4 \({}^{\circ}\)C.  
\[DD_{i}=\frac{T_{max_{i}}+T_{min_{i}}}{2}-T_{base} \tag{1}\]  
\[CDD=\sum_{i=1}^{n}DD_{i} \tag{2}\]  
We investigate the importance of variables to serve as input to the model. We used [PERSON]'s correlation coefficient to assess the degree of relationship between pairs of variables to assess the relevance of each variable alone as predictors of period length. This coefficient is a measure of dependence between two quantitative variables, and the correlation analysis shows how much one variable is somehow related to the other. Figure 6 graphically shows the correlation heatmap of the initially selected resources. Figure 5: DS1 input variables boxplot. The variable with the highest degree of correlation with the duration variable alone was the _CDD_ variable. We fit a simple linear regression model using the variable _CDD_ as a function of period length. The results showed a strong positive correlation. The coefficient of determination \(R^{2}\) indicated that 83.8% of the variability in period length (number of days) could be explained by the thermal accumulation _CDD_. Next, we observe the influence of the inclusion of other variables in the model. A multivariate linear regression model was adjusted considering the length of the period but with the inclusion of other variables. The variables that had the best response were _CDD_, minimum temperature \(T_{min}\), and average temperature \(T_{avg}\).