## 3 Results and Discussion
### Electronic Nose Detection
#### 3.1.3 Dimensionality Reduction of Data Based on PCA Algorithm  
The choice of algorithms for different temperature conditions was guided by the nature of the data distribution at each temperature. Principal Component Analysis (PCA) and Linear Discriminant Analysis (LDA) were both employed to reduce dimensionality, but their performance varied depending on the dataset characteristics at different temperatures. At lower temperatures, the differences in the volatile compound profiles were subtler, requiring an approach like LDA, which maximizes the separation between classes. LDA was preferred in these cases because it is a supervised method that uses class labels to improve discrimination, making it more suitable for datasets where class separability is crucial. This enhanced the classification accuracy for samples stored at lower temperatures. Conversely, at higher temperatures, the variations in volatile compounds were more pronounced, leading to a dataset with clearer separation between classes. PCA, being an unsupervised method that focuses on capturing the variance in the data without relying on class labels, was sufficient for dimensionality reduction in these conditions. The use of PCA was favored here to preserve the overall data structure while reducing complexity, making it more efficient for datasets with naturally higher separability. The experimental data, collected at four different temperatures, are presented in Table 2. Given that oysters spoil more rapidly at elevated temperatures, and with all other factors held constant, the number of gas data samples collected from oysters at higher temperatures is correspondingly diminished. Through data collection, a substantial amount of experimental raw data undergoes initial preprocessing. Subsequently, the PCA algorithm is utilized to reduce the ten-dimensional data collected by sensors S1 to S10 to two dimensions. Figure 4 presents a scatter plot of the first and second principal components following the PCA transforma \begin{table}
\begin{tabular}{c c c c} \hline \hline
**Temperature Setting** & **Collection Duration** & **Effective Number of Detection Cycles** & **Quantity of Data Set** \\ \hline
4 °C & 216 h & 185 & 925 EA \\
12 °C & 168 h & 137 & 685 EA \\
20 °C & 72 h & 60 & 300 EA \\
28 °C & 48 h & 53 & 265 EA \\ \hline \hline \end{tabular}
\end{table} 
Table 2: Oyster sample collection quantity. tion. The \(x\)-axis, PC1, corresponds to the first column of the reduced-dimensional data, while the \(y\)-axis, PC2, represents the second column. Each point in the plot corresponds to a sample feature, with points of the same color indicating features collected on the same storage time. At 4 \({}^{\circ}\)C, the scatter plot generated by PCA indicates that the within-class distances increase each day, while the between-class distances decrease. This trend suggests that the classification criteria among the different categories are not significant, implying that the daily variation of volatile gases in oysters is relatively slow. At 12 \({}^{\circ}\)C, the within-class distance on the first day of the experiment is small; however, there is a sudden increase in within-class distances on the first and second days, reflecting a greater amplitude of variation in the volatile gases of the oyster samples. In contrast, the within-class distances in the scatter plots for the final three days decrease, indicating that the various characteristics of the oysters tend to stabilize after spoilage. Compared to the scatter plot at 4 \({}^{\circ}\)C, the amplitude of volatile gas changes in oyster samples at 12 \({}^{\circ}\)C is greater. At 20 \({}^{\circ}\)C, the within-class distance on the zero day is the largest, and as time progresses, the between-class distances of the scatter plots gradually decrease, reaching their smallest values in the last two days. Figure 4: Visualization of PCA algorithm for feature extraction of oyster samples.