## 3 Results  
### Overview  
Our study focused on the analysis of hyperspectral imaging data of Thai holy basil (_O. tenuiforum_ L.) and its antioxidant properties, specifically the flavonoid content. Hyperspectral imaging provides a wealth of spectral information, allowing for detailed analysis of plant biochemical composition. We obtained reflectance data from the samples, which served as our spectral dataset. To enhance the quality and interpretability of this data, we applied several preprocessing techniques. The primary goal of our research was to investigate the relationship between the processed spectral data and the flavonoid content of the Thai holy basil samples. To achieve this, we employed advanced deep learning models, which have shown great promise in extracting meaningful patterns from complex spectral data. This approach allows us to potentially develop a non-destructive method for estimating flavonoid content in Thai holy basil, which could have significant implications for quality control and optimization in herbal medicine and the food industry. The overview of our analysis is shown in Figure 2.  
The framework, illustrated in Figure 2, begins with data acquisition during the growth of the plants, where we collect flavonoid content and capture hyperspectral imaging (both for VNIR and SWIR; more details are provided in Section 2). The level of flavonoid content for each sample is categorized into two classes: low and normal-to-high levels. The spectral data is then processed and transformed to better capture its features. Finally, deep learning techniques, including ResNet1D and CNN1D, are applied to classify and identify the flavonoid levels for each sample. We collected a total of 237 hyperspectral data samples of Thai holy basil. After preprocessing with the Multiplicative Scatter Correction (MSC) algorithm and removing outliers (see Section 2), we refined the dataset to 229 samples. Based on a predetermined cutoff threshold, we categorized the samples into two groups: 58 samples in the low group and 171 in the normal-to-high group. These processed data were subsequently used for classification analysis. Efficacy of Flavonoid Content Level Classification Using ResNet1D and Feature Transformation Techniques  
Our study focused on classifying flavonoid content levels in hyperspectral data using advanced machine learning techniques. We employed a ResNet1D architecture as our primary classification model. To enhance the model's ability to extract meaningful features from the complex hyperspectral data, we performed an experiment incorporating two well-known feature transformation techniques: wavelet transformation and Gabor-like filtering. These transformations were integrated into our preprocessing pipeline to generate discriminative features that enhanced the model's classification performance. Our experimental design involved a rigorous ten-time five-fold cross-validation approach. This method ensures robust evaluation by dividing the dataset into five parts, using four for training and one for testing, and repeating this process ten times with different random splits. This approach helps to mitigate bias and provides a more reliable estimate of the model's performance. During the training phase in each fold, we balanced the two classes by randomly downsampling the majority class to match the number of samples in the  
Figure 2: Overview of the analysis framework. minority class. This balancing step was employed to prevent bias in the model's learning process. By ensuring equal representation of both classes in the training data, we aimed to develop a model that could accurately classify both 'normal-to-high' and 'low' flavonoid content levels without favouring one class over the other. Using wavelet transformation and Gabor-like filtering to generate features, we obtained promising results, with an AUC of 0.8136 \(\pm\) 0.0159 (mean \(\pm\) standard deviation) and an ACC of 0.7461 \(\pm\) 0.0326 (mean \(\pm\) standard deviation).