Improving the Performance of Vegetable Leaf Wetness Duration Models in Greenhouses Using Decision Tree Learning

Leaf wetness duration (LWD) is a key driving variable for peat and disease control in greenhouse management, and depends upon irrigation, rainfall, and dewfall. However, LWD measurement is often replaced by its estimation from other meteorological variables, with associated uncertainty due to the modelling approach used and its calibration. This study uses the decision learning tree method (DLT) for calibrating four LWD models—RH threshold model (RHM), the dew parameterization model (DPM), the classification and regression tree model (CART) and the neural network model (NNM)—whose performances in reproducing measured data are assessed using a large dataset. The relative importance of input variables in contributing to LWD estimation is also computed for the models tested. The LWD models were evaluated at two different greenhouse locations: in a Chinese (CN) greenhouse over three planting seasons (April 2014–October 2015) and in a Spanish (ES) greenhouse over four planting seasons (April 2016–February 2018). Based on multi-evaluation indicators, the models were given a ranking for their assessment capabilities during calibration (in the Spanish greenhouse from April 2016 to December 2016 and in the Chinese greenhouse from April 2014 to November 2014). The models were then evaluated on an independent set of data, and the obtained areas under the receiver operating characteristic curve (AUC) of the LWD models were over 0.73. Therein, the best LWD model in this case was the NNM, with positive predict values (PPVs) of 0.82 (SP) and 0.90 (CN), and mean absolute errors (MAEs) of 1.85 h (SP) and 1.30 h (CN). Consequently, the DLT can decrease LWD estimation error by calibrating the model threshold and choosing black box model input variables.


Introduction
Leaf wetness duration (LWD) is the time of visible water presence on plant surfaces, i.e., the leaves, stems, flowers and fruits [1]. It is caused by over irrigation, rainfall or condensation, and acts as a catalyst for disease onset as it favors fungal infections, therefore causing a high possibility of heavy yield losses. For example, LWD facilitates gray leaf spot dispersal, which is an important fungal disease in maize and tomato [2,3], as it influences the processes of germination, infection, sporulation and, to a lesser extent, the lag time for symptom development (the latent period) [4]. However, leaf wetness duration is not only a meteorological variable, like temperature or precipitation, and it has not been routinely measured by most national meteorological agencies as part of general observation programs [5]. Therefore, different typology model based-weather station data for LWD cannot follow the category order to continuously split all data. The SVM and NB methods are frequently used to solve only small sample classifications because of certain disadvantages, namely, the sensitive kernel function and the conditional independence assumptions. Leaf wetness is a complex process dependent on the climate parameters used (relative humidity, dew temperature, air temperature, wind speed, rainfall, radiation) in the models. Therefore, it is difficult to define the weight coefficients of these parameters, which leads to a sensitive kernel function. Decision tree learning is one of the most successful learning algorithms due to its features of simplicity, comprehensibility, and lack of parameters, as well as being able to handle mixed-type data [27]. A class label and a tuple of attributes are used to train labeled data. Its advantage is its vast research space and its recursive processing until all instances in a subset belong to the same class. The calibrated threshold of a leaf wetness model is obtained from the tree node by classifying the objective variable using a class label (wet or dry) and a tuple of attributes (model parameters). The decision learning tree supplies a function to rank predictor importance by totaling the changes in the mean squared error (MSE) caused by the splits for each predictor, and then dividing the total by the number of branch nodes.
This work aims at testing the performances of four LWD models (RHM, DPM, CART and NNM) in two different greenhouse systems in Spain and China, and to compare their accuracy before and after calibration using reference data obtained in dedicated experimental trials.

Materials and Methods
The models tested here were aimed at estimating leaf wetness duration. Four leaf wetness models were applied to data collected in a plastic greenhouse of Almeria, Spain and in a solar greenhouse placed in Beijing, China. The tested models were: a simple relative humidity threshold (RHM), a dew temperature-based model (DPM), a classification and regression tree (CART) and a model based on a neural network (NNM). The choice of using weather and leaf wetness data coming from Spanish and Chinese greenhouses was driven by data availability. The relevance of our procedure is its ease of replicability in different greenhouse conditions, more than in different geographical areas. The classification tree function in MATLAB R2018a was used to calibrate the parameters of the leaf wetness models, and their performances were assessed by the statistical indexes: positive predictive value (PPV), negative predictive value (NPV), area under the receiver operating characteristic curve (AUC) and Nash-Sutcliffe efficiency index (EF), and mean absolute error (MAE) and standard deviation (SD). The workflow is shown in Figure 1.
Water 2018, 10, x FOR PEER REVIEW 3 of 20 model, K-M cannot follow the category order to continuously split all data. The SVM and NB methods are frequently used to solve only small sample classifications because of certain disadvantages, namely, the sensitive kernel function and the conditional independence assumptions. Leaf wetness is a complex process dependent on the climate parameters used (relative humidity, dew temperature, air temperature, wind speed, rainfall, radiation) in the models. Therefore, it is difficult to define the weight coefficients of these parameters, which leads to a sensitive kernel function. Decision tree learning is one of the most successful learning algorithms due to its features of simplicity, comprehensibility, and lack of parameters, as well as being able to handle mixed-type data [27]. A class label and a tuple of attributes are used to train labeled data. Its advantage is its vast research space and its recursive processing until all instances in a subset belong to the same class.
The calibrated threshold of a leaf wetness model is obtained from the tree node by classifying the objective variable using a class label (wet or dry) and a tuple of attributes (model parameters). The decision learning tree supplies a function to rank predictor importance by totaling the changes in the mean squared error (MSE) caused by the splits for each predictor, and then dividing the total by the number of branch nodes. This work aims at testing the performances of four LWD models (RHM, DPM, CART and NNM) in two different greenhouse systems in Spain and China, and to compare their accuracy before and after calibration using reference data obtained in dedicated experimental trials.

Materials and Methods
The models tested here were aimed at estimating leaf wetness duration. Four leaf wetness models were applied to data collected in a plastic greenhouse of Almeria, Spain and in a solar greenhouse placed in Beijing, China. The tested models were: a simple relative humidity threshold (RHM), a dew temperature-based model (DPM), a classification and regression tree (CART) and a model based on a neural network (NNM). The choice of using weather and leaf wetness data coming from Spanish and Chinese greenhouses was driven by data availability. The relevance of our procedure is its ease of replicability in different greenhouse conditions, more than in different geographical areas. The classification tree function in MATLAB R2018a was used to calibrate the parameters of the leaf wetness models, and their performances were assessed by the statistical indexes: positive predictive value (PPV), negative predictive value (NPV), area under the receiver operating characteristic curve (AUC) and Nash-Sutcliffe efficiency index (EF), and mean absolute error (MAE) and standard deviation (SD). The workflow is shown in Figure 1.  Figure 1. Schematic of workflow implemented in this paper for calibrating and evaluating leaf wetness models.

Greenhouse Facilities and Leaf Wetness Duration Monitoring
Two greenhouses located in Spain ( Figure 2) and China ( Figure 3) were used in this study to evaluate the LWD models' accuracy. In Spain, the greenhouse size was 877 m 2 (37.8 m × 23.2 m) with a variable height (between 2.8 m and 4.4 m) and a polyethylene cover, whitened to reduce radiation (by the application of a CaCO 3 suspension) based on the external conditions. The tomato crop density was 2.01 plants/m 2 (6 plants per slab, 1.9 m between slab rows and 0.5 m between slabs in the same row). Two electronic sensors were designed to mimic the size of natural leaves based on obtaining a dielectric constant on the sensor surfaces using a capacitive grid (Decagon Devices, Pullman, WA, USA), and they were installed at the bottom and top of the canopy in the center of the greenhouse at a 30 • angle. There was a weather station inside the greenhouse to test the air temperature and air humidity (Vaisala HMP45P, Helsinki, Finland), which was located at the center of the greenhouse at a 2.0 m height. The leaf wetness data were collected from 2016 to 2018. In China, the greenhouse size was 210 m 2 (30 m × 7 m) and was constructed of metal arches covered with polyethylene film. A total of 504 cucumber plants were arranged in a double-row pattern with small 40 cm spaces and large 1.1 m spaces between rows; there was also a space of 0.4 m between plants in each row. The air temperature and relative humidity in the greenhouse were recorded every 15 min by sensors coupled to a data logger, which was located at the center of the greenhouse at a 1.5 m height. The data were transferred from the data logger (an RS485 connection) to a central computer (an RS232 connection) via a local area network (LAN) and stored in a Microsoft Access 2003 database. Five leaf wetness sensors (#6420, Davis Instruments Corp, Hayward CA, USA) and a data logger (CR1000, Campbell Scientific, Logan, UT, USA) were located at the leaf apex, the left and right side of the leaf, the underside of the leaf and 0.05 m below of the leaf, and were always kept at the middle of the canopy during crop growing [28]. The data were acquired from 2014 to 2015.
The leaf was considered wet when 50% of the sampled data was over the LW sensor threshold for one hour [29]. The differences in the periods of measurements, seasons, measurement intervals and LWD sensors among sites occurred because we used the infrastructure and data available for each place (Table 1).
Water 2018, 10, x FOR PEER REVIEW 4 of 20

Greenhouse Facilities and Leaf Wetness Duration Monitoring
Two greenhouses located in Spain ( Figure 2) and China ( Figure 3) were used in this study to evaluate the LWD models' accuracy. In Spain, the greenhouse size was 877 m 2 (37.8 m × 23.2 m) with a variable height (between 2.8 m and 4.4 m) and a polyethylene cover, whitened to reduce radiation (by the application of a CaCO3 suspension) based on the external conditions. The tomato crop density was 2.01 plants/m 2 (6 plants per slab, 1.9 m between slab rows and 0.5 m between slabs in the same row). Two electronic sensors were designed to mimic the size of natural leaves based on obtaining a dielectric constant on the sensor surfaces using a capacitive grid (Decagon Devices, Pullman, WA, USA), and they were installed at the bottom and top of the canopy in the center of the greenhouse at a 30° angle. There was a weather station inside the greenhouse to test the air temperature and air humidity (Vaisala HMP45P, Helsinki, Finland), which was located at the center of the greenhouse at a 2.0 m height. The leaf wetness data were collected from 2016 to 2018. In China, the greenhouse size was 210 m 2 (30 m × 7 m) and was constructed of metal arches covered with polyethylene film. A total of 504 cucumber plants were arranged in a double-row pattern with small 40 cm spaces and large 1.1 m spaces between rows; there was also a space of 0.4 m between plants in each row. The air temperature and relative humidity in the greenhouse were recorded every 15 min by sensors coupled to a data logger, which was located at the center of the greenhouse at a 1.5 m height. The data were transferred from the data logger (an RS485 connection) to a central computer (an RS232 connection) via a local area network (LAN) and stored in a Microsoft Access 2003 database. Five leaf wetness sensors (#6420, Davis Instruments Corp, Hayward CA, USA) and a data logger (CR1000, Campbell Scientific, Logan, UT, USA) were located at the leaf apex, the left and right side of the leaf, the underside of the leaf and 0.05 m below of the leaf, and were always kept at the middle of the canopy during crop growing [28]. The data were acquired from 2014 to 2015.
The leaf was considered wet when 50% of the sampled data was over the LW sensor threshold for one hour [29]. The differences in the periods of measurements, seasons, measurement intervals and LWD sensors among sites occurred because we used the infrastructure and data available for each place (Table 1).     Note: average leaf wetness duration (LWD) was the mean value of leaf wetness durations of leaf wetness occurrence days; T means average of air temperature; RH means average of relative humidity.

2.2．Model Description
The four LWD models tested in our study are described below: 1 The RHM assumes the LWD is equal to the number of hours that RH is greater than or equal to a constant threshold. If the RH is below that threshold, the leaves are assumed to be dry; conversely, if the RH is above the threshold, the leaves are assumed to be wet. In this case, we set the empirical threshold to 90% according to the cases of the relative humidity model application in disease warning systems; an optimal RHM threshold (RH ≥ 90%) was used in an existing cucumber downy mildew warning system [11], a strawberry disease-warning systems in four US states [30], and a potato late blight model [31]. 2 The DPM is based on the difference value (DPD) between the air temperature (T) and the dew point temperature (dewT) [4]. Dew occurs only when the difference is below a certain threshold (2 °C) [32]. This model was used by Huber and Gillespie [4] and by Gillespie et al. [16]. The same model was also applied in other studies on leaf wetness estimation [13,32]. In this study, we kept the dew point threshold to 2 °C to determine dew presence in the two greenhouse systems. 3 The CART model [33] has four category conditions to identify whether leaves are dry or wet ( Figure 4); these are the hours considered dry if either the hourly different value (DPD) is equal or greater than 3.7 °C (category 1) or if the relative humidity (RH) is less than 87.8% and the hourly wind speed (WD) is equal or greater than 2.5 m s −1 (category 2). The hours in category 3 (Equation (1)) and category 4 (Equation (2)) are classified as either dry or wet by a subsequent stepwise linear discriminant analysis.  Note: average leaf wetness duration (LWD) was the mean value of leaf wetness durations of leaf wetness occurrence days; T means average of air temperature; RH means average of relative humidity.

Model Description
The four LWD models tested in our study are described below: 1 The RHM assumes the LWD is equal to the number of hours that RH is greater than or equal to a constant threshold. If the RH is below that threshold, the leaves are assumed to be dry; conversely, if the RH is above the threshold, the leaves are assumed to be wet. In this case, we set the empirical threshold to 90% according to the cases of the relative humidity model application in disease warning systems; an optimal RHM threshold (RH ≥ 90%) was used in an existing cucumber downy mildew warning system [11], a strawberry disease-warning systems in four US states [30], and a potato late blight model [31]. 2 The DPM is based on the difference value (DPD) between the air temperature (T) and the dew point temperature (dewT) [4]. Dew occurs only when the difference is below a certain threshold (2 • C) [32]. This model was used by Huber and Gillespie [4] and by Gillespie et al. [16]. The same model was also applied in other studies on leaf wetness estimation [13,32]. In this study, we kept the dew point threshold to 2 • C to determine dew presence in the two greenhouse systems. 3 The CART model [33] has four category conditions to identify whether leaves are dry or wet ( Figure 4); these are the hours considered dry if either the hourly different value (DPD) is equal or greater than 3.7 • C (category 1) or if the relative humidity (RH) is less than 87.8% and the hourly wind speed (WD) is equal or greater than 2.5 m s −1 (category 2). The hours in category 3 (Equation (1)) and category 4 (Equation (2)) are classified as either dry or wet by a subsequent stepwise linear discriminant analysis.  (1) 4 A neural network model (NNM) is a method to predict a set of outputs from a set of input patterns [34]. It is like a central nervous system that can learn tasks by considering examples. Leaf wetness is the output of a neural network-based leaf wetness model [14]. Francl et al. estimated wheat leaf wetness using the inputs of temperature, relative humidity, solar radiation, precipitation, wind direction, and wind speed [24]. Marta et al. carried out the model in 47 weather stations, and its input parameters were rainfall, vapor pressure deficit, wind speed and solar global radiation [29]. Stella et al. [25] used the inputs (temperature, relative humidity, rainfall, wind speed and solar radiation) in a neural network model for estimating apple leaf wetness. We chose the empirical input parameters of NNM that are shown in Figure 5, in which T is temperature (°C); RH is relative humidity (%); DPD is dew point depression (°C); WD is wind speed (m/s) and Ra is global radiation (W 2 ). The parameters which were calibrated for each leaf wetness models are listed in Table 2. The calibration of the four leaf wetness models was performed using the decision learning tree method 4 A neural network model (NNM) is a method to predict a set of outputs from a set of input patterns [34]. It is like a central nervous system that can learn tasks by considering examples. Leaf wetness is the output of a neural network-based leaf wetness model [14]. Francl et al. estimated wheat leaf wetness using the inputs of temperature, relative humidity, solar radiation, precipitation, wind direction, and wind speed [24]. Marta et al. carried out the model in 47 weather stations, and its input parameters were rainfall, vapor pressure deficit, wind speed and solar global radiation [29]. Stella et al. [25] used the inputs (temperature, relative humidity, rainfall, wind speed and solar radiation) in a neural network model for estimating apple leaf wetness. We chose the empirical input parameters of NNM that are shown in Figure 5, in which T is temperature ( • C); RH is relative humidity (%); DPD is dew point depression ( • C); WD is wind speed (m/s) and Ra is global radiation (W 2 ).
Water 2018, 10, x FOR PEER REVIEW 6 of 20 (1) 4 A neural network model (NNM) is a method to predict a set of outputs from a set of input patterns [34]. It is like a central nervous system that can learn tasks by considering examples. Leaf wetness is the output of a neural network-based leaf wetness model [14]. Francl et al. estimated wheat leaf wetness using the inputs of temperature, relative humidity, solar radiation, precipitation, wind direction, and wind speed [24]. Marta et al. carried out the model in 47 weather stations, and its input parameters were rainfall, vapor pressure deficit, wind speed and solar global radiation [29]. Stella et al. [25] used the inputs (temperature, relative humidity, rainfall, wind speed and solar radiation) in a neural network model for estimating apple leaf wetness. We chose the empirical input parameters of NNM that are shown in Figure 5, in which T is temperature (°C); RH is relative humidity (%); DPD is dew point depression (°C); WD is wind speed (m/s) and Ra is global radiation (W 2 ). The parameters which were calibrated for each leaf wetness models are listed in Table 2. The calibration of the four leaf wetness models was performed using the decision learning tree method The parameters which were calibrated for each leaf wetness models are listed in Table 2. The calibration of the four leaf wetness models was performed using the decision learning tree method (DLT), by splitting the available data into two independent sets for calibration and evaluation. For the CART model, we decided to keep the original coefficients of Equations (1) and (2), and to limit its calibration to the thresholds leading to the node splitting (14.4674 in Equation (1), 37 in Equation (2)).
Since these equations were derived by data fitting during model development, the values of the empirical coefficients have limited meaning and no portability. A decision learning tree is a commonly used method in data mining and classification [35]. A decision tree algorithm works by splitting a dataset so as to train a model through a recursive partitioning process. Then the model is used to predict the value of a target variable based on the independent variables ( Figure 6). In the leaf wetness models, the model parameters are independent variables (X) while leaf wetness is the classification variable (wet = 1, dry = 0). The splitting rule is that a sample goes right if a 'feature value X ≤ C , otherwise it goes left. The Gini index is the criterion used to reduce the impurity in classification splitting since it can be computed more rapidly and be readily extended to include symmetrized costs [26]. The Gini index of node impurity in the leaf wetness classification problem can be expressed as in Equation (3). The Gini index reaches a zero value when only one class is present at a node. This means that the Gini index will be zero if all cases at a node belong to the same class, where p(t) denotes the relative frequency of the first class at the node. The process of calibrating the leaf wetness models (RHM, DPM and CART) thresholds by the decision learning tree method using the MATLAB tool is shown in Figure 7.
the CART model, we decided to keep the original coefficients of Equations (1) and (2), and to limit its calibration to the thresholds leading to the node splitting (14.4674 in Equation (1), 37 in Equation (2)). Since these equations were derived by data fitting during model development, the values of the empirical coefficients have limited meaning and no portability.  (1) and (2) Input parameters

Decision Learning Tree (DLT) Method
A decision learning tree is a commonly used method in data mining and classification [35]. A decision tree algorithm works by splitting a dataset so as to train a model through a recursive partitioning process. Then the model is used to predict the value of a target variable based on the independent variables ( Figure 6). In the leaf wetness models, the model parameters are independent variables (X) while leaf wetness is the classification variable (wet = 1, dry = 0). The splitting rule is that a sample goes right if a 'feature value X ≤ C′, otherwise it goes left. The Gini index is the criterion used to reduce the impurity in classification splitting since it can be computed more rapidly and be readily extended to include symmetrized costs [26]. The Gini index of node impurity in the leaf wetness classification problem can be expressed as in Equation (3). The Gini index reaches a zero value when only one class is present at a node. This means that the Gini index will be zero if all cases at a node belong to the same class, where p(t) denotes the relative frequency of the first class at the node. The process of calibrating the leaf wetness models (RHM, DPM and CART) thresholds by the decision learning tree method using the MATLAB tool is shown in Figure 7.  Usually, input parameters are chosen based on expertise and historical data [25]. In this article, by employing the decision tree method it has been possible to use a predictor importance ranking to help select the most effective factors and reduce time lost; the process is shown in Figure 8. The predictor's importance is computed by totaling the changes in the mean squared error (MSE) caused by the splits for each predictor, and then dividing the total by the number of branch nodes. The variable importance associated with this split is computed as the difference between MSE for the parent node and the total MSE for the two child nodes. In our case, the predictor's importance had the same rank for the Spanish (Figure 9a) and Chinese greenhouses (Figure 9b). Relative humidity (RH), dew temperature (dewT), transpiration (E) and radiation (Ra) were the first four predictors ranked in importance for LWD. Usually, input parameters are chosen based on expertise and historical data [25]. In this article, by employing the decision tree method it has been possible to use a predictor importance ranking to help select the most effective factors and reduce time lost; the process is shown in Figure 8. The predictor's importance is computed by totaling the changes in the mean squared error (MSE) caused by the splits for each predictor, and then dividing the total by the number of branch nodes. The variable importance associated with this split is computed as the difference between MSE for the parent node and the total MSE for the two child nodes. In our case, the predictor's importance had the same rank for the Spanish (Figure 9a) and Chinese greenhouses (Figure 9b). Relative humidity (RH), dew temperature (dewT), transpiration (E) and radiation (Ra) were the first four predictors ranked in importance for LWD. . Figure 9. A rank of importance of predictor estimates for LWD in the Chinese (a) and Spanish (b) greenhouses.

Input: predictors
Output: a figure of predictor importance estimates Step  . Figure 9. A rank of importance of predictor estimates for LWD in the Chinese (a) and Spanish (b) greenhouses.

Input: predictors
Output: a figure of predictor importance estimates Step  Analyzing sensitivity of the NNM to individual inputs aims to evaluate the feasibility of simplifying the number of NNM inputs (Table 3). When humidity and radiation were the inputs of the NNM, the model had higher accuracy than the model with individual inputs. It was better to use the NNM with the four inputs in our case, because of its highest accuracy of 0.88 for Spain and 0.92 for China. Therefore, the group of four parameters-relative humidity, dew temperature, transpiration and radiation-made up the new NNM input parameters ( Figure 10). Transpiration was estimated using a referenced method [18]. Analyzing sensitivity of the NNM to individual inputs aims to evaluate the feasibility of simplifying the number of NNM inputs (Table 3). When humidity and radiation were the inputs of the NNM, the model had higher accuracy than the model with individual inputs. It was better to use the NNM with the four inputs in our case, because of its highest accuracy of 0.88 for Spain and 0.92 for China. Therefore, the group of four parameters-relative humidity, dew temperature, transpiration and radiation-made up the new NNM input parameters ( Figure 10). Transpiration was estimated using a referenced method [18].  Figure 10. Optimized construct of the NNM using decision tree learning.

Evaluation Criteria
In general, higher values of the positive predictive value (PPV), negative predictive value (NPV), sensitivity (Sen) and accuracy (Acc) resulted in better model performance [36]. The EF indicates how well the relationship between the observed and simulated data fit with regard to the 1:1 straight line, with the optimum EF value = 1.0. For a perfect classifier, the area under the receiver operating characteristic curve (AUC) = 1, where t is the threshold parameter, Pt is the true positive value number, Pf is the false positive value number, Nf is the false negative value number, and Nt is the true negative value number. Ei is the ith value of estimated leaf wetness, Ai is the ith value of true leaf wetness, Ameani is the mean value of true leaf wetness, and N is the sample size. These indexes were computed by Equations (4)- (9). Two error analyses of mean absolute error (MAE) and standard deviation (SD) also were used to assess the models' behavior by comparing estimated and measured LWD (Equations (10) and (11)).

Evaluation Criteria
In general, higher values of the positive predictive value (PPV), negative predictive value (NPV), sensitivity (Sen) and accuracy (Acc) resulted in better model performance [36]. The EF indicates how well the relationship between the observed and simulated data fit with regard to the 1:1 straight line, with the optimum EF value = 1.0. For a perfect classifier, the area under the receiver operating characteristic curve (AUC) = 1, where t is the threshold parameter, Pt is the true positive value number, Pf is the false positive value number, Nf is the false negative value number, and Nt is the true negative value number. E i is the ith value of estimated leaf wetness, A i is the ith value of true leaf wetness, A meani is the mean value of true leaf wetness, and N is the sample size. These indexes were computed by Equations (4)- (9). Two error analyses of mean absolute error (MAE) and standard deviation (SD) also were used to assess the models' behavior by comparing estimated and measured LWD (Equations (10) and (11)).

Results
The calibration dataset included data collected in the Spanish greenhouse (ES) from April 2016 to December 2016 and in the Chinese greenhouse (CN) from April 2014 to November 2014 (Figures 11-14). The model evaluation was performed using ES data in the period March 2017 to February 2018 and CN data from December 2014 to September 2015 ( Figure 15). The statistical indices used to evaluate leaf wetness model performance were taken from Gil et al. [22] and Tien et al. [37], and are listed in Equations (4)- (11).
Four scatter plots between estimated and measured LWD using RHM in the two greenhouses are shown in Figure 11. When the empirical threshold (RH > 90%) was used, the data deviated from the 1:1 straight line (Figure 11a,c); on the contrary, the model performance improved when the threshold was calibrated to 84.53% in the ES greenhouse and 80% in the CN greenhouse, with an EF of 0.95 (ES) and 0.97 (CN). In particular, the accuracy of the model greatly improved, with a Sen of 0.53 (ES) and 0.85 (CN), while PPV and NPV also increased, with an Acc of 0.83 (ES) and 0.80 (CN). After calibration, the mean absolute error decreased from 7.12 h to 5.31 h in ES and from 6.12 h to 2.73 h in CN (Table 4).
Water 2018, 10, x FOR PEER REVIEW 12 of 20 Figure 11. Comparison of measured LWD and estimated LWD by the relative humidity model with experiential threshold (90%) and calibrated threshold (84.53% and 80%). ES is the Spanish greenhouse and CN is the Chinese greenhouse. Table 4. Performance statistic values of the relative humidity model (RHM) of the two greenhouses, including positive predictive value (PPV), negative predictive value (NPV), sensitivity (Sen), accuracy (Acc), area under receiver operating characteristic curve (AUC), effective fitting (EF), mean absolute error (MAE) and standard deviation (SD). Figure 11. Comparison of measured LWD and estimated LWD by the relative humidity model with experiential threshold (90%) and calibrated threshold (84.53% and 80%). ES is the Spanish greenhouse and CN is the Chinese greenhouse. The differences in the performance of the DPM before (DPD < 2 • C) and after calibration (DPD < 2.7 • C for ES and DPD < 5.42 • C for CN) could be explained by the data distribution in the scatter plots ( Figure 12) and the performance statistic values in Table 5. The calibrated DPM threshold reduced the estimation of LWD, as proved by data distributions shown in Figure 12b,d, which fitted better to the 1:1 straight line than in Figure 12a,c. Moreover, the PPV increased to 0.67 (ES) and 0.79 (CN), Sen rose to 0.56 (ES) and 0.83 (CN), and Acc reached 0.83 (ES) and 0.80 (CN). The effectiveness of the calibration threshold was also proved by lower MAE and SD than with the DPD threshold fixed at 2 • C ( Table 5).    The calibration CART model maintained the four categories, but with different thresholds. The first category is to identify whether the leaf is wet or dry depending on the DPD value. The original threshold (3.7 • C) was modified to 2.7 • C for ES and 6.3 • C for CN. Equation (1) was applied to evaluate leaf wetness occurrence in conditions of low wind speed (wind speed < 2.5 m s −1 ), whereas Equation (2) was used when RH is high (relative humidity above 87.8%). This work kept these coefficients in Equation (1) unchanged, to limit the calibration of the CART model to the thresholds leading to new node splitting (13.6949 for Spain, 15.5 for China), while adopting the conditions of relative humidity greater than 84.53% for Spain and 80% for China before using Equation (2) to identify leaf class ( Figure 13). The model performance showed great improvement, which can be proved by comparing statistic values that were calculated before and after calibration of the model, with an AUC of 0.88 (in ES) and 0.91 (in CN), as well as an Acc of 0.83 (in ES) and 0.82 (in CN). The better performance of the calibrated model also was reflected in lower MAE and SD, which were 4.60 h and 5.92 h for ES, and 2.13 h and 2.84 h for CN, respectively (Table 6).    The results of estimation of LWD by the NNM with new input parameters are quite different from the results obtained from the NNM with empirical inputs. More importantly, the importance of the new input parameters was reflected in the good fitting result of LWD estimation to the 1:1 straight line (Figure 14b,d), with an EF of 1.05 (ES) and 0.97 (CN). This model is a good classifier, with an AUC of 0.88 (ES) and 0.97 (CN). Furthermore, the NNM with new input parameters has lower error of estimation of LWD (Table 7)  The evaluation data were acquired in Spain from March 2017 to February 2018 and in China from December 2014 to October 2015. These data were used to assess the calibration models' performance. Comparison results of estimated and measured LWD are shown in Figure 15. Most subfigures in Figure 15 show a good fitting, however, large errors remained, even after calibration ( Figure 15, RHM-ES). A multi-model comparison was carried out to rank model performances ( Table 8)

Discussion
The results confirmed that a site-specific calibration was needed to improve leaf wetness model accuracy, in agreement with literature studies. Gil et al. adopted the calibrated threshold for the RHM (RH > 94%) and for the DPM (DPD < 2 • C), which were used for LWD estimation in Colombia, and the correct success index of the models were 0.69 and 0.65, respectively [22]. Bassimba et al. [14] calibrated the threshold of the RHM for 14 commercial citrus orchards in Spain by ROC curve analysis, and sensibility of the model was in the range of 0.43-0.93. Mashonjowa et al. [12] proposed the calibration thresholds of the RHM (RH > 84%) and the DPM (DPD < 2.5 • C) for a Zimbabwe greenhouse, and the correct success index of each model was 0.59 and 0.76. Empirical leaf wetness models after calibration of thresholds, such as the RHM and DPM, did not perform better than the complex physical models. Sentelhas et al. [8] obtained a mean absolute error of around 1.6 h with a Penman-Monteith-based approach. Dalla Marta et al. [38] found the mean absolute errors of the physical model were between 1.5 h and 2.3 h. In this study, the mean absolute errors of estimation of LWD of RHM were in the range of 3.29-5.46 h for the test locations (Table 8), but the CART model achieved a similar performance: the MAE of this model was 2.75 h for China and 3.46 h for Spain. Although the CART model used different meteorological inputs, the implicit representation of the physical principles leading to leaf wetness provides some spatial portability for the CART model. Nonetheless, we recommend a specific calibration to adapt the model to new greenhouse systems because of the good results of estimation of LWD demonstrated at this point (Table 6).
Neural networks can be used for estimating LWD, even though they do not provide an explicit formalization of the relationship between leaf wetness duration and climate data, which could vary even within a greenhouse system. If the choice of the predictors is inaccurate, this typology of model might lead to significant errors, as in our study without specific calibration (5.10 h for China and 5.38 h for Spain). Francl et al. [24] analyzed sensitivity of an artificial neural network model of wet status at the wheat flag leaf level to individual input variables, and demonstrated that humidity was the most important factor, followed by temperature and solar radiation. These results are in agreement with our findings. Rainfall and wind speed made a small contribution to model accuracy, which can be proved by the result of predictor importance estimates in Figure 9. This conclusion agreed with Francl et al. [24]. The two parameters were important for estimation of LWD of an open field, as in Stella et al. [25], who evaluated leaf wetness for improving apple scab resistance by an NNM; Dalla Marta et al. [29] estimated leaf wetness duration for simulating Plasmopara viticola infection. In this work, the NNMs obtained good performances with the same inputs in the two locations (Table 8), which were the same as in Francl et al. [24]. This study also indicated that transpiration has the same importance as radiation in estimation of LWD inside a greenhouse. However, transpiration and dew temperature are variables not commonly available in standard weather stations. This work mainly focusses on an analysis to prove that a decision learning tree can lead to an effective calibration of leaf wetness models, and that this preliminary calibration is needed when applying empirical leaf wetness models in new conditions. Although the plant architecture and its thermal properties are two of the causes of differences of the leaf wetness models, their inclusion in available models is limited to process-based models and semi-empirical approaches; for example, Magarey et al. [9] developed the surface wetness energy balance model to estimate LWD on grape plants, considering the balance between the canopy water budget and the sum of canopy water storage capacity, intercepted rain or irrigation, and the volume of water on the leaf as dew and the volume of water evaporation. Kim et al. also developed a fuzzy logical model based on energy balance principles [39]. Ferentinos et al. [40] analyzed the spatial distribution of temperature, humidity, condensation condition risk and transpiration variability inside a greenhouse; all of these environment parameters has a spatial variation that is due to the measurement error caused by the limitation of the sensors. More importantly, calibration parameters of leaf wetness models are also an important reason for the different results of estimation of LWD for each location because the empirical models rely on local climate data and empirical input conditions. Thus, this work highlights the effectiveness of site-specific thresholds and inputs of leaf wetness models when they are implemented in different systems, proved by comparing model performance before and after calibration.

Conclusions
The calibration of leaf wetness model parameters is a main source of variation in LWD estimation in different locations, especially for empirical models which are based on local climatic data and input conditions. This paper emphasizes the analysis of the positive effect of the calibrated thresholds and conditions on leaf wetness model performance by the decision learning tree method in two greenhouse systems, in Spain and China. Accordingly, the parameters of relative humidity, dew temperature, classification and regression tree and neural network models were calibrated using a classification tree. The following conclusions are drawn in this study: 1.
The calibration of the parameters of leaf wetness models is effective for reducing the error between estimated LWD and measured LWD, and thus has the potential to greatly improve the model accuracy.

2.
Humidity, dew temperature, transpiration and radiation are the variables mostly contributing to the precision of a neural network model (NNM) for LWD estimation.

3.
Evaluation results showed that NNM was the most accurate in estimating LWD both in Spanish and Chinese greenhouses, with low error between estimated and measured LWD. All the other models obtained similar results in the two tested conditions.