## 4 Discussion  
In general, the results presented in the previous section prove that the nitrogen content of cucumber leaves can be estimated with a high accuracy using hyperspectral information in the Vis-NIR range and the proposed 1D-CNN regression models. The obtained mean errors are always below 1% with respect to the expected values for all the treatments. For example, in the N\({}_{30\%}\) class, the mean absolute error (MAE) is only 0.017 mg/g, while the nitrogen content ranges from 3-3.4 mg/g; this would represent a 0.56% relative error. The relative MAE for the N\({}_{60\%}\) and N\({}_{90\%}\) classes are 0.35% and 0.45%, respectively. This means that the proposed approach can be effectively used for the estimation of nitrogen in the leaves from the early stages, since the error is very small even for the 30% class. This positive result can also be argued even for the worst cases of error, i.e., considering the maximum errors, MaxE. This error is 0.086 mg/g for N\({}_{30\%}\) class and 0.091 mg/g for N\({}_{60\%}\) class, which represent relative errors below 3%. In the N\({}_{90\%}\) class, this worst case has a very low error of 0.054 mg/g. Therefore, we can conclude that the method does not present cases of extremely high error. This is evidence of the robustness of the proposed approach against the most difficult cases. Regarding the preprocessing techniques applied in the paper, MSC and SG, both steps prove to have positive effects on the obtained results. Observe that MSC is a scatter correction filter of the spectra, while SG is a smoothing operator. In all the treatments, the worst results are given by not applying any filter, which is evident for all the performance measures. For example, in the 60% class, the MSE is 0.0003 mg/g with the proposed filters, MSC + SG, while it rises to 0.0012 mg/g with no preprocessing filter. If we should select only one filter, the smoothing step, SG, is the method that offers the best results by itself in terms of the error. For example, in the 90% class, the MAE without any filter is 0.028 mg/g; with SG it descends to 0.025, but with MSG it is 0.027. This indicates that smoothing is more beneficial than scatter correction. This is also repeated for the determination coefficient, R\({}^{2}\), which is consistently higher for SG. Moreover, the improvement from applying MSC + SG with respect to applying only SG is very reduced in most cases, with a small positive effect in the error measures. Analyzing the evolution of the loss curves in Figures 6, 8 and 10, it can be seen that  
Figure 10: Train loss and validation loss diagram for category N\({}_{90\%}\). the proposed 1D-CNN has a very fast convergence for all the treatments. A fast reduction of the loss values is produced in the first five epochs. Then, the system enters in a gradual convergence phase, which is stopped before it could incur in over-fitting. No model required more than 43 epochs, making them relatively fast to be trained. The loss curves also indicate that the training process does not incur in over-fitting, which would appear as a reduction of the train loss and an increment in the validation loss. Finally, Table 7 presents a comparison of the results achieved by the proposed 1D-CNN models, compared with the results of other researchers for the non-destructive estimation of different properties of fruits, using R\({}^{2}\) criterion. Although these works have been selected among the most similar to our proposed method, this comparison has to be considered in context, since they refer to different types of fruits, different datasets, and distinct types of regression models. We have also included the results of a previous study from our group that deals with the estimation of nitrogen in tomato leaves, using different types of classifiers [35]. Overall, the results of the present study showed that using 1D-CNN based on spectral data, it is possible to estimate the excess nitrogen more accurately, achieving results that are in the state of the art.