Introduction

Nuts in general and hazelnuts (Corylus avellana L.) in particular are important raw materials for the confectionery industry, and they are used for the production of chocolate, pastries, and spreads. Since nuts are harvested seasonally, but processing and demand occur throughout the year, long storage periods are unavoidable (Silvestri et al. 2021). It is also conceivable that unsold harvests are mixed with new harvests and sold off. Since nuts and food products made from them should be of consistent quality, the use of properly stored raw materials is crucial, as improper or prolonged storage can lead to raw material defects due to rancidity, bitter off-taste as well as the growth of microorganisms (Ghirardello et al. 2013; Ozay et al. 2008; Turan 2019). The samples used in this study have already been analyzed by NMR spectroscopy and high-resolution LC-MS to investigate the processes occurring under various storage conditions in detail (Loesel et al. 2023; Shakiba et al. 2023). The applicability of these methods for rapid quality control during incoming inspections or in-process monitoring is limited due to the comparatively time-consuming sample preparation. In addition, there are high equipment acquisition costs, the availability of an appropriate laboratory infrastructure, and the need for trained personnel. As a result, classical quality parameters such as the peroxide value or sensory and optical methods are generally used for incoming goods inspection (Ghirardello et al. 2013; Giraudo et al. 2018; San Martin et al. 2001). As these methods provide only limited depth of information, there is a need for rapid and easy-to-perform methods. Fourier transform near infrared (FT-NIR) and Raman spectroscopy could be suitable for this and are already established in quality control (Arndt et al. 2020b; Cheng et al. 2010; Ellis et al. 2005; Giraudo et al. 2019; Kim et al. 2009; Oroian et al. 2018; Vitale et al. 2013).

The effects of storage on NIR and Raman spectra of various foods have already been studied. For example, plums, tomatoes, and eggs, as water-rich foods, have been analyzed by NIR spectroscopy, allowing accurate predictions of previous storage (Coronel-Reyes et al. 2018; Emsley et al. 2022; Pérez-Marín et al. 2010). Furthermore, NIR studies have been conducted with foods that have low-water content. For example, macadamia nuts infested with insects were studied by NIR spectroscopy (Canneddu et al. 2016), and walnuts that were refrigerated and stored at room temperature were found to have changes in the aliphatic C–H bond region (1400–1450 nm) (Jensen et al. 2001). Hazelnuts have also been investigated by NIR spectroscopy, but the aim was not to analyze storage processes, but to separate healthy and flawed hazelnuts (Pannico et al. 2015). Raman spectroscopy has already been successfully used to follow the storage process of salmon (Zhong et al. 2021) and to determine the oxidation index of oils (Wang et al. 2021).

NIR and Raman spectroscopy are complementary technologies because different vibrations are detected due to different selection rules (Baiz et al. 2020). In this study, a comparison between FT-NIR spectroscopy and Raman spectroscopy was investigated for the identification of raw material defects in hazelnuts due to incorrect or too long storage. For this purpose, six batches of hazelnuts were stored under five different storage conditions, including different temperatures, humidity levels, and storage times. The analysis was carried out with an FT-NIR spectrometer and a Raman spectrometer using spatially offset Raman spectroscopy (SORS). In the SORS design, the laser and the detector are separated so that measurements can be made through the packaging material and acceptable batches are not rendered unsaleable by the analysis (Mosca et al. 2021a; Mosca et al. 2021b; P. Matousek et al. 2005). SORS has already been used in a study with margarine. Here, multivariate data analysis was used to determine origin, to identify ingredient composition such as the oil combination, and to analyze fat content. (Jiménez-Carvelo et al. 2022).

NIR spectra of samples with low water content still show clear water signals, which could be problematic as important information could be overlaid (Arndt et al. 2020a). A common method to overcome this problem is to freeze-dry the sample material. However, as this step is very time-consuming, the advantage of rapid analysis using FT-NIR spectroscopy is ruined. In a previous study, our group showed that the accuracy of almond origin determination after freeze-drying was comparable to that before freeze-drying (Lösel et al. 2022). However, it is not clear whether these results are transferable to the analysis of the storage process of hazelnuts, since storage-induced changes may have other relevant spectral ranges. Therefore, the samples were analyzed both freeze-dried and non-freeze-dried by FT-NIR spectroscopy to evaluate the influence of the water signal on the analytical results. A major advantage of SORS analysis is that the O–H bonds in water are not Raman-active, so freeze-drying is generally not necessary in this case.

In summary, this study investigated whether FT-NIR spectroscopy and SORS analysis can be useful for the detection of raw material defects in hazelnuts. In addition, a low-level data fusion was used to evaluate whether the analytical results become more accurate by combining the data from both spectroscopy approaches.

Materials and methods

Storage conditions

Six hazelnut batches were analyzed, which were provided by project partners from the confectionery industry. An overview of detailed sample information can be taken from the Supplementary Information (Table S1 and S2) and has already been published in previous studies using NMR spectroscopy and LC-MS (Loesel et al. 2023; Shakiba et al. 2023). Table 1 shows the storage conditions.

Table 1 Summary of applied storage conditions with information about abbreviation, temperature, humidity, and duration (ST: short term; LT: long term)

In addition, a hazelnut sample was acquired from a supermarket in Hamburg (Germany). This sample was used for quality control (QC) of the lyophilization process, as it required a lot of sample material.

Sample preparation

The QC sample was shock-frozen in liquid nitrogen and ground under dry ice cooling (1/2 wt/wt, hazelnut/dry ice) using a knife mill (Grindomix GM 300, Retsch, Haan, Germany). The hazelnut powder was aliquoted, and freeze-dried for different durations, each batch containing 6.0 ± 0.1 g. The following freeze-drying times were selected: 30 min, 1 h, 2 h, 3 h, 6 h, 9 h, 1 day, 2 days, 3 days, 4 days, 5 days, 6 days, and 7 days. Each sample was mixed halfway through each lyophilization duration by vigorously shaking the samples to ensure even drying.

For accelerated short-term storage, aliquots were taken after 2 days and 4 days, and subsequently every 2 weeks until week twelve and every 4 weeks thereafter. For realistic long-term storage, samples were taken every 3 months. Accelerated short-term storage was performed over a total period of 24 weeks and realistic long-term storage over 18 months (Table S2 in the Supplementary Information). The samples were ground analogously to the QC sample. The non-freeze-dried powder was analyzed by FT-NIR spectroscopy and SORS. Furthermore, 6.0 ± 0.1 g of each sample was freeze-dried for 24 h, since the analysis of the QC sample showed that the water content remains constant after that freeze-drying duration (see “Change of water content during freeze-drying from a quality control hazelnut sample” section). The freeze-dried powder was analyzed by FT-NIR spectroscopy to evaluate if this approach delivers better results compared to the non-freeze-dried samples.

Fourier transform near infrared spectroscopy

Samples were weighted (1.25 ± 0.01 g) in closed glass vials (52.0 mm × 22.0 mm × 1.2 mm, Nipro Diagnostics Germany GmbH, Ratingen, Germany) and tempered at 22 ± 2 °C. A Fourier transform near infrared (FT-NIR) spectrometer with an integration sphere in reflectance mode (TANGO, Bruker Optics, Bremen, Germany) was used for analysis. The OPUS software was used for data acquisition (Version 7.5; Bruker Optics, Bremen, Germany). Samples were measured in a wavenumber range of 11550–3950 cm-1 with a resolution of 2 cm-1 and 50 scans per spectrum. Five technical replicates were measured per sample by shaking the vials vigorously between measurements.

Pre-processing was performed using MATLAB R2021b (The MathWorks Inc., Natick, USA). At first, a multiplicative scattered light correction was applied to minimize scattering due to different particle sizes (Dhanoa et al. 1994; Geladi et al. 1985). Since FT-NIR spectroscopy generates highly correlated spectra, the number of variables was reduced by binning five adjacent wavenumbers, leaving 744 variables for statistical analysis (Engel et al. 2013). Furthermore, the five technical replicates per sample were averaged.

Spatially offset Raman spectroscopy

Measurements were performed using a Vaya Raman instrument (Agilent Technologies, Santa Clara, CA, USA). This device is equipped with a laser operating at a wavelength of 830 nm, and the analysis was performed with a spatial offset of 0.7 mm between laser and collection point. Measurements were carried out in a wavenumber range of 350–2000 cm-1 with a resolution of 1 cm-1. Closed glass vials (52.0 mm × 22.0 mm × 1.2 mm, Nipro Diagnostics Germany GmbH, Ratingen, Germany) were filled completely with ground non-freeze-dried sample material, and the samples were placed vertically in front of the laser. Three technical replicates were taken per sample by turning the vial approx. 60° between measurements. The spectra were automatically baseline corrected and normalized to maximum intensity by the spectrometer software, and the processed spectra were used for statistical analysis after binning of ten adjacent variables (leaving 165 variables) and averaging of the three technical replicates.

Karl-Fischer titration

Approximately 300 mg of the samples were suspended with 50 mL anhydrous methanol (CombiMethanol, Merck KgaA, Darmstadt, Germany). It was titrated automatically to the end point (888 Titrando, Deutsche Metrohm GmbH & Co. KG, Filderstadt, Germany) using Karl-Fischer reagent (CombiTitrant 5, Merck KgaA, Darmstadt, Germany). The consumption of 20 μL distilled water was measured in triplicate for determination of the titer.

Statistical analysis

MATLAB R2021b was used for statistical analysis. For differentiation of pre- and post-stored samples, a leave-one-sample-out cross-validation was performed using the linear discriminant (LDA) algorithm from the Classification Learner App. For accelerated short-term storage, all samples stored ≥ 12 weeks were in the post-stored group, and for realistic long-term storage, all samples stored ≥ 12 months. For this approach, the data from five of six batches were used for model training and the trained model was used to classify the sixth batch. This was repeated for each batch, resulting in six test and training sets. All three datasets [FT-NIR (non-freeze-dried), FT-NIR (freeze-dried), and spatially offset Raman spectroscopy (SORS)] were classified using this approach, and each storage condition was analyzed separately.

Univariate differences (“Interpretation of FT-NIR spectra” section in “Results and discussion”) between pre-stored and post-stored samples were determined using the analysis of variance (ANOVA): single-factor analysis tool in Excel 2019 (Microsoft, WA, USA), with a significant difference at a p-value of ≤ 0.01.

The R package Pomona (Version 1.0.1, https://github.com/silkeszy/Pomona) was used for variable selection with Boruta and the parameters: ntree = 10,000, min.node.size = 1, mtry = 142, importance = impurity_corrected, maxRuns = 100, and p value = 0.01 (Degenhardt et al. 2019).

A low-level data fusion was performed by combining the pre-processed FT-NIR spectroscopy data with the pre-processed SORS data in one data matrix. This was done separately for both FT-NIR datasets (non-freeze-dried and freeze-dried). The merged matrices were autoscaled to ensure comparability, and the classification was performed analogously to the analysis of the individual datasets.

The Cohen’s kappa value was used for evaluating the performance of the classification models since it provides a more accurate measure of the agreement between predicted and actual classes than traditional classification accuracies. This is especially the case when the group sizes are unbalanced, as it is the case here, with more post-stored (24 samples in accelerated short-term storage and 18 samples in realistic long-term storage) than pre-stored (6 samples) samples (McHugh 2012)

Results and discussion

Change of water content during freeze-drying from a quality control hazelnut sample

Samples with a low water content still have intense water signals in their FT-NIR spectra that could overlay important information, which is why freeze-drying prior to analysis is a typical method to address this issue. To evaluate the necessity of this time-consuming step, FT-NIR analysis was performed with the non-freeze-dried und with the freeze-dried samples. To follow the freeze-drying process, a QC sample was freeze-dried for different time periods and analyzed by FT-NIR spectroscopy and Karl-Fischer titration. Figure S1A shows the FT-NIR spectra. It can be observed that the water band at 5300–4950 cm-1 decreased rapidly during the first 9 h of freeze-drying until it stagnated after 24 h. The water content also affected the wavenumber range of 7200–6050 cm-1, but only during the first 2 h of the drying. This trend can also be observed in the results of Karl-Fischer titration (Figure S1B), as the water content decreased rapidly during the first 9 h of freeze-drying until it stagnated at 0.30 ± 0.04% after 24 h. In a previous study (origin determination), we concluded that the water signals did not affect the classification results (Lösel et al. 2022). However, this could be different here, since the water content may be relevant for identifying samples stored at different humidity levels, or signals important for storage detection could be masked by the intense water band. Whether this is the case here is discussed in the following sections.

Interpretation of FT-NIR spectra

The first step in investigating the suitability of FT-NIR spectroscopy for detecting raw material defects was to determine whether differences between pre- and post-stored samples could be directly identified visually in the spectrum. For this purpose, data from pre- and post-stored (ST1–ST3 24 weeks; LT1 and LT2 18 months) samples from each storage condition were averaged for both datasets (non-freeze-dried and freeze-dried) and displayed in Fig. 1.

Fig. 1
figure 1

Comparison of pre-processed FT-NIR spectra of the averaged pre-stored samples (black line) with the averaged post-stored samples (red line; ST1–ST3 24 weeks; LT1 and LT2 18 months) of non-freeze-dried (a) and freeze-dried samples (b)

Differences between pre- and post-stored samples were observed in the spectra of the non-freeze-dried samples (Fig. 1A), which can be seen in the water bands at 5300–4950 cm-1 and 7200–6050 cm-1 (Workman Jr and Weyer 2012). An increase in this band is observed at ST1 (40 °C; 75% rel. humidity) and a decrease at ST3 (40 °C; 25% rel. humidity). To analyze this influence more precisely, boxplots of the variable at 5167 cm-1 (maximum of the water band) were made (Fig. S2 in the Supplementary Information). In addition to the previously identified differences, it was observed that the water content also increased for LT1 (10 °C; 75% rel. humidity), while no differences were apparent for ST2 (25 °C; 65% rel. humidity) and LT2 (19 °C; 50% rel. humidity). It can therefore be concluded that the higher the humidity, the greater the increase in water content. In addition, it was investigated whether pre- and post-stored samples differ significantly with respect to the intensity of the variable 5167 cm-1. Significant differences were only present for ST1 (p-value 6.77 × 10-3) and ST3 (p-value 4.39 × 10-5). In order to evaluate the changes of the water content, the samples with the highest and lowest water band from pre- and post-stored samples were analyzed with Karl-Fischer titration (see Table S3 in the Supplementary Information). The results confirmed the observations from the FT-NIR spectra. The two pre-stored samples had a water content of 3.4% and 5.0%. During storage under ST1 conditions, the water content increased up to 6.2% and for LT1 to 5.4% while it decreased up to 2.3% for ST3. At ST2 and LT2, the water content changed only slightly. Except for the difference in water content, no obvious storage-related differences could be observed for the non-freeze-dried and freeze-dried samples (Fig. 1B). For this reason, in the following sections, the data were evaluated using multivariate analysis methods in order to detect further differences.

Interpretation of SORS spectra

To investigate the suitability of SORS for identifying raw material defects, we next tested whether differences between pre- and post-stored samples could be directly detected visually in the spectrum (Fig. 2), analogous to the procedure for FT-NIR data. Analysis with SORS was carried out only with the non-freeze-dried samples, because the O–H bond of water is not Raman active (Baiz et al. 2020).

Fig. 2
figure 2

Comparison of pre-processed SORS spectra of the averaged pre-stored samples (black line) with the averaged post-stored samples (red line, ST1–ST3 24 weeks; LT1 and LT2 18 months)

In accelerated short-term storage (ST1, ST2, and ST3), the signal between 1775 and 1805 cm-1, which is caused by C=O stretching vibration from ester bonds, decreased compared to pre-stored samples (Baeten et al. 1998). Furthermore, in ST1 (40 °C; 75% rel. humidity) and ST3 (40 °C; 25% rel. humidity), the signal at 665 cm-1 decreased, while it increased for LT1 (10 °C and 75% rel. humidity). In general, many signals < 1000 cm-1 increased at storage condition ST1, suggesting many metabolic/proteomic changes. Storage condition LT2 showed no obvious differences in the spectrum.

Supervised approaches for the detection of extended storage periods

In order to analyze whether pre- and post-stored samples can be distinguished to identify defects in the raw material using FT-NIR spectroscopy and SORS, classification models were built using an LDA algorithm. The results are summarized in Table 2. Table S4 in the Supplementary Information contains an overview of training results and samples that were misclassified during validation.

Table 2 Classification results for the differentiation of pre- and post-stored samples under the various storage conditions using the individual datasets of FT-NIR and SORS analysis

For the FT-NIR datasets, the most precise differentiation of pre- and post-stored samples was at condition ST1 (Cohen’s kappa values: 0.89 and 0.76), while more errors could be observed in ST3 (Cohen’s kappa values: 0.39 and 0.50). Since the condition ST3 is characterized by the same temperature (40 °C) but lower humidity (25%) compared to ST1 (75%), it can be concluded that the impact of increased humidity at high temperatures resulted in more storage-related changes. Samples stored under realistic long-term conditions (LT1: 10 °C; 75% rel. humidity, and LT2: 19 °C; 50% rel. humidity) could be differentiated with an accuracy comparable to ST3 (Cohen’s kappa values: 0.45 to 0.56). Under ST2 conditions (25 °C; 65% rel. humidity), the differentiation was most inaccurate with Cohen’s kappa values of 0.31 for the non-freeze-dried and freeze-dried samples. In general, the results for freeze-dried and non-freeze-dried samples are comparable, and it can be concluded that the impact of freeze-drying can be neglected for the identification of raw material defects.

The results of the SORS analysis show that most pre-stored samples were generally assigned to the post-stored class (Cohen’s kappa values: 0.00–0.50 for ST2, ST3, LT1, and LT2). One exception here was the analysis of condition ST1 since here only one pre-stored sample was assigned wrongly (Cohen’s kappa value: 0.89). From this, it can be concluded that only a few storage-induced changes in ST2, ST3, LT1, and LT2 were detected by SORS, while in ST1, the differentiation of pre- and post-stored samples was possible.

In our previous studies using NMR spectroscopy and LC-MS, the discrimination of pre- and post-stored samples during storage was error-free at high temperature (40 °C) and humidity (75%; ST1) and only one error occurred at high temperature (40 °C) and low humidity (25%; ST3). Furthermore, samples stored under moderate conditions (19 °C; 50% rel. humidity; LT2) could be identified more accurate compared to FT-NIR spectroscopy and SORS (three misclassifications with LC-MS and one with NMR spectroscopy). Under LT1 (10 °C; 75% rel. humidity) and ST2 (25 °C; 65% rel. humidity) conditions, no reliable differentiation was possible with either method. This indicates that only a few storage-related chemical changes occurred under these storage conditions (Loesel et al. 2023; Shakiba et al. 2023). Due to their higher resolution, sensitivity, and specificity, LC-MS and NMR spectroscopy provide more accurate results than FT-NIR spectroscopy and SORS. Nevertheless, their use for incoming goods inspections or in-process monitoring is limited by the relatively time-consuming sample preparation, high acquisition and operating costs, and the need for trained personnel. A two-step approach would therefore be recommended, starting with FT-NIR spectroscopy screening in the first stage. In a second stage, suspicious samples could be analyzed in more detail using LC-MS and/or NMR spectroscopy.

Variable selection

A variable selection was performed to identify important spectral regions for the differentiation of pre- and post-stored samples. The aim was to identify vibrations and thus substance classes that change as a result of incorrect or excessively long storage. For this, we applied the variable selection algorithm Boruta, which assesses variable importance by comparing features to randomized shadow variables (Kursa and Rudnicki 2010). Table 3 shows the number of variables, which were selected for each storage condition, and Table S5 of the Supplementary Information shows the selected variables, which are highlighted in the spectra in Fig. 3.

Table 3 Number of variables, which were selected by Boruta in each dataset
Fig. 3
figure 3

Overview of the selected variables for the different storage conditions using a pre-processed FT-NIR spectrum of a non-freeze-dried sample (a) and a pre-processed SORS spectrum (b). For the SORS analysis of ST2 no variables were selected

Most variables were selected at ST1 (88 in sum of all data sets), followed by ST3 (86 variables in sum of all datasets), LT2 (62 variables in sum of all datasets), LT1 (49 variables in sum of all datasets), and ST2 (2 variables in sum of all datasets). There is a correlation that samples stored under elevated temperature (ST1 and ST3) had the most storage-related changes, as indicated by the number of selected variables. Fewer variables were selected for samples that were stored under more moderate conditions for a longer period of time (LT1 and LT2). This means that the influence of the storage condition is greater than that of storage duration. At moderate storage conditions and short storage time (ST2; 25 °C; 65% rel. humidity), no differences due to storage could be detected either with FT-NIR spectroscopy or with a SORS instrument.

Fewer variables were generally selected when analyzing freeze-dried samples with FT-NIR spectroscopy than for non-freeze-dried samples (see Table 3). This is most evident for ST3, where about 90% fewer variables were selected, which can be explained by the fact that most of the variables selected for non-freeze-dried samples were in the range of the two water bands (5300–4950 cm-1 and 7200–6050 cm-1). In contrast to the analysis of the non-freeze-dried samples, variables in the range of the water band around 5100 cm-1 were selected for the freeze-dried samples after realistic long-term storage (LT1 and LT2). This suggests that the water band overlays important information that could be assigned to the second overtone of C=O vibrations of acids and esters (Workman Jr and Weyer 2012). Furthermore, for the freeze-dried samples, variables around the water band at 7000 cm-1 were selected for ST1 and LT1. Between 7400 cm-1 and 7000 cm-1, the variables could be assigned to C–H vibrations associated with aliphatic hydrocarbons while variables between 7000 cm-1 and 6000 cm-1 correspond to the first overtone of N–H and O–H vibrations in proteins/peptides and carbohydrates (Workman Jr and Weyer 2012). There are some variables selected in the non-freeze-dried dataset that were not selected after freeze-drying, although they were not associated with water in “Change of water content during freeze-drying from a quality control hazelnut sample” section, showing that the impact of water is complex. In particular, this concerns ST1 (variables between 8000 cm-1 and 9000 cm-1) and LT2 (variables above 9000 cm-1). In both cases, these are C–H vibrations (second overtone) and C=O vibrations (fourth overtone) of aliphatic hydrocarbon chains (Workman Jr and Weyer 2012). Overall, different variables were selected for the different storage conditions, suggesting that different metabolic processes took place. This is consistent with our previous analysis using NMR spectroscopy and mass spectrometry, where both methods were used to identify marker metabolites (Loesel et al. 2023; Shakiba et al. 2023).

Using SORS, 24 variables were selected for the analysis of the storage condition ST1, while only a few variables were selected for the other storage conditions (see Table 3). These results agree with the classification results in “Supervised approaches for the detection of extended storage periods” section, as a differentiation of pre- and post-stored samples was only possible for this storage condition. A closer examination of the selected variables shows that 19 of them are in the range below 1000 cm-1. This region of the spectrum is associated with proteins, among others. Disulfide bridges of cysteine units as well as the indole ring of tryptophan absorb in this area. Furthermore, C–H vibrations of fatty acids can be observed (Li-Chan et al. 2001). The five variables selected in the range above 1000 cm-1 can mainly be assigned to lipids, more precisely to C=C vibrations of aliphatic hydrocarbon chains (around 1600 cm-1), deformation vibrations from CH2 groups (around 1400 cm-1), and C=O vibrations of ester bonds (around 1895 cm-1). Furthermore, the variable at 1135.5 cm-1 was selected, which can be assigned to O–H vibrations of carbohydrates (Li-Chan et al. 2001). In general, it was observed that the comparably high signals in the SORS spectrum were not selected. Therefore, the question arose whether the variables were selected randomly, e.g., due to increased noise. To further evaluate the impact of them, the importance of each variable in the selection was determined based on its shadow value. Boruta’s selection mechanism is explained elsewhere (Kursa and Rudnicki 2010), and the results are summarized in Fig. S3. It was found that most of the selected variables had only a slightly higher importance than their shadow variable, which means that the difference between pre- and post-stored samples is comparatively small. Nevertheless, there are five variables (bins at 405.5 cm-1, 605.5 cm-1, 765.5 cm-1, 985.5 cm-1, and 1505.5 cm-1) that have a much higher importance than their shadow variable, which means that the difference between the groups is comparatively high. Furthermore, the boxplots (Figure S4) of the selected variables also show differences between the classes. Thus, it can be concluded that although the selected variables have low intensities, they still contain important information about storage-related differences.

Low-level data fusion of FT-NIR and SORS data

A low-level data fusion was performed to investigate whether the two approaches contain complementary information that improve the classification model. This fusion was conducted with both FT-NIR datasets (non-freeze-dried and freeze-dried) and classified in the same way as for the individual datasets. The results are summarized in Table 4 (Table S6 in the Supplementary Information shows an overview of training results and specific samples which were misclassified during validation).

Table 4 Classification results for the differentiation of pre- and post-stored samples under the different storage conditions using the merged datasets of FT-NIR and SORS analysis

The values for Cohen’s kappa of the data fusion of FT-NIR (non-freeze-dried) and SORS data are not higher than the respective values of the classification models of the individual datasets. They are either between these values (ST2, ST3, and LT2) or are even lower (ST1 and LT1). This was particularly surprising for ST1 as SORS could distinguish between pre- and post-stored samples, and the assumption was that an optimal classification could be obtained by fusing the data.

The Cohen’s kappa values for the classification models of FT-NIR (freeze-dried) and SORS data for samples stored under accelerated short-term storage conditions are also between (ST1, ST3) or below (ST2) the values of the individual datasets meaning that no classification improvement is achieved by the data fusion. In contrast, the classification models for realistic long-term storage improved significantly as a result of the fusion. For the storage condition LT1 (10 °C; 75% rel. humidity), all six pre-stored samples were identified correctly and only three post-stored samples were classified incorrectly. For LT2 (19 °C; 50% rel. humidity), only two pre-stored samples were classified incorrectly. For LT1 and LT2, variables superimposed by the water band (5300–4950 cm-1; see “Variable selection” section) were selected, indicating that this information complements that of the SORS. This is confirmed as no variables in the water band region were selected for the other storage conditions after freeze-drying. However, this improvement is only achieved after freeze-drying, which means that FT-NIR analysis for data fusion can only be performed afterwards. Since the long-term storage conditions are more realistic, these results show that a combined analysis with FT-NIR spectroscopy and SORS is very promising to detect raw material defects due to too long storage.

Conclusion

The aim of this study was to investigate the performance of FT-NIR spectroscopy and SORS for the detection of raw material defects in hazelnuts due to incorrect or excessive storage. For this purpose, six hazelnut samples were stored under five different conditions, with variations in temperature, humidity, and duration. FT-NIR analysis showed that the most significant difference between pre- and post-stored samples was due to changes in the water content. This difference varies greatly depending on the storage condition. Nevertheless, freeze-drying of the samples is not necessary for the analysis, as the distinction of pre- and post-stored samples is similar even without this process step. This indicates that the storage-induced changes in the metabolome and proteome of hazelnuts are more pronounced, which is also confirmed by the fact that the water band was selected by Boruta at only one storage condition (ST3; 40 °C; 25% rel. humidity). In general, the analysis showed that samples stored under harsh conditions, i.e., high temperature and humidity, could be identified with both approaches (FT-NIR spectroscopy and SORS). When these conditions are less extreme, FT-NIR spectroscopy is better suited to detect raw material defects. For this reason, FT-NIR spectroscopy could be suitable for identifying suspect samples during incoming inspections, which can then be analyzed in more detail using, for example, mass spectrometry or nuclear magnetic resonance spectroscopy. Low-level data fusion was performed to explore whether the information from the two spectroscopy approaches complements each other and thus improves the classification models. Such an improvement was obtained after freeze-drying for samples stored under realistic long-term conditions at 10 °C and 19 °C. Consequently, an additional analysis with SORS is recommended to substantiate first indications for too long storage.