## 3 Results and Discussion
### Random Forest Models Based on Feature Extraction
The calibration models were obtained using two wavenumber ranges, specifically 1770-1690 cm\({}^{-1}\) and the fingerprinting area 1480-1030 cm\({}^{-1}\), indicating that the carbonyl bonds in acylglycerols and the stretching in the C-O bonds of aliphatic esters, respectively, provide important information. Our results are in line with those of the latter study, as previously stated. In EVOO samples, the free fatty acid content is very low, whereas they are present in higher amounts in virgin, lampante, and ordinary olive oils. Their presence could be attributed to fermentation and deterioration of the olive oil fruit, which may be overripe, damaged, or otherwise improperly stored before processing [28]. Spectral features associ \begin{table}
\begin{tabular}{c c c c c c c c} \hline d = 2, p = 2, w = 13 & Predicted & EVOO & Other & Recall & Accuracy & Precision & F1 Score \\ \hline \multirow{2}{*}{Actual} & EVOO & 30 & 4 & & & & 1.0 & 0.94 \\ \cline{2-8}  & Other & 0 & 12 & & & & \\ \hline d = 2, p = 3, w = 12 & & & & & & \\ \hline \multirow{2}{*}{Actual} & EVOO & 28 & 6 & 0.82 & 0.87 & 1.0 & 0.90 \\ \cline{2-8}  & Other & 0 & 12 & & & & \\ \hline \end{tabular}
\end{table} 
Table 6: Results (confusion matrix) of external validation of RF models developed on FTIR spectral data based on different pre-processing techniques using 0.0001 feature importance threshold. \begin{table}
\begin{tabular}{c c c c c c c c} \hline d = 2, p = 3, w = 12 & Predicted & EVOO & Other & Recall & Accuracy & Precision & F1 Score \\ \hline \multirow{2}{*}{Actual} & EVOO & 32 & 2 & & & 0.94 & 0.91 & 0.94 & 0.94 \\ \cline{2-8}  & Other & 2 & 10 & & & & \\ \hline d = 2, p = 2, w = 13 & & & & & & & \\ \hline \multirow{2}{*}{Actual} & EVOO & 30 & 4 & 0.88 & 0.91 & 1.0 & 0.94 \\ \cline{2-8}  & Other & 0 & 12 & & & & \\ \hline \end{tabular}
\end{table} 
Table 5: Results (confusion matrix) of external validation of the RF models developed on FTIR spectral data based on different pre-processing techniques using 0.001 as the feature importance threshold. ated with free fatty acids are in the wavenumber region around 3300 cm\({}^{-1}\)[29], which was not observed in our study. The peroxide value and spectrophotometric absorption at 232 and 270 nm are among the quality criteria for ranking olive oil categories. Both chemical parameters are used to express the extent of oxidation of olive oils. For EVOO, virgin olive oil, and ordinary olive oil, peroxide values must be equal to or lower than 20 milliequivalents of peroxide oxygen per kg/oil, whereas lampante olive oil has no limit [5; 29]. Hydroperoxides decompose into secondary oxidation products, such as aldehydes, ketones, and epoxides, which are responsible for the off-flavor of oxidized oils [30]. Spectral bands around 1685 cm\({}^{-1}\) were observed when olive oils were incubated at 65 \({}^{\circ}\)C in the dark and were assigned to unsaturated aldehydes [30; 31; 32]. The latter explains the selection of 1680 cm\({}^{-1}\) as a spectral feature for the classification of our samples and the discrimination of EVOO from the \"other\" class and particularly from the lampante olive oil. This study effectively demonstrates the potential of FTIR spectroscopy combined with RF analysis to differentiate EVOO from other olive oil categories. However, some limitations should be acknowledged to provide a more comprehensive understanding of the applicability of the method and to inspire further improvements. The sample size and its diversity are very important, as a relatively small sample size may limit the generalization of the classifier. Further studies should be undertaken to include a broader range of geographical origins, olive cultivars, and production methods. From a computational point of view, although the RF model achieved a high classification accuracy (up to 91%), the risk of overfitting cannot be entirely ruled out, especially given the high-dimensional nature of the spectral data.