# Rapid Assessment of Rice Quality Traits Using Low-Cost Digital Technologies
## 3 Results and Discussion
Table 3 shows the statistical results of the pattern recognition models developed to classify 17 types of commercial rice using the ANN algorithms based on the first derivative of NIR absorbances (Model 1) and e-nose readings (Model 2) as inputs. All of the classification models had high accuracy in all three stages of training, validation, and testing. The accuracies for Models 1 and 2 were high and similar (98.7% and 98.6%, respectively). Additionally, the MSE values were low, and the training had lower MSE than the testing stage, showing that the models had no sign of under- or overfitting. Figure 4 shows the overall receiver operating characteristics (ROC) curves of the classification models. From the figure, it can be observed that all of the 17 types of rice were close to the true positive rate on the vertical axis, showing that the models have high sensitivity to classify the rice samples with respect to the 17 types of rice. \begin{table}
\begin{tabular}{c c c c c c} \hline \hline
**Algorithm** & **Stages** & **Samples** & **Accuracy (\%)** & **Error (\%)** & **Performance (MSE)** \\ \hline \multicolumn{6}{c}{Model 1 (Inputs: NIR absorbance of raw rice; targets: 17 types of rice)} \\ \hline \multirow{3}{*}{BR} & Training & 107 & 100 & 0.0 & \textless{}0.001 \\  & Testing & 46 & 95.7 & 4.3 & 0.003 \\ \cline{1-1}  & Overall & 153 & 98.7 & 1.3 & \(-\) \\ \hline \multicolumn{6}{c}{Model 2 (Inputs: E-nose outputs of raw rice; targets: 17 types of rice)} \\ \hline \multirow{3}{*}{BR} & Training & 357 & 100 & 0.0 & \textless{}0.001 \\  & Testing & 153 & 95.4 & 4.6 & 0.005 \\ \cline{1-1}  & Overall & 510 & 98.6 & 1.4 & \(-\) \\ \hline \hline \end{tabular}
\end{table} 
Table 3: Statistical results of Model 1 and Model 2 developed based on artificial neural network pattern recognition. Abbreviations: BR: Bayesian regularization; MSE: mean squared error; e-nose: electronic nose; NIR: near-infrared. The statistical results of the regression models developed using the ANN algorithm to predict the aroma and physicochemical qualities of the rice based on the first derivative of NIR absorbance values (Model 3-Model 5) and e-nose outputs (Model 6 and Model 7) are shown in Table 4. Overall, all models had high accuracy, denoted by the correlation coefficient (R) values presented in the table. Model 3 and Model 4 developed using the BR algorithm showed high overall accuracy (Model 3: R = 0.95; Model 4: R = 0.98). Moreover, the MSE values for both models at the training stage (Model 3: MSE = 1.23 \(\times\) 10\({}^{8}\); Model 4: MSE = 2.22 \(\times\) 10\({}^{7}\)) were lower than at the testing stage (Model 3: MSE = 1.23 \(\times\) 10\({}^{10}\); Model 4: MSE = 2.54 \(\times\) 10\({}^{9}\)), showing the best fit models. Model 5, when predicting the color, texture, and pH of the cooked rice, showed high overall accuracy, at R = 0.96. Lower MSE values for training (MSE = 0.01) compared with the validation (MSE = 0.07) and testing (MSE = 0.08) stages and the latter two being similar confirm no signs of under- or overfitting. \begin{table}
\begin{tabular}{c c c c c c} \hline \hline
**Algorithm** & **Stages** & **Samples** & \begin{tabular}{c} **Observations** \\ **(Samples \(\times\) Targets)** \\ \end{tabular}  & **R** & **Slope** & \begin{tabular}{c} **Performance** \\ **(MSE)** \\ \end{tabular}  \\ \hline \multicolumn{5}{c}{Model 3 (Inputs: raw rice NIR; targets: raw rice aroma)} \\ \hline BR & \ \begin{tabular}{c} Training \\ Testing \\ Overall \\ \end{tabular}  & 107 & 3531 & 1.00 & 1.00 & 1.47 \(\times\) 10\({}^{8}\) \\ \hline \multicolumn{5}{c}{Model 4 (Inputs: raw rice NIR; targets: cooked rice aroma)} \\ \hline BR & \begin{tabular}{c} Training \\ Testing \\ Overall \\ \end{tabular}  & 107 & 1070 & 0.99 & 1.00 & 2.22 \(\times\) 10\({}^{7}\) \\ \hline \multicolumn{5}{c}{Model 5 (Inputs: raw rice NIR; targets: raw rice aroma)} \\ \hline \multicolumn{5}{c}{\(\begin{array}{c}\text{{}}  
The ANN regression Models 6 and 7 were developed using e-nose measurements to predict the raw and cooked rice aromas, respectively.