# Predicting the Quality of Tangerines Using the GCNN-LSTM-AT Network Based on Vis-NIR Spectroscopy
## 4 Results and Discussion
### Comparison with Conventional Machine-Learning Approaches and Two Deep Networks  
To compare the proposed GCNN-LSTM-AT model with conventional machine-learning approaches, three popular linear and nonlinear methods are taken into consideration, namely Moving Window Partial Least Squares (MWPLS) [32], Random Forest Regression (RF), and Support Vector Regression (SVR). Parameters of these methods have been optimized. For the SVR approach, GridSearch is employed to choose the kernel function from [linear', 'poly', 'rbf'], the penalty parameter from [0.001, 0.01, 0.1, 1, 10, 100, 1000], and the poly degree from [2; 3; 5]. MWPLS incorporates the concept of moving windows analysis to capture local variations, which performs better than PLS. RF combines the strength of decision trees and ensemble learning. GridSearch is employed in RF to select the number of estimators from range (50, 300) in step 50, the maximum depth from [5; 10; 20], the minimum split of sample from [2; 4; 8] and the minimum leaf of sample from [1; 2; 4]. The compared two other deep networks--DeepSpectra2D and CNN-AT--are already introduced in detail in the above section. The overall results for predicting the five target qualities of tangerines using all six algorithms are listed in Table 2. The results in the table are sorted in descending order by the value of \(R^{2}\). As can be concluded from the table, the proposed GCNN-LSTM-AT model outperforms the three conventional approaches and two other deep networks in almost all scenarios in this study, except that it is a little worse than DeepSpectra2D for predicting VC. For the prediction of SSC (\"Brix), various algorithms demonstrate good performance. Among them, GCN-LSTM-AT achieves the best performance with the lowest RMSECV (0.1430 \"Brix), the highest \(R^{2}\) (0.9885), and the smallest MAE (0.1197 \"Brix). CNN-AT obtains the second-best performance, which achieves \(R^{2}\) 0.9300, RMSECV 0.4413 \"Brix and MAE 0.4034 \"Brix). The worst results are obtained by RF. In the evaluation of TA (\(\%\)) prediction, GCN-LSTM-AT demonstrates better performance than other methods with \(R^{2}\) 0.8075, RMSECV 0.0868% and MAE 0.0721%. RF based on GridSearch provides the second-best prediction (\(R^{2}\) is 0.7085, RMSECV is 0.106826%, and MAE is 0.09584% in optimal case). When predicting A/S, \(R^{2}\) can be improved to 0.901365 by GCN-LSTM-AT, which is much higher than the second-best method of 0.669026 based on the CNN-AT. The RMSECV of GCN-LSTM-AT is reduced to 1.998381, which is 44.81% less compared to CNN-AT. Regarding the target firmness (kg), GCN-LSTM-AT outperforms the other methods in terms of the highest \(R^{2}\) (0.9472), while DeepSpectra2D obtains a lower \(R^{2}\) (0.8203). Theworst results are from SVR with \(R^{2}\) 0.19752. Results from the VC (mg/100 g) prediction reveal the good performance of DeepSpectra2D. It achieves the lowest RMSECV of 28.9411 (mg/100 g) and the highest \(R^{2}\) of 0.74686 while GCN-LSTM-AT obtains the smallest MAE of 23.131868 (mg/100 g) and a slightly lower \(R^{2}\) of 0.7386 than DeepSpectra2D, and the RMSECV is 29.410427 (mg/100 g). Despite being just slightly inferior to DeepSpectra2D in the prediction of VC, GCN-LSTM-AT shows significant improvement compared to other algorithms and performs consistently satisfactorily. One notable observation from results of traditional algorithms is that the optimal hyperparameters for RF and SVR varied across different prediction targets. This finding underscores the sensitivity of RF and SVR to specific characteristics of the prediction task at hand. For MWPLS, the choice of window size is critical and can impact the model performance. Determining the optimal window size requires careful consideration and experimentation. Also, MWPLS involves performing PLS regression multiple times within different windows, which increases the computational complexity. In contrast, our proposed algorithm GCNN-LSTM-AT demonstrates a distinct advantage in this regard.