## 3 Results
### Near Infrared Spectroscopy Qualitative Predictive Models  
2.1 Partial Least Squares-Discriminant Analysis Models for the Classification of Iberian _Chorizo_ According to Commercial Categories of Raw Material  
The combination of the SNV and DE (SNV-DE) pre-treatments for the _Black_ category gave the best prediction result in PLS-DA in the spectra range comprised between 1000 and 2300 nm (Table 2). For both _Red_ and _White_ categories, the best fitting prediction models were derived from the combination of first derivative (SG 1,4,4,1) and SNV-DE in the 1000 and 2300 nm (Table 2). No substantial differences were observed between the 1-VR and RMSECV statistics among the best models for the three categories considered. Thus, 1-VR ranged from 0.790 for _White_ model to 0.838 of _Red_ one, whereas the RMSECV ranged from 0.181 to 0.245 for _Red_ and _White_ models, respectively. The SE and SP calibration values obtained for all the abovementioned calibration models were above 95%.  
When best PLS-DA fitting prediction models were validated (Table 2), the best SE and SP results were found for the SNV-DE 1000-2300 nm model, i.e., the best fitting predictive model for the _Black_ category, with an 81.82% and 90.00%, respectively. In any case, satisfactory classification results were also obtained for the rest of commercial categories when models were externally validated.  
The PCA plots after the pre-treatments and in the spectra range from which the best fitting models were obtained are presented in Figure S3 of the supplementary material. It can be noted how the samples represented in principal components (PC) 1 and 2 tend to aggregate according to the commercial category of the raw material used, and therefore suggesting that discrimination among classes may be possible using the pre-treatments and spectra ranges above-mentioned. More in detail, samples from _Black_ tended to have positive scores in both PC1 and PC2, _Red_ samples were located to the left of PC1, whilst _White_ samples had positive scores in PC1 and negative scores in PC2 (Figure S3).  
2.2 Soft Independent Modelling of Class Analogies Models for the Classification of Iberian _Chorizo_ According to Commercial Categories of Raw Material  
The model where the best results were obtained for the _black_ label was the raw spectrum in the range of 1000-2300 nm, while for the _red_ and _white_ category the SG 1,4,4,1 and SNV-DE (1000-1800 nm) pre-treatments were necessary to obtain the best SE and SP (Table 3). All these calibration models showed perfect SE (100%). On the contrary, low SP values were found, especially for _Black_ category (21.57%). When external validation was applied, the results were less accurate in terms of SE, whilst SP values showed similar behavior to calibration sample set, even improving for the _Black_ model.  
In Figures S2-S5 (supplementary material) the SIMCA plots of both the sample-to-model distance (Si) and the sample leverage (Hi) for a particular model are shown. The plots include the class membership limits for both statistics: (A) projection of calibration and (B) external validation samples set to the PCA model results from the pre-treatment and spectra range from which the best classification fitting models were obtained for _Black_, _Red_ and _White_ categories, respectively.  
2.3 Linear Discriminant Analysis Models for the Classification of Iberian _Chorizo_ According to Commercial Categories of Raw Material  
The best SE and SP values in calibration models by LDA were attained with the use of SG 1,4,4,1, SG 1,4,4,1 SNV-DE and raw spectra (Reflectance) for _Black_, _Red_ and _White_, respectively (Table 4). Normally, excellent results were obtained, with both SE and SP values above 84%. Once external validation was applied, the SE and SP results were preserved, except in the case of the _Black_ label, which experienced a decrease in the SP value to 60% (Table 4).