# A Study on the Effect of Drift Factor on Feature Optimization in Electronic Nose Detection
## 2 Materials and Methods
### Machine Learning Mathematical Models  
We chose JMP (Software model JMP PRO 16.1.0) as the software platform for data processing. We chose random forest (RF) as the classification model and sensor evaluation score. Random forest [19] is a popular integrated machine learning technique with a random sampling strategy that enhances model stability and prevents errors associated with unbalanced sample datasets. The embedded approach used in this type of machine learning mathematical model can classify the features while selecting them during the training process, and we need to evaluate the importance score of the sensors in this thesis, so this is another important reason why we chose random forest as the classification model. In addition, the classification model of random forest can show the role of different features more intuitively, which is difficult to do with other algorithmic models. The random forest parameters we selected for this experiment are as follows: the number of forest trees is 100, 200, or 500, the splitting criteria are gini and entropy, and the tree's maximum depth is 14; the minimum number of samples necessary for node splitting is 5, and the random sampling method used is the bootstrap sampling method. All of the above settings were checked through repeated debugging, and the training/validation set ratio was adjusted to 4:1.  
A neural network, as a classical model of electronic nose compensation attempt, is mainly an algorithmic model deduced by referring to neurons in living organisms. It can be combined with the rest of the algorithms for compensation attempts [20] in this experiment in order to most directly compare the advantages of the secondary feature optimization, so the more intuitive artificial neural network model is used. It is mainly divided into three parts, input layer, hidden layer, and output layer, and the hidden layer of this experiment is set as two layers, the first layer has 3 neurons, and the second layer has 20 neurons. The neural network [21] is capable of converging and predicting the drift data of the electronic nose through nonlinear and complex relationships in order to realize the compensation of the detection performance of the electronic nose.  
\begin{table}
\begin{tabular}{c c} \hline
**Sensor Types** & **Sensitive Chemicals** \\ \hline W1C & Sensitivity to aromatic compounds, especially benzenes \\ W5S & High sensitivity, very sensitive to nitrogen oxides \\ W3C & Sensitive to aromatic compounds such as ammonia and benzene \\ W6S & Selective mainly for hydrides \\ W5C & Sensitive to short-chain alkanes, aromatic components \\ W1S & Sensitive to methyl groups \\ W1W & Sensitive to inorganic sulfides \\ W2S & Sensitive to alcohols, aldehydes, and ketones \\ W2W & Sensitive to aromatic components, organic sulfides \\ W3S & Sensitive to long-chain alkanes \\ \hline \end{tabular}
\end{table}
Table 1: Sensitive chemical substances corresponding to electronic nose sensors.  
In this experiment, in order to compensate the electronic nose, we put the data collected under different temperature and humidity gradient conditions into a random forest for classification and feature optimization and used the data with higher classification correctness to train the neural network compensation model in order to expect to improve the effect of compensation. The data with poor classification performance are put into the compensation model for convergence and prediction to obtain the compensated data for secondary feature optimization and result comparison. The specific compensation process is shown in Figure 2.