Prior to applying classifiers, the smoothed spectra underwent multivariate statistical analysis to reduce complexity and extract significant spectral features explaining the most variance. Discriminant analysis of principal components (DAPC) was used for this purpose . Principal component analysis (PCA) was initially applied to reduce the data complexity, and then, a supervised analysis process, discriminant analysis, was used to further discriminate the dataset by correlating data variation with the sample information.