# A Machine Learning Method to Estimate Reference Evapotranspiration Using Soil Moisture Sensors
## Materials and Methods
### Regression Algorithms Used  
In general, a regression method is a process to estimate the value of a numerical dependent variable (the output) given a set of independent variables (the input). In machine learning, this regression is not necessarily calculated by a mathematical equation, but by an algorithmic process. In our case, more than 20 machine learning algorithms and variants were applied to train the regression models for the estimation of the reference evapotranspiration, ETo, using the other attributes available: soil moisture sensors at depths 1, 2, 3, and 4; temperature; rainfall; irrigation; day of the year. The last parameter allows the algorithms to model the relationships between the season of the year and the other variables.  
Since the purpose of the present research is to select the most accurate regression technique, a detailed description of all the algorithms tested would be outside the scope of this paper, and only  
Figure 3: Sample values of the moisture sensors and agroclimatic data for a period of eight days from 26 June 2015 to 4 July 2015. The values of sensor 1 are shown in this plot. Depth 1: 10 cm; depth 2: 20 cm; depth 3: 30 cm; depth 4: 40 cm.  
the most relevant methods are briefly described. Three scientific tools (one commercial tool and two free tools) were used to test the models before selecting the best one.  
* MATLAB 9 (MathWorks Inc., Natick, MA, USA) was used to validate the regression algorithms based on artificial neural networks (ANNs), since it has a powerful ANN toolkit. Specifically, the models used were classical multilayer perceptron ANNs [41]. These networks consist of several input neurons (one for each input variable), one output neuron (the estimation of ETo), and several hidden layers with some neurons per layer. Different configurations were tested in the experiments.
* R 3.4 (R Foundation, Vienna, Austria) is a free programming language and software environment that is very common in scientific computation and statistical analysis. This tool was used to test the algorithms based on support vector regression (SVR) and regression trees (RT). SVR is an adaptation of support vector machines (SVM) to regression problems [42], where a number of relevant samples are selected from the training set (the support vectors) to minimize the error. Similarly, RTs are an adaptation of decision trees [43], where the intermediate nodes perform decisions based on the input variables, and the terminal nodes contain the predicted output values.
* Weka 3.8.1 (The University of Waikato, Hamilton, New Zealand) is a very popular, complete, and free machine learning tool. It contains many classification and regression algorithms that were included in this research. Some of the main techniques are as follows: linear regression; k-nearest neighbors; Bayes networks; logistic regression; K* algorithm; locally weighted learning; rule-based methods; different types of decision trees. Moreover, some meta-algorithms are included; these are algorithms that use other algorithms as parameters. For example, it is worth mentioning the randomizable filtered classifier (RFC) [44], a variant of the filtered classifier that applies an arbitrary transformation to the input data, and then executes another base algorithm on this transformed input. In this way, the regression accuracy could be greater in the filtered input than in the original one.