Artiﬁcial Neural Network Modeling of Greenhouse Tomato Yield and Aerial Dry Matter

: Non-linear systems, such as biological systems, can be simulated by artiﬁcial neural network (ANN) techniques. This research aims to use ANN to simulate the accumulated aerial dry matter (leaf, stem


Introduction
Quantitative interpretations of plant growth through descriptive models have been developed via two mathematical approaches known as classical and functional analysis [1]. ANNs are a nonlinear mapping structure based on the function of the human brain [2], offering learning capabilities. ANNs have been developed to build mathematical models that mimic the computing power of the human brain, with powerful processing capabilities that have been demonstrated in various real-world applications [3]. Agriculture offers many wide applications for ANNs [4][5][6][7][8].
The neuron is the basic working unit of an ANN. This neuron does not have a predefined meaning and evolves during the learning process in a manner that can characterize the target's function [3].
Neural networks are models based on emulating human reasoning, which have great advantages in applying mathematical reasoning to situations with unknown relationships between the dependent and independent variables [72]. This research aimed to build two ANNs in order to simulate the aerial dry matter (leaf, stem, and fruit) and fresh fruit yield in a tomato crop grown into two culture systems.

Establishment and Growth of Tomato Crop
Seeds of a saladette tomato (Solanum lycopersicum L.) hybrid "EL CID F1" with undetermined growth habits were seeded in polystyrene trays. After 35 days, the seedlings were transplanted equidistantly, with 3 plants per square meter, into 8 L black polyethylene containers. Two culture systems were used: substrate and the soil. Tomato plants were grown in a multi-tunnel greenhouse with a polyethylene cover located in the Horticulture Department at the Agricultural University "Antonio Narro" in Saltillo, Mexico (25 • 21 N, 101 • 01 W, altitude 1743 m). The crop cycle extended from May 20th to November 11th, 2017, with average values of temperature at 21 • C, photosynthetic active radiation of 565 µmol m −2 s −1 , and relative humidity of 51%. The tomato plants were maintained on a single stem by removing the axillary buds. Fertilization consisted of a Steiner nutrient solution [73] applied three times a day by watering to concentrations of 25%, 50%, 75%, and 100% at the transplanting date and 15, 28, and 35 DAT. The irrigation water was gradually increased during the crop cycle from 0.5 to 3 L per plant per day from the transplanting date to harvesting by using an irrigation system.

Measuring of ANN Input Values
The input variables consisted of six crop variables: leaf area (LA), plant height (PH), fruit number (FN), dry matter of leaves (LDM), stems (SDM), and fruits (FDM), and the accumulated air temperature (growth degree days) at 136 DAT. Four tomato plants were randomly chosen for the substrate and soil culture systems. The leaf areas of the tomato plants were measured with a portable LI-3100C device (LI-COR ® , Inc. Nebraska, USA) as the square centimeters per plant (cm 2 plant −1 ). The plant heights or stem lengths of the tomato plants were measured with a flex meter from the substrate surface through the apical bud in centimeters (cm). The fruit number was registered for each plant. The fresh matter (leaves, stems, and fruits) was measured separately with a digital balance, and the leaves, stems, and fruits were dehydrated separately in a drying oven at 70 • C until obtaining a constant weight, expressed in grams per plant (g plant −1 ). The greenhouse air temperature in Celsius degree ( • C) was measured with a WhatchDog 1650 datalogger (Spectrum Technologies Inc., St. Joseph, IN, USA) at a time interval of 15 min. The growth degree-days (GDD) were computed according to the residual method [74] in Excel with Equation (1): where GDD is the growth degree-day on the ith day from the transplanting date to 136 DAT ( • D), T i is the mean greenhouse air temperature on the ith day ( • C), T b is the base temperature at which the growth ceased (for the tomato grown under greenhouse conditions T b = 10 • C [75]), and T min and T max are, respectively, the minimum and maximum daily temperatures ( • C). The plant development rate is proportional to Ti − Tb, which implies that the development stage will be proportional to the integrated temperature (Ti − Tb)dt, where the plant development rate ceases when Ti − Tb < Tb [76].

Artificial Neural Networks
Two feed-forward backpropagation ANNs with an input layer, three hidden layers, and two output layers were trained and validated by the Levenberg-Marquardt algorithm for adjusted weights and bias [77][78][79]. The input layer consisted of seven neurons with the average values of five replications of the leaf area (LA), plant height (PH), fruit number (FN), dry matter of leaves (LDM), stems (SDM) and fruits (FDM), and growth degree days (GDD) from the accumulated greenhouse air temperature over the crop cycle. The output layers consisted of the fresh fruit yield and aerial dry matter. Different ANN topology arrays, varying the neuron number in the three hidden layers, were evaluated in order to determine the appropriated network topology to be used in each cropping system. The 10-7-5 and 10-8-5 topologies were used at the hidden layers for the substrate and soil, respectively, according to their data and learning rates. The input and output data were normalized by the Min-Max method [80,81] in the RStudio software [82], where the data were randomly divided into three sets: training 70%, validation 15%, and testing 15%, according to the literature, where these percentages were used for the data [64,83].

Neuron Topologies in the Hidden Layers
Neuron numbers between 5 to 10, 4 to 10, and 1 to 5 were randomly chosen in the three hidden layers in order to build different topology arrays [64] (Table 1). In most applications, the neuron number is determined by trial and error [84]. The different topology arrays resulting from these combinations were evaluated in the MATLAB neural network toolbox [85], and the following transfer functions were used: tangent sigmoidal hyperbolic (tansig), logarithmic sigmoidal hyperbolic (logsig), and pure lineal (purelin) [85,86], with a learning rate of 0.5 [63], 1000 epochs [64], minimum performance gradient of 1e −07 and adaptation value of 0.001. The tangent sigmoidal hyperbolic (tansig) transfer function presented the best performance in the hidden layers, and the pure lineal (purelin) transfer function presented the best performance in the output layers, defined by its lower mean square error (MSE) values for the substrate and soil (Table 1). For the hidden layers, the sigmoid hyperbolic tangent (tansig) transfer function (Equation (2)) was used [87]: For the output layer, the linear (purelin) transfer function (Equation (3)) was used [87]: where m is the number of neurons in the output layer, W ij is the weight of connections between layers i and j, Y i is the output of the neurons in layer i, and b j is the bias of the neurons in layer j.
Correlation and dependence are statistical relationships between two or more random variables or observed data values. Correlation refers to any departure of two or more random variables from independence and indicates a relationship between the mean values, thereby offering predictive relationship that can be used in practice. Dependence indicates if the random variables satisfy a mathematical condition of probabilistic independence [88]. The MSE and correlation coefficient (R) were used in this research.
ANN validation was performed in the Matlab 2017a software through the MSE computing (Equation (4)), according to [89]: where P is the number of output neurons, N is the number of exemplars in the dataset, and y ij and d ij are the network output and desired output for exemplar i at processing element j.
Although the MSE values indicate the difference between the predicted and experimental values, the MSE criterion does not determine their direction, so the R was also calculated with Equation (5), according to [87,89]: where Xi is the network output, X is the mean of the network outputs, d i is the desired output, d is the mean of the desired outputs, and N is the number of exemplars in the dataset. The performance indicators for building the ANN model included the higher R [90] and the lower MSE [66,70].

ANN Topologies
Two feed-forward backpropagation ANNs with an input layer, three hidden layers, and two output layers, were trained and validated by the Levenberg-Marquardt algorithm for adjusted weights and bias. The ANN array with three hidden layers was chosen from the minimum MSE values obtained in the experimentation, which increased until 1.55, 0.94 and 0.49 in the ANN with 1, 2 and 3 hidden layers, respectively (Table 1).
Based on the evaluation of the transfer functions, an ANN with a 10-7-5 topology in the hidden layers was built for the substrate culture system (Figure 1a). This ANN showed the best performance (R = 0.97 and MSE = 0.107), with tansig and purelin transfer functions in the hidden layers and output layer, respectively (Table 1), while the ANN with a 10-8-5 topology in the hidden layers was built for the soil culture system (Figure 1b), which showed better performance (R = 0.95 and MSE = 0.049) with tansig and purelin transfer functions in the hidden layers and output layer, respectively (Table 1).

Training, Validation, and Test Processes of the ANNs
The training, validation, and test processes were performed with the observed and simulated data for the aerial dry matter and fresh fruit yield of the tomato grown in the substrate ( Figure 2a) and soil (Figure 2b) culture systems. All evaluation processes showed R values higher than 0.96 for the substrate and higher than 0.94 for the soil.

Aerial Dry Matter
The observed and simulated data of aerial dry matter over the crop cycle showed R values higher than 0.96 in the substrate (Figure 3a) and higher than 0.98 in the soil (Figure 3b) culture systems. At 136 DAT, the simulated data were underestimated with respect to the observed data because the regression line (black line) was located below the 1-1 line (gray line) for both the substrate and the soil culture systems.

Fresh Fruit Yield
The observed and simulated data for the fresh fruit yield over the crop cycle showed R values higher than 0.98 in the substrate (Figure 4a) and higher than 0.97 in the soil (Figure 4b) culture systems. At 136 DAT, the simulated data were overestimated with respect to the observed data because the regression line (black line) was located above the 1-1 line (gray line) for both the substrate and the soil culture systems.

Discussion
According to the evaluation, two neural network architectures were obtained, one for the substrate (7-10-7-5-2) and the other for the soil culture systems (7-10-8-5-2). These architectures showed the best performance and were appropriate according to Gutiérrez [90], who mentioned that the correlation coefficient measures the intensity of the relationship between two variables (X and Y), to justify the inclusion of the comparison criterion and a low value of the MSE. The MSE is calculated by dividing the sum of the squares of the difference of the target value with the value calculated by the neural network, by the total number of data. The MSE value and the training algorithm will allow one to perform an acceptable training to adjust the weights and bias according to the real data [23]. The MSE was used to measure the efficiency of the training process, as mentioned in [66,70].

ANN Topologies
Two feed-forward backpropagation ANNs were trained and validated by the Levenberg-Marquardt algorithm for weights and bias adjusted, one for substrate and other for soil culture systems. The tansig-purelin transfer functions in the hidden and output layers, respectively, for the two ANNs were used. The ANN outputs were the aerial dry matter and the fresh fruit yield of the tomato grown for the two culture systems.
The ANN with three hidden layers showed a better fit, corresponding to lower MSE values in the two culture systems, with substrate topologies of 10, 7, and 5 neurons in the first, second, and third hidden layers, respectively, and soil topologies of 10, 8, and 5 neurons in the first, second, and third hidden layers, respectively. The topologies of the two culture systems were different only in the second hidden layer, with the soil data higher in one neuron compared to the substrate data. In this research the tansig, logsig and pureline transfer functions were used, both in the hidden layers and in the output layer, while [91] only used the tansig transfer function in the hidden layers and the pureline transfer function in the output layer.
According to [92], if sigmoidal neurons are used in the output layer, the network output is limited to a very small range; on the other hand, when using a linear neuron, the output can take any value.
The study in [93] used the multilayer perceptron model with the hyperbolic tangent activation function (tansig) for the hidden layers; this study also used the linear function (purelin) in the construction of its topology for the output layer, which was used for the functions of the two networks to simulate the fruit yield and aerial partial biomass in the substrate and soil. The work in [94] used a backpropagation ANN to simulate the photosynthesis rate of tomato plants, a tangent sigmoidal hyperbolic (tansig-logsig) transfer function for the hidden layers, and a linear (purelin) transfer function for the output layer, with the same transfer functions used for the two models in the present study. Figure 2 shows the correlation between the observed and simulated values for the training, validation, and test data with better performance-that is, the data with R > 0.96 (MSE = 0.107) for the substrate and R > 0.94 (MSE = 0.049) for the soil culture systems. The objective of this validation is to establish the credibility of a model for a specific purpose, which is usually done through a comparative analysis [95].

Training, Validation, and Test Processes of the ANNs
The learning rate of 0.5 used in this research for the substrate and the soil culture systems is similar to the learning rate (0.6) used in [63] and is in the range of the recommended values (0.05 to 0.5 [96], 0.1 to 0.7 [97], and 0.05 to 0.75 [98]), where the learning rate value has no influence on the ANN error [97].
The ANN frames with the Levenberg-Marquardt algorithm applied to the multilayer perceptron topology without connections across layers feature topologies that are far from optimal [77], similar to those used in this research. The obtained R used to measure the performance of the network for validation and testing of the data from the tomato crop grown in the substrate were higher than those obtained in [18], which used a dynamic neural network to predict the tomato yield in a semi-closed greenhouse. In the soil data validation, the R (0.99) was similar to that reported in [64], which used an ANN to predict the yield indexes and quality of the three grasses.
During the training, validation, and test processes of the ANNs, the 1-1 line (dashed line) was used to represent a perfect fit if the network output was the same as the desired output. A continuous line represents the best linear fit regression between the observed output data and the simulated output data from the network. It was also observed that increasing the layers did not decrease the MSE, which began to remain constant at 10, 7, and 5 neurons in the hidden layers, with eight epochs for the substrate and 10, 8, and 5 neurons in the hidden layers, with six epochs for the soil. The study in [63] evaluated a three-layer ANN with different neurons in the hidden layer and determined different changes in the mean prediction error as the topology increased-that is, a reduction from 3.34% to 2.21% (9-1-1 to 9-5-1), and an increment from 2.21% to 2.56% (9-5-1 to 9-9-1).
The authors in [99] concluded that the number of hidden layers and the number of neurons must be chosen by the designer and that there is no rule that can determine the optimal number of hidden neurons to solve a given problem. In most applications, determination of the epoch and neuron number is determined by trial and error [84].

Aerial Dry Matter and Fresh Fruit Yield
This research aimed to use soft computing techniques to model tomato growth. However, the ANN topologies for the substrate and soil culture systems were trained, validated, and tested using the neuron values of the input layers containing the scalar values of the data corresponding to 136 DAT, not with the vectors across the entire crop cycle. The simulated data were well fitted to the observed data in both the substrate and the soil culture systems, with R higher than 0.96 for the aerial dry matter and higher than 0.97 for the fresh fruit yield.

Conclusions
The employed feed-forward backpropagation ANNs with 7-10-7-5-2 and 7-10-8-5-2 topologies for the substrate and soil culture systems, respectively, and trained and validated by the Levenberg-Marquardt algorithm for weights and bias adjusted, satisfactory simulated the aerial dry matter and the fresh fruit yield compared to the observed values.
As mentioned earlier, in recent years, soft computing techniques, such as ANNs, have been used to analyze, model, predict, and execute real processes. In real processes, there is variability and uncertainty that, in some situations, cannot be evaluated with traditional mathematical models. Therefore, this paper was focused on the use of different ANN feedforward topologies capable of learning and simulating the cumulative aerial dry matter and yield of the fresh fruit from a tomato crop grown under greenhouse conditions in substrate and soil culture systems.
Based on the data obtained from the tomato crop grown in the substrate and soil, the two designed ANN structures represent a reliable and precise alternative for modelling and simulating the cumulative yield of tomato crops cultivated under different greenhouse conditions, giving average relative errors of 12.06% and 13.65% for the substrate and soil conditions and a R greater than 94% in both cases. The training process for the ANN structures ended before 10 iterations, reaching a MSE of 0.107 for the substrate and a MSE of 0.049 for the soil. These results show the ability to generalize the designed networks. The results indicate that using databases containing 280 data from four plants (four replicates), 10 samples, and seven input variables allowed the networks, during training, to learn the relationships between the studied inputs and outputs. Likewise, these results indicate that soft computing techniques are suitable for the analysis of data with variability, uncertainty, and various correlations, as shown by the tomato crop data.