# Enhancing Traceability of Italian Almonds through IR Spectroscopy and Chemometric Classifiers
## 3 Results
### Results of SIMCA Modeling  
In this section, we delve into the results obtained from the SIMCA models, which were developed to classify samples into three geographical origins. The utilization of SIMCA allowed for us to create models tailored to each class, ensuring that the unique characteristics and patterns of each group were adequately represented. Two different data sets were available for SIMCA: spectra collected on the shell and on the kernel. Regardless of the sampling position, the SIMCA models were created on raw (mean-centered) data, and after different data pretreatments, namely, SNV, first derivative (D1), second derivative (D2), SNV + D1, and SNV + D2. Consequently, six different cross-validated calibration models were calculated for each class. Model parameters (i.e., the most suitable pretreatment and the optimal number of PCs) for each category were individuated by looking at the cross-validated efficiency (geometric mean of specificity and sensibility). Although six different SIMCA models were calculated for each investigated class, only details about the chosen calibration models are reported in Table 1.  
The application of these models on the external test set yielded the sensitivities and the specificities reported in Table 2. In this table, the diagonal shows the sensitivities for each category, whereas in all the other entries the specificity with respect to all the different classes is reported. The total specificities for class Calabria, Apulia, and Sicily are 92.5%, 95.0%, and 80.0%, respectively. The outcome of the models can also be appreciated in Figure 2, where a representation of the SIMCA models' prediction in the \(\text{T}_{\text{red}}\)\({}^{2}\) and \(\text{Q}_{\text{red}}\) spaces is given for classes Calabria \begin{table}
\begin{tabular}{c c c c} \hline \hline
**Class** & **Pretreatment** & **PCs** & **Efficiency (\% CV)** \\ \hline Calabria & raw & 2 & 91.7 \\ \hline Apulia & SNV + D1 & 3 & 86.4 \\ \hline Sicily & SNV + D2 & 4 & 83.7 \\ \hline \hline \end{tabular}
\end{table} 
Table 1: SIMCA on the spectra collected on the almonds’ shells. \begin{table}
\begin{tabular}{c c c c} \hline \hline
**Class** & **Calabria** & **Apulia** & **Sicily** \\ \hline Calabria & 90.0 & 90.0 & 95.0 \\ \hline Apulia & 100.0 & 85.0 & 85.0 \\ \hline Sicily & 85.0 & 70.0 & 95.0 \\ \hline \hline \end{tabular}
\end{table} 
Table 2: Class-by-class sensitivities and specificities for the SIMCA models calculated on the spectra collected on the almonds’ shells. (A), Apulia (B), and Sicily (C). From this figure, it is apparent that all models present a satisfying sensitivity in prediction (>85%) and high specificity (>92%), except for class Sicily, where a discreet number of objects from Apulia (~30%, six test samples) and Calabria (15%, six test samples) is erroneously accepted by the model. Similarly, in Table 3, only the optimal calibration models calculated on the spectra collected on the almonds' kernels are shown. Figure 2: Graphical representation of SIMCA models’ prediction in the \(\mathrm{T_{red}}^{2}\) and \(\mathrm{Q_{red}}\) spaces. (**A**) Model of class Calabria; (**B**) model of class Apulia; (**C**) model of class Sicily. Legend: empty symbols represent training objects, full symbols embody test objects; red diamonds denote Calabria samples, green squares represent Apulia objects, and blue stars stand for Sicily. The dashed lines represent the class space-limits. The application of these models on the external test set yielded the sensitivities and the specificities reported in Table 4, whose organization resembles Table 2.  
The total specificities (on the external test set) for class Calabria, Apulia, and Sicily are 72.5%, 60.0%, and 61.7%, respectively. Comparing the results of SIMCA, it is evident that there is a notable disparity in model accuracy, with the models trained on shell spectra outperforming those trained on kernel spectra.