Rapid detection of colorants in black tea using mid- and short-wave near infrared spectroscopy†
Abstract
This study investigated the feasibility of using mid- and short-wave near-infrared (MS-NIR) spectroscopy for the rapid detection of colorants in black tea. A portable spectrometer was employed to acquire MS-NIR spectra from black tea samples. Support vector machine (SVM) and random forest (RF) models were developed for the discriminative detection of three colorants: tartrazine, sunset yellow, and ponceau 4R. The spectral preprocessing was optimized, and the predictive performance of the models was evaluated using validation data. The results indicated that, owing to the low concentration of colorants in black tea, the MS-NIR-based model was unsuitable for quantitative detection but effective for determining whether colorants were present. Overall, the discriminative capability of the SVM model surpassed that of the RF model. Following spectral preprocessing, the optimal SVM model achieved accuracy, precision, recall, and F1-score values of (97.50%, 96.15%, 100.00%, 0.9804), (95.00%, 96.00%, 96.00%, 0.9600), and (97.50%, 96.15%, 100.00%, 0.9804) for tartrazine, sunset yellow, and ponceau 4R, respectively. These findings demonstrate the feasibility of using MS-NIR for the rapid and discriminative identification of colorants in black tea. In practical applications, discriminative detection can serve as an initial rapid screening tool, followed by more precise quantitative detection methods to determine colorant concentrations.