# Detection of Smoking in Indoor Environment Using Machine Learning
## 3 Results
### Data Characteristics  
Looking at the characteristics of the training data, the values of CO\({}_{2}\) and TVOC show a symmetrical linearity. Additionally, the values of PM 2.5 and PM 10 are symmetrical in Figure 10. When smoking a cigarette, each sensing information is expressed as a graph, and we can see that four types of information are integrated. \begin{table}
\begin{tabular}{c c c c c} \hline  & **CO\({}_{2}\) (ppm)** & **TVOC (ppb)** & **PM 2.5 (\(\mu\)g/m\({}^{3}\))** & **PM 10 (\(\mu\)g/m\({}^{3}\))** \\ \hline COUNT & 3516.0000 & 3516.0000 & 3516.0000 & 3516.0000 \\ MEAN & 1185.9130 & 372.1780 & 419.9350 & 860.0320 \\ STD & 1560.0200 & 675.5250 & 696.8620 & 721.4680 \\ MAX & 9408.0000 & 4056.0000 & 4416.3100 & 4667.0200 \\ MIN & 400.0000 & 0.0000 & 4.4114 & 4.4304 \\ \hline \end{tabular}
\end{table} 
Table 4: Data change depending on the situation. Figure 8: Correlation results of graph in all situations. Figure 9: Correlation results of graph in smoking situations. * Smoking  
During smoking, CO\({}_{2}\), TVOC, PM 2.5 and PM 10 increase. Among them, TVOC increases rapidly as soon as smoking starts, and fine dust is affected by the inhalation and exhalation, which increases slightly later. CO\({}_{2}\) and TVOC decrease when inhaled and increase when exhaled. Figure 11: Data change depending on the situation in test data. Figure 10: Pre-processed training data. * Cooking  
Cooking data is grilled meat such as beef, pork, and chicken using a gas stove. CO2, TVOC, PM 2.5, PM 10 have risen overall. As soon as cooking was started, the amount of fine dust rose three times more than cigarettes. CO2 and TVOC from cooking utensils are continuously generated, showing an increasing trend. * Heating  
Heat was generated using an electric heater. As the temperature increased, CO2 and TVOC gradually increased. However, it occurred significantly less than cigarettes and cooking. There was little change in PM 2.5 and PM 10. Figure 12 shows the data for the five models as a 3D graph. Smoking data is indicated by blue dots and non-smoking by red dots. The degree of variance for each model is different according to the algorithm, and smoking predictions according to each sensor value are displayed in the coordinates. (c) MLP, (e) SVM RBF model shows that the recall value is relatively high, so the False Negative (undetected) is low. In addition, models other than (a) K-Means have high Precision values, showing low false positives. The model with the highest number on four performance metrics is the non-linear SVM RBF. Next, the three models of KNN, MLP and Linear SVM show similar values. In terms of accuracy, except for K-means, models are found to be a relatively high value of 83.9-93.1% in accuracy. The reason  
Figure 12: 3D Coordinate graph of (**a**) K-Means (**b**) PFCM (**c**) KNN (**d**) MLP (**e**) Linear SVM (**f**) SVM RBF model. is the result of using the binary classification technique in the experimental method. The analysis results are as follows Table 5.  
K-means showed the worst performance. The binary classification method we used is a method specific to supervised learning, so its performance is relatively low at unsupervised K-means. This result was obtained because it is ambiguous in determining the k value, and it is difficult to centroid scattered data. Since we value the perspective of users who are not affected by smoking in the evaluation method, it is necessary to consider the value of False Negative. For example, when people perceive that they have not smoked even though they smoked, the damage is great for non-smokers. So, we thought that the recall number was more important than other metrics. From the viewpoint of accuracy, it showed good accuracy with a value of more than 90% in the order of SVM RBF, KNN, and MLP. In the case of recall, the order of SVM RBF, MLP, KNN, PFCM and K-means also showed good performance, and in the worst case, the value of linear SVM was only 51%.