# A Machine Learning Method to Estimate Reference Evapotranspiration Using Soil Moisture Sensors
## 3 Results and Discussion
### Comparison of the Regression Models  
All the machine learning algorithms studied have several configurable hyperparameters, which were adjusted by trial and error to select their optimal configurations. The optimal configuration of the regression models was as follows:  
* In the case of the RTs, the algorithm used for construction of the decision trees was Classification and Regression Trees (CART) [43]. Figure 5a shows a graphical representation of the tree obtained for dataset (iii). It can be observed that the temperature is a very important variable in the regression, combined with the average information of some sensors. * For the SVR algorithm, the kernel function was a radial basis function, while the cost parameter was 4, with a value of epsilon 0.03 and gamma 0.1. These values were obtained using the _tune_ function of R, which performs an optimization of the hyperparameters of the algorithm. * The best architecture found using the ANN for dataset (iii) is shown in Figure 5b. In the three datasets, the network had an input layer, an output layer with one neuron, and a hidden layer. The ANN for dataset (i) had 10 hidden neurons, and the backpropagation algorithm was a scale conjugate gradient; for datasets (ii) and (iii), there were 15 hidden neurons and the backpropagation algorithm was Levenberg-Marquardt. In the training process, the datasets were divided into training (60%), validation (20%), and testing (20%). In this way, consistency was maintained in the comparison with the other regression methods. * Regarding the regression models tested in Weka, in dataset (i), the best algorithm was M5 Rules, while, for the other two datasets, the best method was the randomizable filtered classifier (RFC). M5 Rules is an algorithm that uses a separate-and-conquer strategy to construct a list of decisions or rules [45]. In the case of the RFC, the filter applied to the input data is a random projection to a sub-space of less dimensionality, and the base method of RFC is the K* algorithm [46]. This K* (or K-star) algorithm is an instance-based regressing method, where the estimation for a given input is calculated from samples more similar to it, according to a certain similarity function (normally using entropy-based distance functions). A global blend value of 15 was used in this algorithm. Figure 5: Two of the regression methods studied. (**a**) Trained structure of the regression tree for dataset (iii); in each leaf node, the regression value and the number \(n\) of samples is shown. (**b**) Scheme of the artificial neural network designed for dataset (iii). Table 2 shows the RMSE values obtained for all these regression models. In the case of Weka, only the error of the best model is shown for concision; the rest of models produced worse results than those presented in Table 2.  
Globally, the smallest error was obtained using Weka's RFC algorithm with dataset (iii), combined with the K* algorithm, achieving a very low RMSE of 0.1829 mm/day. Concerning the datasets, it can be observed that the data with daily information led to very poor results in all the methods. The optimal RMSE was almost 0.5 mm/day, using M5 Rules in Weka, which was equivalent to a relative error, MRE, of 33.96%. Thus, this arrangement of the data was not adequate to produce good estimations of the reference evapotranspiration. There can be several reasons for this fact. Firstly, the number of samples of this dataset could be insufficient for most of the machine learning methods used. A much larger number of samples could be necessary to improve the accuracy of the methods. However, this would be difficult for practical use of this methodology, requiring too many days of experimentation (in our case, after more than one year of data collection, the training dataset (i) contained only 150 samples). Moreover, since the daily data accumulated information of the peaks and valleys of each day, the loss of information did not allow producing good estimations.