## 3 Results and Discussion
### External Testing of the Models  
The iPLS, siPLS, and ANN models were tested using 93 external rice spectra and evaluated in terms of their R\({}^{2}\) and RMSE values (Table 3, Figure 5). According to the values obtained, the ANN method is significantly acceptable and suitable for pasting parameter prediction and, consequently, rice quality evaluation (Table 3). These models can be considered a significant strategy for rice quality evaluation, characterized by accuracy for different rice types. This shows the applicability of NIR spectroscopy and machine learning tools to fast-mode rice quality assessments. In the food industry, the methodologies applied to evaluate the quality of products are considered time-consuming and highly expensive due to the special testing methodologies required. For this reason, the main goal of this study was to develop different prediction models, based on machine learning algorithms, relating to the rice pasting properties BD, FV, PV, TR, and ST, which define the quality of rice.  
\begin{table}
\begin{tabular}{c c c c c c c} \hline \hline
**Pasting Parameter** & **R\({}_{\text{Calibration}}\)** & **RMSE** & **R\({}_{\text{Validation}}\)** & **RMSE** & **R\({}_{\text{Testing}}\)** & **RMSE** \\ \hline BD & 0.99 & 38.7 & 0.66 & 297 & 0.70 & 296 \\ FV & 0.99 & 161 & 0.55 & 380 & 0.85 & 330 \\ PV & 0.99 & 107 & 0.80 & 146 & 0.80 & 455 \\ ST & 0.99 & 5.1 & 0.77 & 350 & 0.76 & 424 \\ TR & 0.99 & 5.7 & 0.62 & 289 & 0.72 & 911 \\ \hline \hline \end{tabular} BD—breakdown; FV—final viscosity; PV—pasting viscosity; ST—setback; TR—trough; RMSE—root-mean-square error.  
\end{table}
Table 2: ANN models for different rice pasting parameters.  
Figure 4: ANN models related to the pasting parameter of breakdown: calibration step (**A**); test set (**B**); validation (**C**); all processes (**D**).  
After the development of the prediction models, testing with selected samples allowed us to estimate with significant accuracy the values of each pasting property. The rice samples were of different varieties, which proves that the models are suitable for rigorous evaluation regardless of rice origin or composition. From the evaluation comparing the experimental and estimated values for each property, it should be noted that the difference was greater for the models developed using the iPLS algorithm, while the difference between the experimental and estimated data was smaller for the models developed using an ANN (Table 4).  
\begin{table}
\begin{tabular}{c c c c c c} \hline \hline
**Pasting Parameter** & **Model** & **Experimental Data** & **Predicted Data** & \(\mathbf{R^{2}}\) & **RMSE** & **\% (RMSE)** \\ \hline \multirow{3}{*}{BD} & iPLS & \multirow{3}{*}{\(1155\pm 459\)} & \(0.95\) & 76 & 6.8 \\  & siPLS & \(1238\pm 396\) & \(1134\pm 413\) & 0.97 & 43 & 3.8 \\  & ANN & & \(1133\pm 423\) & 0.98 & 43 & 3.8 \\ \hline \multirow{3}{*}{FV} & iPLS & \multirow{3}{*}{\(2887\pm 433\)} & \(2887\pm 433\) & 0.95 & 91 & 3.1 \\  & siPLS & & \(2984\pm 349\) & \(2903\pm 468\) & 0.91 & 117 & 4.0 \\  & ANN & & \(2889\pm 419\) & 0.95 & 87 & 3.0 \\ \hline \multirow{3}{*}{PV} & iPLS & \multirow{3}{*}{\(2657\pm 652\)} & \(2474\pm 720\) & 0.97 & 97 & 19.0 \\  & siPLS & & \(2503\pm 785\) & 0.96 & 140 & 9.6 \\  & ANN & & \(2468\pm 738\) & 0.97 & 125 & 7.6 \\ \hline \multirow{3}{*}{ST} & iPLS & \multirow{3}{*}{\(327\pm 514\)} & \(436\pm 558\) & 0.97 & 66 & 4.0 \\  & siPLS & & \(419\pm 536\) & 0.98 & 53 & 6.0 \\  & ANN & & \(407\pm 528\) & 0.99 & 50 & 5.0 \\ \hline \multirow{3}{*}{TR} & iPLS & \multirow{3}{*}{\(1419\pm 282\)} & \(1344\pm 313\) & 0.95 & 66 & 5.0 \\  & siPLS & & \(1326\pm 330\) & 0.97 & 57 & 4.2 \\ \cline{1-1}  & ANN & & \(1333\pm 306\) & 0.98 & 42 & 3.1 \\ \hline \hline \end{tabular}  
* iPLS–interval PLS; siPLS–synergy interval PLS; ANN—artificial neural network.  
\end{table}
Table 3: Models for different parameters determined after model development.  
Figure 5: Graphical representation of the external testing procedure related to the pasting parameter of breakdown.