Machine learning feature selection method and system for gas sensor application
By selecting the peak value and response time characteristics of the gas sensor, the overfitting problem of the gas sensor model under small data volume is solved, improving the model performance and robustness, and making it suitable for portable or embedded gas detection systems.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-11-28
- Publication Date
- 2026-03-13
AI Technical Summary
Under conditions of small data volume, existing machine learning models for gas sensors are prone to overfitting, leading to a decline in classification or regression performance and high computational resource consumption.
A feature selection method is adopted, selecting the peak value in the vertical features and the response time between 60% and 80% of the peak value in the horizontal features as core features for gas identification, concentration prediction or health monitoring tasks. The model is trained by combining support vector machine, decision tree, random forest, neural network or K-nearest neighbor algorithm.
It significantly reduces the risk of overfitting, improves the performance and robustness of the model on small sample data, simplifies the feature extraction process, reduces computational complexity and resource consumption, and is suitable for portable or embedded gas detection systems.
Smart Images

Figure CN121658874A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of gas sensor technology, and more specifically to a machine learning feature selection method and system for gas sensor applications. Background Technology
[0002] Gas sensors are widely used in environmental monitoring, industrial production, and healthcare. Their basic principle is based on the interaction between gas and a sensitive material, which triggers changes in electrical or physical properties, generating a response signal that reflects the gas type or concentration. To improve the accuracy of gas detection, existing technologies typically extract multiple feature parameters from the sensor's response signal, such as peak value, response time, and full width at half maximum (FWHM). These features are then used to build machine learning models for tasks such as gas identification, concentration prediction, or health status assessment. However, in many practical applications, especially in health monitoring or long-term environmental monitoring, the amount of effective data that gas sensors can collect is often limited, making it difficult to obtain large-scale sample data. Under conditions of insufficient data, using traditional multi-feature extraction strategies can easily lead to overfitting in the constructed machine learning model, significantly reducing its classification or regression performance. Therefore, how to simplify the feature extraction process and select a small number of key features with significant discriminative power in scenarios with limited data has become a critical technical challenge that urgently needs to be addressed in the field of gas sensor data processing. Most existing solutions rely on extracting a large number of features or building complex models to improve performance. However, these methods not only fail to effectively avoid overfitting under small sample conditions but also consume significant computational resources. Therefore, developing a simplified feature selection strategy that can maintain good performance in small data environments is particularly necessary. Summary of the Invention
[0003] To overcome the shortcomings of existing technologies, one of the objectives of this invention is to provide a machine learning feature selection method for gas sensor applications, which can achieve efficient and stable feature extraction in gas detection, exhaled breath disease biomarker detection, health monitoring, and environmental analysis.
[0004] The second objective of this invention is to provide a machine learning feature selection system for gas sensor applications, which can achieve efficient and stable feature extraction in gas detection, exhaled breath disease biomarker detection, health monitoring, and environmental analysis.
[0005] To achieve one of the objectives of this invention, the following solution is adopted: A machine learning feature selection method for gas sensor applications includes the following steps: S1: Acquire response data from the gas sensor; S2: Preprocess the response data to obtain a denoised and smoothed response curve; S3: Based on the response curve, extract multiple candidate features, including horizontal features and vertical features; S4: Select core features from candidate features, the core features including the peak value in the vertical features and a response time between 60% and 80% of the peak value in the horizontal features; S5: Input the core features into the machine learning model to complete gas identification, concentration prediction or health monitoring tasks.
[0006] Furthermore, in step S2, the preprocessing includes denoising and smoothing to eliminate noise interference in the response data.
[0007] Further, in step S3, the lateral features include one or more of the following: half-peak width, peak width at different ratios, response time of peak values at different ratios, curve integral area, and signal duration; the longitudinal features include one or more of the following: peak value, mean, and median.
[0008] Furthermore, the response time for the different percentage peak values includes the response time required to reach peak values of 60%, 65%, 70%, 75%, 80%, etc.
[0009] Furthermore, in step S4, the selection of the core feature is based on effect size analysis, wherein the effect size of the peak value in the longitudinal feature is higher than that of other longitudinal features, and the effect size of the response time between 60% and 80% of the peak value is higher than that of other lateral features.
[0010] Furthermore, by limiting the core features to include only the peak value and a response time between 60% and 80% of the peak value, it is suitable for environments with small data volume and high noise, thereby improving the robustness and classification accuracy of the machine learning model; And / or, the core feature consists only of a response time between the peak value in the longitudinal feature and the peak value in the lateral feature, which is between 60% and 80%.
[0011] Furthermore, in step S4, the peak value in the longitudinal feature is used to characterize the maximum amplitude of the response signal, and the response time between 60% and 80% of the peak value is used to characterize the dynamic characteristics of the rising phase of the response signal.
[0012] Furthermore, in step S5, the machine learning model employs one or more of the following: support vector machine, decision tree, random forest, neural network, or K-nearest neighbor algorithm.
[0013] Furthermore, in step S5, the gas identification refers to classifying different gases, the concentration prediction refers to performing regression analysis on the gas concentration, and the health monitoring refers to judging the health status based on gas signals.
[0014] To achieve the second objective of this invention, the following solution is adopted: A machine learning feature selection system for gas sensor applications, comprising: The gas sensor module is used to collect the response data of the gas sensor. A preprocessing module, connected to the gas sensor module, is used to preprocess the response data to obtain a denoised and smoothed response curve; The feature extraction module, connected to the preprocessing module, is used to extract multiple candidate features based on the response curve, the candidate features including horizontal features and vertical features; A feature selection module, connected to the feature extraction module, is used to select core features from candidate features. The core features include the peak value in the vertical features and a response time between 60% and 80% of the peak value in the horizontal features. The machine learning module, connected to the feature selection module, is used to input the core features into the machine learning model to complete gas identification, concentration prediction, or health monitoring tasks.
[0015] Compared with existing technologies, the beneficial effects of this invention are as follows: 1. This invention significantly reduces the risk of overfitting and improves model performance under small sample data. By selecting a small number of key features, namely the peak value in the vertical features and a response time between 60% and 80% of the peak value in the horizontal features, the overfitting problem caused by too many features in traditional methods is effectively avoided. By carefully selecting these two most discriminative core features, this invention greatly reduces the feature dimension of the model input, thereby significantly improving the classification accuracy and regression stability of the machine learning model for gas identification, concentration prediction, and health monitoring tasks with small amounts of data. The classification accuracy (ACC) of the feature combination used in this invention can reach 0.905, and the area under the curve (AUC) can reach 0.982, which is far superior to traditional feature combinations. 2. This invention greatly improves data processing and system operation efficiency. Only two features need to be selected: the peak value in the vertical features and a response time between 60% and 80% of the peak value in the horizontal features, which greatly reduces the complexity of feature extraction and data processing. Since only these two core features need to be extracted and processed, this invention greatly simplifies the feature extraction process, reduces the complexity and computational load of data processing, and makes the entire system respond faster and consume fewer resources. Therefore, it is particularly suitable for the deployment and application of portable or embedded gas detection systems with stringent real-time requirements. 3. This invention effectively simplifies algorithm implementation and optimizes computational resources. Through optimized feature selection, the training and prediction processes of the machine learning model become simpler and more efficient. With a fixed number of two features, the subsequent training and prediction processes of the machine learning model are performed in a very low-dimensional space. This not only accelerates the model's training convergence speed but also makes the prediction and inference process simpler and more efficient, significantly reducing the overall computational cost and time overhead of the system, which is conducive to the promotion of this technology on resource-constrained hardware platforms. Attached Figure Description
[0016] Figure 1 This is a flowchart of a machine learning feature selection method for gas sensor applications in an embodiment of the present invention; Figure 2 This is a PCA diagram of Peak and T60 in an embodiment of the present invention; Figure 3 This is a cross-validation ROC curve of Peak and T60 in an embodiment of the present invention; Figure 4 This is a cross-validation confusion matrix diagram of Peak and T60 in an embodiment of the present invention; Figure 5 This is a PCA diagram of Mean and Width 50% in an embodiment of the present invention; Figure 6 This is a cross-validation ROC curve of Mean and Width at 50% in an embodiment of the present invention; Figure 7 This is a cross-validation confusion matrix diagram of Mean and Width with 50% cross-validation in an embodiment of the present invention; Figure 8 This is a comparison chart of the effect sizes of six key features in the embodiments of the present invention; Figure 9 This is a block diagram of a machine learning feature selection system for gas sensor applications in an embodiment of the present invention. Detailed Implementation
[0017] The present invention will now be further described in conjunction with the accompanying drawings and specific embodiments. It should be noted that, without conflict, the various embodiments or technical features described below can be arbitrarily combined to form new embodiments.
[0018] This invention can be applied to gas classification or regression tasks under conditions of small data volume. By selecting two features—peak time and time to 60%–80% peak time (T60–80)—this invention improves the performance and robustness of machine learning models in gas detection scenarios, making it particularly suitable for gas detection systems in fields such as health monitoring, disease diagnosis, and environmental monitoring.
[0019] Example 1 like Figure 1 As shown, this invention provides a machine learning feature selection method for gas sensor applications, comprising the following steps: S1: Collect response data from the gas sensor.
[0020] S2: Preprocess the response data to obtain a denoised and smoothed response curve.
[0021] S3: Based on the response curve, extract multiple candidate features, including horizontal features and vertical features.
[0022] S4: Select core features from candidate features, the core features including the peak value in the vertical features and a response time between 60% and 80% of the peak value in the horizontal features.
[0023] S5: Input the core features into the machine learning model to complete gas identification, concentration prediction or health monitoring tasks.
[0024] This invention significantly reduces the risk of overfitting and improves model performance on small sample data. By selecting a small number of key features—namely, the peak value in the vertical features and a response time between 60% and 80% of the peak value in the horizontal features—it effectively avoids the overfitting problem caused by too many features in traditional methods. By carefully selecting these two most discriminative core features, this invention greatly reduces the feature dimension of the model input, thereby significantly improving the classification accuracy and regression stability of machine learning models for gas identification, concentration prediction, and health monitoring tasks with small datasets. The feature combination used in this invention achieves a classification accuracy (ACC) of 0.905 and an area under the curve (AUC) of 0.982, far superior to traditional feature combinations. This invention significantly improves data processing and system operating efficiency. By selecting only the peak value in the vertical features and a response time between 60% and 80% of the peak value in the horizontal features, the complexity of feature extraction and data processing is greatly reduced. Since only two core features need to be extracted and processed, this invention greatly simplifies the feature extraction process, reduces the complexity and computational load of data processing, and makes the entire system respond faster and consume fewer resources. Therefore, it is particularly suitable for the deployment and application of portable or embedded gas detection systems with stringent real-time requirements. This invention effectively simplifies algorithm implementation and optimizes computational resources. Through optimized feature selection, the training and prediction processes of the machine learning model become simpler and more efficient. With a fixed number of two features, the subsequent training and prediction processes of the machine learning model are performed in a very low-dimensional space. This not only accelerates the model's training convergence speed but also makes the prediction and inference process simpler and more efficient, significantly reducing the overall computational cost and time overhead of the system, which is conducive to the promotion of this technology on resource-constrained hardware platforms.
[0025] Furthermore, in step S2, the preprocessing includes denoising and smoothing to eliminate noise interference in the response data.
[0026] Further, in step S3, the lateral features include one or more of the following: half-peak width, peak width at different ratios, response time of peak values at different ratios, curve integral area, and signal duration; the longitudinal features include one or more of the following: peak value, mean, and median.
[0027] Furthermore, the response time for the different percentage peak values includes the response time required to reach peak values of 60%, 65%, 70%, 75%, 80%, etc.
[0028] Furthermore, in step S4, the selection of the core feature is based on effect size analysis, wherein the effect size of the peak value in the longitudinal feature is higher than that of other longitudinal features, and the effect size of the response time between 60% and 80% of the peak value is higher than that of other lateral features.
[0029] Furthermore, by limiting the core features to include only the peak value and a response time between 60% and 80% of the peak value, it is suitable for environments with small data volume and high noise, thereby improving the robustness and classification accuracy of the machine learning model; And / or, the core feature consists only of a response time between the peak value in the longitudinal feature and the peak value in the lateral feature, which is between 60% and 80%.
[0030] Furthermore, in step S4, the peak value in the longitudinal feature is used to characterize the maximum amplitude of the response signal, and the response time between 60% and 80% of the peak value is used to characterize the dynamic characteristics of the rising phase of the response signal.
[0031] Furthermore, in step S5, the machine learning model employs one or more of the following: support vector machine, decision tree, random forest, neural network, or K-nearest neighbor algorithm.
[0032] Furthermore, in step S5, the gas identification refers to classifying different gases, the concentration prediction refers to performing regression analysis on the gas concentration, and the health monitoring refers to judging the health status based on gas signals.
[0033] Experimental Example 1 To verify the effectiveness of the machine learning feature selection method for gas sensor applications in this embodiment of the invention, this experimental example uses small sample gas sensor data to compare the impact of two different feature selection strategies on classification performance. All experiments use Support Vector Machine (SVM) as the classifier, and 5-Fold Cross-Validation (5-Fold CV) and Leave-One-Out Cross-Validation (LOOCV) are used for performance evaluation.
[0034] Experimental group: In this experiment, the core features proposed in this invention are employed: peak value and time to 60% peak (T60). Peak is used to characterize the maximum response amplitude of the signal, and T60 is used to describe the dynamic process of the response rise phase.
[0035] like Figure 2 As shown, PCA visualization reveals that the two types of samples hardly overlap in the two-dimensional principal component space, and the ellipses are clearly separated, indicating that this feature combination can effectively distinguish between different types of samples.
[0036] SVM classification experiments were conducted using Peak and T60. Five-fold cross-validation showed an average classification accuracy (ACC) of 0.90 and an average area under the curve (AUC) of 0.95; overall cross-validation showed an ACC of 0.905 and an AUC of 0.982. Figure 3As shown, out of a total of 21 samples, the model correctly classified 19 samples, including 10 positive samples and 9 negative samples, while only 2 negative samples were misclassified as positive. Figure 4 As shown, the leave-one-out cross-validation results are ACC 0.905 and AUC 0.982. Compared with traditional feature combinations, the features of this invention significantly improve classification performance and model robustness, and are particularly suitable for small sample sizes and high-noise environments.
[0037] Control group: The control group consisted of traditional feature examples, with the mean and half-peak width (50%) selected as features. Figure 5 As shown, the extracted features were visualized using principal component analysis (PCA). The results showed that the two types of samples highly overlapped in the two-dimensional principal component space, and the ellipses of the two categories almost completely overlapped, indicating that the feature combination could not effectively distinguish between different categories of samples.
[0038] like Figure 6 As shown, SVM classification experiments were conducted based on this feature combination. Five-fold cross-validation results showed an average classification accuracy (ACC) of 0.72 and an average area under the curve (AUC) of 0.767; the overall cross-validation ACC was 0.714 and the AUC was 0.736. Figure 7 As shown, out of a total of 21 samples, the model correctly classified 15 samples, including 7 positive samples and 8 negative samples. However, 3 positive samples and 3 negative samples were misclassified. The leave-one-out cross-validation (LOOCV) results were ACC 0.714 and AUC 0.709. This demonstrates that when using traditional feature combinations, the model exhibits poor classification performance and stability under small sample conditions.
[0039] Characteristic analysis of experimental and control groups like Figure 8 As shown, the differences in gaseous signals between the healthy and patient groups were assessed by calculating the effect sizes (Cohen's d) of six key features. In terms of longitudinal features, Peak showed the most significant difference, with a Cohen's d as high as 3.9, significantly higher than Mean (1.16), indicating that the maximum amplitude of the signal is highly representative in distinguishing healthy states. In terms of lateral features, the effect sizes of Time to 60% Peak (T60) and Time to 65% Peak (T65) were -0.84 and -0.77, respectively, showing significant differences in the dynamics of the signal rise phase. In contrast, the effect sizes of Half-Peak Width (W50) and Duration were relatively small, at 0.05 and 0.46, respectively, indicating limited discriminative power of these features in this dataset.
[0040] Overall, the vertical feature Peak and the horizontal feature T65 show the greatest effect, indicating that these two types of features provide the most stable and significant distinguishing information under conditions of small data volume. This is consistent with the feature selection strategy proposed in this invention, which selects only Peak and the response time of 60%–80% of the peak value (T60–80) as core features, which can maintain the efficiency and robustness of classification performance while reducing redundancy.
[0041] like Figure 8 As shown, Peak exhibits a significantly higher difference in performance between the healthy and patient groups than Mean, and the effects of T60 / T65 are also significantly better than W50 and Duration, thus verifying the rationality of the feature selection method of this invention on actual gas sensor data. The accompanying figure also provides a visual basis for feature priority, offering a clear reference for the feature input of subsequent machine learning models.
[0042] Example 2 like Figure 9 As shown, this embodiment of the invention also provides a machine learning feature selection system for gas sensor applications, comprising: The gas sensor module is used to collect the response data of the gas sensor. A preprocessing module, connected to the gas sensor module, is used to preprocess the response data to obtain a denoised and smoothed response curve; The feature extraction module, connected to the preprocessing module, is used to extract multiple candidate features based on the response curve, the candidate features including horizontal features and vertical features; A feature selection module, connected to the feature extraction module, is used to select core features from candidate features. The core features include the peak value in the vertical features and a response time between 60% and 80% of the peak value in the horizontal features. The machine learning module, connected to the feature selection module, is used to input the core features into the machine learning model to complete gas identification, concentration prediction, or health monitoring tasks.
[0043] The above is a detailed description of the preferred embodiments of the present invention. However, the present invention is not limited to the embodiments described. Those skilled in the art can make various equivalent modifications or substitutions without departing from the spirit of the present invention. All such equivalent modifications or substitutions are included within the scope defined by the claims of this application.
Claims
1. A machine learning feature selection method for gas sensor applications, characterized in that, Includes the following steps: S1: Acquire response data from the gas sensor; S2: Preprocess the response data to obtain a denoised and smoothed response curve; S3: Based on the response curve, extract multiple candidate features, including horizontal features and vertical features; S4: Select core features from candidate features, the core features including the peak value in the vertical features and a response time between 60% and 80% of the peak value in the horizontal features; S5: Input the core features into the machine learning model to complete gas identification, concentration prediction or health monitoring tasks.
2. The machine learning feature selection method for gas sensor applications according to claim 1, characterized in that, In step S2, the preprocessing includes denoising and smoothing to eliminate noise interference in the response data.
3. The machine learning feature selection method for gas sensor applications according to claim 1, characterized in that, In step S3, the lateral features include one or more of the following: half-width at half-maximum, peak width at different ratios, response time of peak values at different ratios, area under integral of curve, and signal duration; the longitudinal features include one or more of the following: peak value, mean, and median.
4. The machine learning feature selection method for gas sensor applications according to claim 3, characterized in that, The response times for the different peak percentages include the response times required to reach 60%, 65%, 70%, 75%, and 80% of the peak value.
5. The machine learning feature selection method for gas sensor applications according to claim 3, characterized in that, In step S4, the selection of the core features is based on effect size analysis, wherein the effect size of the peak value in the longitudinal features is higher than that of other longitudinal features, and the effect size of the response time between 60% and 80% of the peak value is higher than that of other lateral features.
6. The machine learning feature selection method for gas sensor applications according to claim 1, characterized in that, In step S4, the peak value in the longitudinal feature is used to characterize the maximum amplitude of the response signal, and the response time between 60% and 80% of the peak value is used to characterize the dynamic characteristics of the rising phase of the response signal.
7. The machine learning feature selection method for gas sensor applications according to claim 1, characterized in that, By limiting the core features to include only the peak value and a response time between 60% and 80% of the peak value, it is suitable for environments with small data volume and high noise, thereby improving the robustness and classification accuracy of machine learning models. And / or, the core feature consists only of a response time between the peak value in the longitudinal feature and the peak value in the lateral feature, which is between 60% and 80%.
8. The machine learning feature selection method for gas sensor applications according to claim 1, characterized in that, In step S5, the machine learning model employs one or more of the following: support vector machine, decision tree, random forest, neural network, or K-nearest neighbor algorithm.
9. The machine learning feature selection method for gas sensor applications according to claim 1, characterized in that, In step S5, gas identification refers to classifying different gases, concentration prediction refers to performing regression analysis on gas concentrations, and health monitoring refers to judging health status based on gas signals.
10. A machine learning feature selection system for gas sensor applications, characterized in that, include: The gas sensor module is used to collect the response data of the gas sensor. A preprocessing module, connected to the gas sensor module, is used to preprocess the response data to obtain a denoised and smoothed response curve; The feature extraction module, connected to the preprocessing module, is used to extract multiple candidate features based on the response curve, the candidate features including horizontal features and vertical features; A feature selection module, connected to the feature extraction module, is used to select core features from candidate features. The core features include the peak value in the vertical features and a response time between 60% and 80% of the peak value in the horizontal features. The machine learning module, connected to the feature selection module, is used to input the core features into the machine learning model to complete gas identification, concentration prediction, or health monitoring tasks.