Next Article in Journal
Changes in the Fruit Quality, Phenolic Compounds, and Antioxidant Potential of Red-Fleshed Kiwifruit during Postharvest Ripening
Previous Article in Journal
In-Depth Insight into the Mechanism of Incorporation of Abelmoschus manihot Gum on the Enhancement of Gel Properties and In Vitro Digestibility of Frankfurters
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Article

A Machine Learning Method for the Quality Detection of Base Liquor and Commercial Liquor Using Multidimensional Signals from an Electronic Nose

1
College of Information Science and Technology, Beijing University of Chemical Technology, Beijing 100029, China
2
School of Ocean Information Engineering, Jimei University, Xiamen 361021, China
3
Beijing Advanced Innovation Center for Soft Matter Science and Engineering, Beijing University of Chemical Technology, Beijing 100029, China
*
Author to whom correspondence should be addressed.
Foods 2023, 12(7), 1508; https://doi.org/10.3390/foods12071508
Submission received: 8 March 2023 / Revised: 28 March 2023 / Accepted: 28 March 2023 / Published: 3 April 2023
(This article belongs to the Section Food Analytical Methods)

Abstract

:
Chinese liquor is a world-famous beverage with a long history. Base liquor, a product of liquor brewing, significantly affects the flavor and quality of commercial liquor. In this study, a machine learning method consisting of a deep residual network (ResNet)18 backbone with a light gradient boosting machine (LightGBM) classifier (ResNet-GBM) is proposed for the quality identification of base liquor and commercial liquor using multidimensional signals from an electronic nose (E-Nose). Ablation experiments are conducted to analyze the contribution of the framework’s components. Five evaluation metrics (accuracy, sensitivity, precision, F1 score, and kappa score) are used to verify the performance of the proposed method, and six other frameworks (support vector machine (SVM), random forest (RF), k-nearest neighbor (KNN), extreme gradient boosting (XGBoost), multidimensional scaling-support vector machine (MDS-SVM), and back-propagation neural network (BPNN)) on three datasets (base liquor, commercial liquor, and mixed base and commercial liquor datasets). The experimental results demonstrate that the proposed ResNet-GBM model achieves the best performance for identifying base liquor and commercial liquors with different qualities. The proposed framework has the highest F1 score for the identification of commercial liquor in the mixed dataset due to the contribution of similar microconstituents from the base liquor. The proposed method can be used for the quality control of Chinese liquor and promotes the practical application of E-nose devices.

Graphical Abstract

1. Introduction

Chinese liquor is one of the most popular distillates worldwide and has a long history of over 6000 years [1]. According to the National Bureau of Statistics, approximately 7.2 billion liters of Chinese liquor was consumed in 2021, with sales of US$90 billion [2]. Chinese liquor is a traditional alcohol. It is generally produced from grains using traditional methods, including fermentation, distillation, storage, and blending [3]. The product obtained after distillation and storage without blending is called base liquor [4]. Almost all commercial Chinese liquors are blended using base liquors and specific blending techniques [5]. Although manufacturing processes differ, base liquors determine the quality of commercial liquors [6]. Due to the different base liquor qualities, there is a great variation of quality among different commercial liquors [7]. Therefore, evaluating base liquor quality is necessary for the quality control of commercial liquors.
The main components of Chinese liquors are alcohol and water, accounting for 98% of the total weight. Other components comprise less than 2% of the trace components but contribute to the complex aroma of the liquors, including esters, aldehydes, ketones, phenols, acids, nitrogen compounds, and sulfides [1]. The most common method for assessing the quality of base liquors is sensory evaluation and chemical/spectroscopic analysis [8]. However, the accuracy and objectivity of the results of the sensory evaluation method cannot be guaranteed because experts may be influenced by their health conditions, emotional states, or environmental factors [9]. Analysis methods, such as chromatography [10] and spectroscopy [11], are demanding and time-consuming. Base liquors that are inaccurately assessed are downgraded or destroyed, causing unnecessary waste. Therefore, it is necessary to develop an objective, convenient, rapid, and accurate method to detect the quality of base liquor.
An electronic nose (E-nose) is a device that simulates human olfactory perception using gas sensors. It consists of an array of gas sensors, a signal processing system, and a pattern recognition system [12]. Machine learning (ML) is a rapidly growing technology. It refers to algorithms that automatically learn information from data input [13]. Many researchers have distinguished Chinese commercial liquor using ML methods and E-nose data. Qi et al. [14] used an E-nose and support vector machine (SVM) classifier to distinguish six types of Chinese liquors with 90.8% accuracy. Jing et al. [15] employed an E-nose and a multilinear classifier to classify liquors with similar aromas and different prices, achieving an accuracy of 97.22%. Zhang et al. [16] proposed a channel attention convolutional neural network (CA-CNN) for the authenticity identification of Chinese liquor using an E-nose and obtained 98.53% prediction accuracy. Zhao et al. [17] presented a deep learning method with a stacked sparse autoencoder (SSAE) to classify seven brands of Chinese liquor utilizing E-nose data, achieving 96.67% prediction accuracy. Although the E-nose has shown good performance in distinguishing Chinese commercial liquors, few studies have focused on the classification of base liquors, which generally have similar microconstituents with very subtle differences, for different aging durations and aging environments. In addition, it is necessary to develop a method for the simultaneous identification of base and commercial liquors for practical applications.
In this study, we propose a novel ML framework for identifying base liquors and commercial liquors using multidimensional signals from an E-nose. The contributions of this paper can be summarized as follows.
  • A novel machine learning framework consisting of a deep residual network (ResNet)18 backbone and a light gradient boosting machine (LightGBM) classifier (ResNet-GBM) is proposed for the quality detection of base liquor and commercial liquor. The ResNet18 backbone is a powerful feature extractor and automatically extracts a sufficient number of comprehensive and significant features from the raw, multidimensional E-nose signals. The LightGBM is employed as the classifier to strengthen the identification ability of the liquor’s quality.
  • Ablation and comprehensive comparative experiments are conducted on three datasets to analyze the contribution of the models’ components and the performance of the ResNet-GBM framework using five evaluation metrics (accuracy, sensitivity, precision, F1 score, and kappa score). A base liquor dataset and a commercial liquor dataset are used in the comparative experiments to assess the applicability of the proposed ResNet-GBM framework. In addition, a mixed dataset containing base liquor and commercial liquor data is used to evaluate the proposed framework’s robustness, generalization ability, and performance for the identification of Chinese liquors in a complex application scenario.
  • The proposed method for the quality identification of base liquor and commercial liquor enables rapid detection and has high accuracy, providing a potential tool for quality control and promoting the practical application of E-nose devices.

2. Materials and Methods

2.1. Chinese Liquor Samples

All Chinese liquor samples (light flavor) were provided by the Shanxi Luxian Liquor Industry Co., Ltd. We tested nine types of Chinese liquor (six types of base liquors and three types of commercial liquors). The six types of base liquors with different aging durations were denoted as BL (year), where BL represents the base liquor, and (year) represents the aging duration. Thus, the six types of base liquors were BL (13), BL (11), BL (8), BL (6), BL (5), and BL (3). The details are listed in Table 1.
The three commercial liquors (CL) were blended using different proportions of the six base liquors. The details are listed in Table 2.

2.2. Instrument and Experiment

A PEN3 E-nose (Airsense Analytics GmbH, Schwerin, Germany) with a sensor array with ten metal oxide semiconductor (MOS) sensors (Table 3) was employed to collect the characteristic flavor information of the liquors.
All experiments were implemented in a clean and well-ventilated testing room of the authors’ laboratory at a temperature of 26 ± 2 °C and relative humidity of 50 ± 2%. The experiments lasted 25 days, and 9 different individual samples of each type were measured every day within the same procedure (total 25 days × 9 individual samples = 225 individual samples per type). These individual samples were from different production batches (the base liquor samples were from different liquor storages, and the commercial liquor samples were from different bottles) and were provided by the manufacturer directly. Each sample was measured once and updated if it was used, which ensured that no repeated measurements existed in the experiments. Therefore, the experiments contained 2025 independent measurements (9 types of liquor samples × 225 individual samples per type). Before the measurement, 3 mL of each sample was placed into a single hermetic vial (20 mL) and airproofed for 3 min to allow the liquor’s volatile compounds to disperse into the sampler.
The acquisition of the volatile compound profile was conducted in a well-ventilated location to minimize baseline fluctuations and interference from other volatile compounds. The zero gas (a baseline) was produced using two active charcoal filters (Filter 1 and Filter 2 in Figure 1) to ensure that the reference air and the air used for the samples had the same source.
The workflow of the E-nose includes the collection stage and flushing stage. Before collecting the data, an automatic zero-point trim was conducted for the E-nose by pumping clean air through filter 2 for 5 s. Then, the volatile compounds of the liquor sample were pumped into the sensor chamber with a flow rate of 600 mL/min to contact the sensor array for 100 s. During the collection stage, the gas molecules were adsorbed on the surface of the sensors, changing the sensors’ conductivity due to the redox reaction on the surface of the sensor’s active element. The sensors’ conductivity eventually stabilized at a constant value when the adsorption was saturated. The collection stage lasted 100 s, and sampling continued at one sample per second. In the flushing stage, clean air was pumped into the E-nose to flush the analytes. The collection and flushing stages were repeated to acquire the raw response data of the nine liquor samples. The workflow of the E-Nose followed the manufacturer’s instructions in the manual of the PEN3 E-nose [19].

2.3. Datasets

Three datasets (Dataset A, Dataset B, and Dataset C) were established using the multidimensional signals from the E-nose system. Dataset A was used to evaluate the performance of the proposed method for the classification of the six base liquors with different aging durations. Dataset B was utilized to test the effectiveness of the proposed method for the classification of commercial liquors with differing quality. Dataset C (mixed dataset) consisted of data from all liquor samples and was used to evaluate the ability of the proposed method to distinguish the base liquors and commercial liquors simultaneously.
Dataset A: This dataset comprised 1350 samples (25 days × 6 base liquors × 9 individual samples) of the six base liquors. The dataset for the SVM, random forest (RF), k-nearest neighbor (KNN), extreme gradient boosting (XGBoost), multidimensional scaling-support vector machine (MDS-SVM), and back-propagation neural network (BPNN) contained 27,000 samples (1350 samples × 20 measurements of the last 20 s) × 10 (number of sensors). The dataset for the ResNet-GBM framework contained 135,000 samples (1350 samples × 100 measurements during 100 s) × 10 sensors.
Dataset B: This dataset comprised 675 samples (25 days × 3 commercial liquors × 9 individual samples) of the three commercial liquors. The dataset for the SVM, RF, KNN, XGBoost, MDS-SVM, and BPNN contained 13,500 samples (675 samples × 20 measurements of the last 20 s) × 10 (number of sensors). The dataset for the ResNet-GBM framework contained 67,500 samples (675 samples × 100 measurements during 100 s) × 10 sensors.
Dataset C: This dataset comprised 2025 samples (25 days × 9 liquors × 9 individual samples) of the base liquors and commercial liquors. The dataset for the SVM, RF, KNN, XGBoost, MDS-SVM, and BPNN contained 40,500 samples (2025 samples × 20 measurements of the last 20 s) × 10 (number of sensors). The dataset for the ResNet-GBM framework contained 202,500 samples (2025 samples × 100 measurements during 100 s) × 10 sensors.

2.4. Principal Component Analysis

Principal component analysis (PCA) is a common multivariate statistical algorithm for dimensionality reduction (also known as feature extraction). It reduced the complexity of the data set while retaining most of the feature information [20]. The PCA accomplishes dimensionality reduction by transforming the original data into a new coordinate system according to the largest contribution of the variance from all variables; the coordinates are called the principal components [21]. Thus, a sample can be represented by a few principal components. A cumulative variance contribution of the first few principal components of 95% is considered reasonable [22].

2.5. Light Gradient Boosting Machine

The LightGBM is a learning framework based on the gradient boosting decision tree (GBDT) proposed by Microsoft Research in 2017 [23]. It has many improvements over the GBDT, such as gradient-based one-side sampling (GOSS) and exclusive feature bundling (EFB) to deal with data and features. It uses histogram-based algorithms to speed up the training process [24]. The LightGBM algorithm has the advantages of fast training speed, low memory overhead, no overfitting, and automatic feature processing. It also supports parallel processing and is suitable for large sample sizes and high-dimensional data [25].

2.6. ResNet

The ResNet is a commonly used convolutional neural network [26] consisting of a stack of residual blocks. It is not prone to gradient fading [27]. The residual block is shown in Figure 2, where x and y are the input and output of the block, respectively. W 1 and W 2 represent the weights of the first and second layers, respectively. The curvilinear arrows represent shortcut connections. F x represents the first layer’s output after linear transformation and activation. After the linear transformation by the W 2 weight layer, F x and the original input x are added to obtain H x , which is activated by a ReLU function to derive output y. Due to the residual blocks, ResNet can optimize the network layer, reducing redundancy [28].

2.7. Model Evaluation Metrics

Five evaluation metrics (accuracy, sensitivity, precision, F1 score, and kappa score) were used to assess model performance. Four parameters were used to calculate the metrics: True Positive (TP), False Positive (FP), True Negative (TN), and False Negative (FN).
Accuracy is defined as the proportion of correctly classified samples (TP samples and TN samples) to the total number of samples; it is calculated as follows:
A c c u r a c y = T P + T N T P + T N + F P + F N
Sensitivity represents the proportion of the TP samples to the total number of positive samples (TP samples and FN samples); it is defined as follows:
S e n s i t i v i t y = T P T P + F N
Precision (P) represents the proportion of the TP samples to the total number of positive predictions (TP samples and FP samples); the formula is as follows:
P r e c i s i o n = T P T P + F P
The F1 score is defined as the harmonic mean of the precision and sensitivity; it is calculated as follows:
F 1 = 2 * P r e c i s i o n * S e n s i t i v i t y P r e c i s i o n + S e n s i t i v i t y
The kappa score is an evaluation metric for multi-class classification models that measures the consistency between categories and the classification accuracy: it is calculated as follows:
p 0 = T P + T N T P + T N + F P + F N
p e = T P + F N T P + F P T N + F N T N + F P T P + T N + F P + F N 2
k a p p a = p 0 p e 1 p e
where p 0 represents the overall classification accuracy, and p e is the expected agreement.

3. Proposed Method

An ML framework called ResNet-GBM, consisting of a ResNet18 backbone and a LightGBM classifier, was proposed to process the multidimensional signals from the E-Nose. Figure 3 shows the flowchart of ResNet-GBM.
The raw data obtained from the 10 channels was a 100 (measurement time of 100 s) × 10 (number of MOS sensors) matrix. Due to the multi-channel input of the ResNet18 model, a 10-channel input was constructed by converting the raw E-nose data from the sensor array. The 100 raw response points of each sensor were converted into a 10 × 10 matrix, and the 10 matrices of the sensor array were converted into a 10 × 10 × 10 matrix used for the 10-channel input of the ResNet18 model.
As shown in Figure 4c, the ResNet18 backbone consists of six stages, including Conv 1, Layer 1, Layer 2, Layer 3, Layer 4, and Pool. Conv 1 consists of a convolutional layer, a batch normalization layer, a ReLU layer, and a pooling layer. The kernel size, stride size, and padding size of the convolutional layer are 7 × 7, 2, and 3, respectively. The kernel size, stride size, and padding size of the pooling layer are 3 × 3, 2, and 1, respectively. Layer 1 consists of two Basic Blocks 1. Layer 2, Layer 3, and Layer 4 consist of Basic Block 1 and Basic Block 2. The two Basic Blocks are presented in Figure 4a,b.
There are two convolutional layers in Basic Block 1, and the kernel size, stride size, and padding size of the two convolutional layers have the same value: 3 × 3, 1, and 1, respectively. Basic Block 2 has three convolutional layers, two of which are down-sampling layers. The kernel size, stride size, and padding size of the down-sampling convolutional layer 1 are 3 × 3, 2, and 1, respectively. The kernel size, stride size, and padding size of the down-sampling convolutional layer 2 are 1 × 1, 2, and 1, respectively. The kernel size, stride size, and padding size of the third convolutional layer are 3 × 3, 1, and 1, respectively. The details of the ResNet18 backbone are listed in Table 4.
The 512 features extracted by the ResNet18 backbone were input into the LightGBM model. In the LightGBM, a grid search method (GSM) was employed to derive the main parameters (num_leaves and learning_rate) and obtain the best performance of the classifier. After training the proposed model using the training set, the test set was used to evaluate the effectiveness of the trained model for the quality detection of base liquors and commercial liquors.

4. Results and Discussion

4.1. Principal Component Analysis

Since the measurement phase lasted 100 s, and the response value of each sensor was stable after 80 s, the last 20 response points were chosen as the input features for PCA. As shown in Figure 5, the x-axis, y-axis, and z-axis represent principal component 1 (PC1), principal component 2 (PC2), and principal component 3 (PC3), respectively. The percentages of the variance of PC1, PC2, and PC3 were 69.4%, 15.3%, and 11.5%, respectively. The cumulative variance of PC1, PC2, and PC3 was 96.2%, indicating that sufficient sample information was contained in the three principal components. However, the subplot indicated that the clusters were in close proximity, i.e., there was overlap. During dimensionality reduction, some principal components with a small contribution rate were overlooked, but these components may have contained critical information. Therefore, PCA is not an effective method for separating the classes in this study.

4.2. Experiments

Four sets of experiments were conducted: experiment I, experiment II, experiment III, and experiment IV. Experiment I was an ablation study to verify the contributions of the proposed ResNet-GBM’s components. Experiments II to IV were performed to compare the proposed ResNet-GBM framework with six other methods (including four common machine learning methods (SVM, RF, KNN, and XGBoost) and two methods proposed by other authors (MDS-SVM and BPNN)) on Dataset A, Dataset B, and Dataset C, respectively. MDS-SVM is a pattern recognition method based on multidimensional scaling and SVM. It was developed by Li et al. [29] to classify ten brands of Chinese liquors. BPNN is a multi-layered feedforward neural network that was used by Liu et al. [30] to distinguish different wines based on their properties. The models were implemented using NVIDIA GeForce MX250 graphics cards and the open-source PyTorch framework.

4.2.1. Experiment I: Ablation Study of ResNet-GBM

The comparative results of the ablation experiments on Datasets A, B, and C are displayed in Table 5. The proposed ResNet-GBM had the best performance for the classification of the Chinese liquor on the three datasets with accuracies of 0.9704, 0.9814, and 0.9803, respectively. The LightGBM provided an unsatisfactory performance and could not identify the liquors accurately. It is possible that it cannot mine a sufficient number of features. The ResNet18 exhibited better performance than the LightGBM, indicating that the automatic feature extraction capability significantly improved the classification performance. The proposed ResNet-GBM model combines the merits of ResNet18 and the LightGBM classifier, reducing the possibility of overfitting during training and improving the model’s classification performance.

4.2.2. Experiment II: Performance of the Proposed Framework on Dataset A

Dataset A was used in Experiment II. It contains 6 types of base liquor with different aging durations. Dataset A was divided into training sets (data from the first twenty days: 20 days × 6 liquor samples × 9 individual samples) and test sets (data from the last five days: 5 days × 6 liquor samples × 9 individual samples).
The radial basis function (RBF) was selected as the kernel function of the SVM model. The SVM model includes two important parameters: the penalty coefficient (C) and kernel function coefficient (gamma). A GSM with C ∈ [10, 50, 100, 200, 500] and gamma ∈ [0.1, 1.0, 5.0, 10.0, 20.0] was employed to determine the optimal parameters. The C was 100, and the gamma was 1. The number of decision trees and the number of randomly selected features obtained from each decision tree ( N F ) in the RF model were selected using the equation N F = M , where M represents the number of features. In our experiments, 10 decision trees ( N F = 10) were used. In the KNN model, the n_neighbors is a critical parameter; it was set to 3. The parameters of the XGBoost model were similar to those of the LightGBM model. The number of leaves (num_leaves) and the learning rate (learning_rate) are important parameters of the LightGBM model. The GSM was employed to search the parameters; the range of values for num_leaves was [8, 16, 32, 64, 128], and the learning_rate was [0.001, 0.01, 0.1, 0.5, 1]. The num_leaves was 16, and the learning_rate was 0.1.
The classification results derived from the seven models are displayed in Table 6. Five evaluation metrics were used to evaluate the classification models. As shown in Table 6, the proposed ResNet-GBM obtained the best performance for all evaluation metrics, with an accuracy of 0.9704, a sensitivity of 0.9704, a precision of 0.9716, an F1 score of 0.9710, and a kappa score of 0.9644. SVM, RF, KNN, XGBoost, MDS-SVM, and BPNN achieved accuracies of 0.3175, 0.4018, 0.4053, 0.4246, 0.7852, and 0.8963, respectively. The performances of these six models were unsatisfactory because they failed to extract a sufficient number of deep features. The experimental results demonstrated the effectiveness and superior performance of the proposed ResNet-GBM framework to identify different base liquors.

4.2.3. Experiment III: Performance of the Proposed Framework on Dataset B

Experiment III used commercial liquor samples to assess the generalization performance of the models. Dataset B was divided into training sets (data from the first twenty days: 20 days × 3 liquor samples × 9 individual samples) and test sets (data from the last five days: 5 days × 3 liquor samples × 9 individual samples).
The parameters of the models were the same as those in Experiment II. The results are listed in Table 7. The ResNet-GBM model exhibited the best results for the commercial liquors, with an accuracy of 0.9814, a sensitivity of 0.9814, a precision of 0.9825, an F1 score of 0.9815, and a kappa score of 0.9722. SVM, RF, KNN, XGBoost, MDS-SVM, and BPNN achieved accuracies of 0.3649, 0.6351, 0.5088, 0.6105, 0.8235, and 0.9118, respectively. The results showed that the proposed model could accurately detect different grades of commercial liquor. The classification performance of the model was better for the commercial liquor than for the base liquor.

4.2.4. Experiment IV: Performance of the Proposed Framework on Dataset C

Experiment IV evaluated the generalization performance of the ResNet-GBM model on Dataset C (a mixture of base liquors and commercial liquors). Dataset C was also divided into training sets (data from the first twenty days: 20 days × 9 liquor samples × 9 individual samples) and test sets (data from the last five days: 5 days × 9 liquor samples × 9 individual samples).
The classification results of the seven models are listed in Table 8. The ResNet-GBM framework obtained the best results with an accuracy of 0.9803, a sensitivity of 0.9803, a precision of 0.9819, an F1 score of 0.9801, and a kappa score of 0.9778 for the simultaneous classification of the base liquors and commercial liquors. SVM, RF, KNN, XGBoost, MDS-SVM, and BPNN achieved accuracies of 0.3389, 0.4468, 0.4304, 0.4901, 0.8148, and 0.9074, respectively. The comparison results indicate that the ResNet-GBM framework achieved better performances for extracting significant features from the multidimensional sensor signals and provided superior performance for the classification of base liquors, commercial liquors, and a mixture of both.
We further analyzed the results of each sample and selected the comprehensive evaluation metric F1 score to assess the performance of ResNet-GBM. The results are listed in Table 9. The proposed model achieved similar performances in Experiment II and Experiment IV for the classification of the base liquors (BL13, BL11, BL8, BL6, BL5, and BL3). The F1 scores of CL1 and CL2 in Experiment IV are 1.0000, higher than that in Experiment III. The comparison results showed that the classification performance of the proposed model for commercial liquor was higher when base liquors and commercial liquors were analyzed simultaneously. This result indicated that the model could mine deeper features based on the base liquor samples, which contributed to the high classification accuracy of the commercial liquors in Experiment IV.

5. Conclusions

We proposed a ResNet-GBM framework to identify base liquors and commercial liquors with different qualities using a MOS-based E-nose. The main conclusions are as follows:
PCA was used to distinguish nine liquor samples using the E-nose data. High coincidence points in the PCA result indicated that the odor information of different liquors was highly similar. The unsatisfactory PCA results indicated that this method could not distinguish liquors with different qualities, and meaningful feature information was lost during dimensionality reduction.
A ResNet-GBM framework consisting of the ResNet18 backbone and the LightGBM classifier was proposed for the quality detection of base liquors and commercial liquors. Ablation experiments were conducted to determine the contributions of the ResNet-GBM’s components for identification. The results indicated the effectiveness of the proposed framework. The significant features contained in the multidimensional signals were extracted by the ResNet18 backbone. The LightGBM classifier strengthened the identification ability of the ResNet model, and the proposed model achieved classification accuracies of 0.9704, 0.9814, and 0.9803 for Datasets A, B, and C, respectively.
The superiority of the proposed framework was demonstrated by comparing it with six other methods (SVM, RF, KNN, XGBoost, MDS-SVM, and BPNN) using the three datasets. The comparative experiments proved that the proposed framework had higher classification performance and better generalization ability than the other models using the multidimensional E-nose signals as input.
The F1 scores of the ResNet-GBM model for all samples were compared using the three datasets (base liquor dataset, commercial liquor dataset, and mixed dataset). The proposed ResNet-GBM model achieved better performance for the classification of commercial liquor using the mixed dataset (1.0000 for CL1, CL2, and CL3) than the commercial liquor dataset (0.9730 for CL1, 0.9714 for CL2, and 1.0000 for CL3). The results indicated that the excellent performance for distinguishing base liquors resulted in a higher classification accuracy of commercial liquors when base liquors and commercial liquors were analyzed simultaneously.
The results were encouraging and demonstrated that a deep learning framework could be used to identify base liquors and commercial liquors with different qualities using E-nose data. This approach provides a potential tool for the quality control of liquor and promotes the practical application of E-nose devices. This deep learning framework is expected to have broad application value for food quality control.

Author Contributions

Conceptualization, B.L. and Y.G.; methodology, B.L. and Y.G.; validation, B.L. and Y.G.; formal analysis, B.L.; writing—original draft preparation, B.L.; writing—review and editing, Y.G.; visualization, Y.G.; supervision, Y.G.; funding acquisition, Y.G. All authors have read and agreed to the published version of the manuscript.

Funding

This research was funded by the National Natural Science Foundation of China [Grant No. 62276174].

Institutional Review Board Statement

Not applicable.

Informed Consent Statement

Not applicable.

Data Availability Statement

The data presented in this study are available at Figshare (https://doi.org/10.6084/m9.figshare.22351597.v1 (accessed on 29 March 2023)).

Conflicts of Interest

The authors declare no conflict of interest.

Abbreviations

The following abbreviations are used in this manuscript:
ResNetResidual Network
LightGBMLight Gradient Boosting Machine
ResNet-GBMA Resnet18 backboned with a LightGBM classifier
E-noseElectronic nose
SVMSupport Vector Machine
RFRandom Forest
KNNK-nearest Neighbor
XGBOOSTExtreme Gradient Boosting
MDSMultidimensional Scaling
MDS-SVMAlgorithm based on MDS and SVM
BPNNBack-Propagation Neural Network
MLMachine Learning
CA-CNNChannel Attention Convolutional Neural Network
SSAEStacked Sparse Autoencoder
BLBase Liquor
CLCommercial Liquor
MOSMetal Oxide Semiconductor
PCAPrincipal Component Analysis
GBDTGradient Boosting Decision Tree
GOSSGradient-based One-side Sampling
EFBExclusive Feature Bundling
TPTrue Positive
FPFalse Positive
TNTrue Negative
FNFalse Negative
GSMGrid Search Method
PC1Principal Component 1
PC2Principal Component 2
PC3Principal Component 3
RBFRadial Basis Function

References

  1. Gu, Y.; Wang, Y.-F.; Li, Q.; Liu, Z.-W. A 3D CFD Simulation and Analysis of Flow-Induced Forces on Polymer Piezoelectric Sensors in a Chinese Liquors Identification E-Nose. Sensors 2016, 16, 1738. [Google Scholar] [CrossRef] [PubMed] [Green Version]
  2. National Bureau of Statistics. Available online: https: //data.stats.gov.cn/easyquery.htm?cn=A01&zb=A020909&sj=202112 (accessed on 5 January 2023).
  3. Tu, W.; Cao, X.; Cheng, J.; Li, L.; Zhang, T.; Wu, Q.; Xiang, P.; Shen, C.; Li, Q. Chinese Baijiu: The perfect works of microorganisms. Front. Microbiol. 2022, 13, 919044. [Google Scholar] [CrossRef] [PubMed]
  4. National Public Service Platform for Standards Information. Available online: http://c.gb688.cn/bzgk/gb/showGb?type=online&hcno=D2F1ED3F0BAA0EBE99AEE34293C0BC43 (accessed on 5 January 2023).
  5. Sun, Z.; Li, J.; Wu, J.; Zou, X.; Ho, C.-T.; Liang, L.; Yan, X.; Zhou, X. Rapid qualitative and quantitative analysis of strong aroma base liquor based on SPME-MS combined with chemometrics. Food Sci. Hum. Wellness 2021, 10, 362–369. [Google Scholar] [CrossRef]
  6. Sun, Z.; Xin, X.; Zou, X.; Wu, J.; Sun, Y.; Shi, J.; Tang, Q.; Shen, D.; Gui, X.; Lin, B. Rapid qualitative and quantitative analysis of base liquor using FTIR combined with chemometrics. Spectrosc. Spectr. Anal. 2017, 37, 2756–2762. [Google Scholar]
  7. Wang, L.; Zhong, K.; Luo, A.; Chen, J.; Shen, Y.; Wang, X.; He, Q.; Gao, H. Dynamic changes of volatile compounds and bacterial diversity during fourth to seventh rounds of Chinese soy sauce aroma liquor. Food Sci. Nutr. 2021, 9, 3500–3511. [Google Scholar] [CrossRef]
  8. Yu, D.; Wang, X.; Liu, H.; Gu, Y. A multitask learning framework for multi-property detection of wine. IEEE Access 2019, 7, 123151–123157. [Google Scholar] [CrossRef]
  9. Li, Z.; Wang, P.P.; Huang, C.C.; Shang, H.; Pan, S.Y.; Li, X.J. Application of Vis/NIR spectroscopy for Chinese liquor discrimination. Food Anal. Methods 2014, 7, 1337–1344. [Google Scholar] [CrossRef]
  10. Xu, M.L.; Yu, Y.; Ramaswamy, H.S.; Zhu, S.M. Characterization of Chinese liquor aroma components during aging process and liquor age discrimination using gas chromatography combined with multivariable statistics. Sci. Rep. 2017, 7, 39671. [Google Scholar] [CrossRef] [Green Version]
  11. Zhu, W.; Chen, G.; Zhu, Z.; Zhu, F.; Geng, Y.; He, X.; Tang, C. Year prediction of a mild aroma Chinese liquors based on fluorescence spectra and simulated annealing algorithm. Measurement 2017, 97, 156–164. [Google Scholar]
  12. Qiu, S.; Wang, J. The prediction of food additives in the fruit juice based on electronic nose with chemometrics. Food Chem. 2017, 230, 208–214. [Google Scholar] [CrossRef]
  13. Dymerski, T.M.; Chmiel, T.M.; Wardencki, W. Invited Review Article: An odor-sensing system—Powerful technique for foodstuff studies. Rev. Sci. Instrum. 2011, 82, 111101. [Google Scholar] [CrossRef] [PubMed]
  14. Qi, P.F.; Meng, Q.H.; Zhou, Y.; Jing, Y.Q.; Zeng, M. A portable E-nose system for classification of Chinese liquor. In Proceedings of the 2015 IEEE Sensors, Busan, Republic of Korea, 1–4 November 2015; IEEE: Piscataway, NJ, USA, 2015; pp. 1–4. [Google Scholar]
  15. Jing, Y.; Meng, Q.; Qi, P.; Zeng, M.; Li, W.; Ma, S. Electronic nose with a new feature reduction method and a multi-linear classifier for Chinese liquor classification. Rev. Sci. Instrum. 2014, 85, 055004. [Google Scholar] [CrossRef] [PubMed]
  16. Zhang, S.; Cheng, Y.; Luo, D.; He, J.; Wong, A.K.Y.; Hung, K. Channel attention convolutional neural network for Chinese baijiu detection with E-nose. IEEE Sens. J. 2021, 21, 16170–16182. [Google Scholar] [CrossRef]
  17. Zhao, W.; Meng, Q.-H.; Zeng, M.; Qi, P.-F. Stacked sparse auto-encoders (SSAE) based electronic nose for Chinese liquors classification. Sensors 2017, 17, 2855. [Google Scholar] [CrossRef] [PubMed] [Green Version]
  18. Liu, H.; Li, Q.; Li, Z.; Gu, Y. A Suppression Method of Concentration Background Noise by Transductive Transfer Learning for a Metal Oxide Semiconductor-Based Electronic Nose. Sensors 2020, 20, 1913. [Google Scholar] [CrossRef] [Green Version]
  19. AIRSENSE Analytics. Available online: https://airsense.com/en (accessed on 12 February 2023).
  20. Abdi, H.; Williams, L.J. Principal component analysis. Wiley Interdiscip. Rev. Comput. Stat. 2010, 2, 433–459. [Google Scholar] [CrossRef]
  21. Ringnér, M. What is principal component analysis. Nat. Biotechnol. 2008, 26, 303–304. [Google Scholar] [CrossRef]
  22. Shlens, J. A tutorial on principal component analysis. arXiv 2014, arXiv:1404.1100. [Google Scholar]
  23. Ke, G.; Meng, Q.; Finley, T.; Wang, T.; Chen, W.; Ma, W.; Ye, Q.; Liu, T.Y. Lightgbm: A highly efficient gradient boosting decision tree. Adv. Neural Inf. Process. Syst. 2017, 30, 3146–3154. [Google Scholar]
  24. Fan, J.; Ma, X.; Wu, L.; Zhang, F.; Yu, X.; Zeng, W. Light Gradient Boosting Machine: An efficient soft computing model for estimating daily reference evapotranspiration with local and external meteorological data. Agric. Water Manag. 2019, 225, 105758. [Google Scholar] [CrossRef]
  25. Chun, P.; Izumi, S.; Yamane, T. Automatic detection method of cracks from concrete surface imagery using two-step light gradient boosting machine. Comput. Aided Civ. Infrastruct. Eng. 2021, 36, 61–72. [Google Scholar] [CrossRef]
  26. Ou, X.; Yan, P.; Zhang, Y.; Tu, B.; Zhang, G.; Wu, J.; Li, W. Moving object detection method via ResNet-18 with encoder–decoder structure in complex scenes. IEEE Access 2019, 7, 108152–108160. [Google Scholar] [CrossRef]
  27. Li, B.; He, Y. An improved ResNet based on the adjustable shortcut connections. IEEE Access 2018, 6, 18967–18974. [Google Scholar] [CrossRef]
  28. Wang, A.; Wang, M.; Wu, H.; Jiang, K.; Iwahori, Y. A novel LiDAR data classification algorithm combined capsnet with resnet. Sensors 2020, 20, 1151. [Google Scholar] [CrossRef] [PubMed] [Green Version]
  29. Li, Q.; Gu, Y.; Jia, J. Classification of multiple Chinese liquors by means of a QCM-based e-nose and MDS-SVM classifier. Sensors 2017, 17, 272. [Google Scholar] [CrossRef] [PubMed] [Green Version]
  30. Liu, H.; Li, Q.; Yan, B.; Zhang, L.; Gu, Y. Bionic electronic nose based on MOS sensors array and machine learning algorithms used for wine properties detection. Sensors 2018, 19, 45. [Google Scholar] [CrossRef] [Green Version]
Figure 1. Schematic diagram of the PEN-3 workflow.
Figure 1. Schematic diagram of the PEN-3 workflow.
Foods 12 01508 g001
Figure 2. The residual block.
Figure 2. The residual block.
Foods 12 01508 g002
Figure 3. The classification framework for the quality detection of Chinese liquor.
Figure 3. The classification framework for the quality detection of Chinese liquor.
Foods 12 01508 g003
Figure 4. Schematic diagram of the ResNet18 backbone. (a) Basic Block 1; (b) Basic Block 2; (c) ResNet18 backbone.
Figure 4. Schematic diagram of the ResNet18 backbone. (a) Basic Block 1; (b) Basic Block 2; (c) ResNet18 backbone.
Foods 12 01508 g004
Figure 5. PCA score plot of the liquor samples with the first three principal components.
Figure 5. PCA score plot of the liquor samples with the first three principal components.
Foods 12 01508 g005
Table 1. Details of the base liquor.
Table 1. Details of the base liquor.
LabelAging DurationAlcohol Content
BL131365
BL111165
BL8865
BL6665
BL5565
BL3365
Table 2. Details of the commercial liquors.
Table 2. Details of the commercial liquors.
LabelProduction YearAlcohol ContentComponentsBlending Proportion (%)
CL1202242BL130.01
BL118.99
BL531
BL360
CL2202242BL130.008
BL85.992
BL524
BL370
CL3202242BL130.006
BL63.994
BL516
BL380
Table 3. Standard sensor array of the PEN3 E-nose [18].
Table 3. Standard sensor array of the PEN3 E-nose [18].
NumberSensorMain Performance
MOS1W1CAromatic constituent
MOS2W5SNitride oxides
MOS3W3CAmmonia and aromatic constituent
MOS4W6SHydrogen
MOS5W5CAlkanes and aromatic constituent
MOS6W1SMethane
MOS7W1WSulfide
MOS8W2SAlcohol
MOS9W2WAroma constituent and organic sulfur compounds
MOS10W3SAlkanes
Table 4. Details of the ResNet18 backbone.
Table 4. Details of the ResNet18 backbone.
StageOutputStructure Details
Conv1112 × 112 × 647 × 7, 64, s = 2, p = 3
56 × 56 × 643 × 3, max-pooling, s = 2, p = 1
Layer156 × 56 × 64 3 × 3.64 3 × 3.64 ×2
Layer228 × 28 × 128 3 × 3.128 3 × 3.128 ×2
Layer314 × 14 × 256 3 × 3.256 3 × 3.256 ×2
Layer47 × 7 × 512 3 × 3.512 3 × 3.512 ×2
Pool1 × 1 × 512Global average pooling
Table 5. Results of ablation experiment.
Table 5. Results of ablation experiment.
Test DatasetDataset ADataset BDataset C
LightGBMAccuracy0.40530.50880.4304
Sensitivity0.40530.50880.4304
Precision0.37320.52870.4141
F1 score0.37680.51500.4138
Kappa score0.28630.47890.3592
ResNet18Accuracy0.90370.91850.9074
Sensitivity0.90370.91850.9074
Precision0.92380.92740.9181
F1 score0.90640.91830.9084
Kappa score0.88440.90220.8889
ResNet-GBMAccuracy0.97040.98140.9803
Sensitivity0.97040.98140.9803
Precision0.97160.98250.9819
F1 score0.97100.98150.9801
Kappa score0.96440.97220.9778
Table 6. Classification results of seven models in Experiment II.
Table 6. Classification results of seven models in Experiment II.
ModelAccuracySensitivityPrecisionF1 ScoreKappa Score
SVM0.31750.31750.35310.30420.1811
RF0.40180.40180.36960.35900.2821
KNN0.40530.40530.37320.37680.2863
XGBoost0.42460.42460.44370.40960.3095
MDS-SVM [28]0.78520.78260.82060.77400.7419
BPNN [29]0.89630.89620.89950.89480.8755
ResNet-GBM0.97040.97040.97160.97100.9644
Table 7. Classification results of seven models in Experiment III.
Table 7. Classification results of seven models in Experiment III.
ModelAccuracySensitivityPrecisionF1 ScoreKappa Score
SVM0.36490.36490.36770.35010.2379
RF0.63510.63510.64530.63220.5237
KNN0.50880.50880.50990.50860.4912
XGBoost0.61050.61050.67670.61650.5064
MDS-SVM [28]0.82350.82020.87370.82060.7345
BPNN [29]0.91180.91300.91830.91150.8677
ResNet-GBM0.98140.98140.98250.98150.9722
Table 8. Classification results of seven models in Experiment IV.
Table 8. Classification results of seven models in Experiment IV.
ModelAccuracySensitivityPrecisionF1 ScoreKappa Score
SVM0.33890.33890.32990.32680.2563
RF0.44680.44680.47640.42900.3776
KNN0.43040.43040.41410.41390.3592
XGBoost0.49010.49010.53370.48490.4263
MDS-SVM [28]0.81480.81480.84200.81610.7917
BPNN [29]0.90740.90740.91700.90740.8958
ResNet-GBM0.98030.98030.98190.98010.9778
Table 9. Results of F1 scores for each sample obtained from ResNet-GBM in Experiments II, III, and IV.
Table 9. Results of F1 scores for each sample obtained from ResNet-GBM in Experiments II, III, and IV.
LabelExperiment IIExperiment IIIExperiment IV
BL130.9778n.e.0.9778
BL110.9524n.e.0.9545
BL80.9565n.e.0.9565
BL60.9787n.e.0.9778
BL50.9565n.e.0.9787
BL30.9645n.e.0.9767
CL1n.e.0.97301.0000
CL2n.e.0.97141.0000
CL3n.e.1.00001.0000
n.e.: not existent
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content.

Share and Cite

MDPI and ACS Style

Li, B.; Gu, Y. A Machine Learning Method for the Quality Detection of Base Liquor and Commercial Liquor Using Multidimensional Signals from an Electronic Nose. Foods 2023, 12, 1508. https://doi.org/10.3390/foods12071508

AMA Style

Li B, Gu Y. A Machine Learning Method for the Quality Detection of Base Liquor and Commercial Liquor Using Multidimensional Signals from an Electronic Nose. Foods. 2023; 12(7):1508. https://doi.org/10.3390/foods12071508

Chicago/Turabian Style

Li, Bingyang, and Yu Gu. 2023. "A Machine Learning Method for the Quality Detection of Base Liquor and Commercial Liquor Using Multidimensional Signals from an Electronic Nose" Foods 12, no. 7: 1508. https://doi.org/10.3390/foods12071508

Note that from the first issue of 2016, this journal uses article numbers instead of page numbers. See further details here.

Article Metrics

Back to TopTop