# Detection of Smoking in Indoor Environment Using Machine Learning
## Materials and Methods
### Feature Selection for Machine Learning
#### 2.2.2 Problem Definition and Application Method  
Figure 6 describes a machine learning that we can choose from weighing the characteristics of the data we have. The result of detection and prediction of smoking is considered as discontinuous data so the results are better expressed in cluster model than linear model. In Figure 6, the selection is made first according to the presence or absence of labeled data. as the labeled data set can provide training set with true values, which is so called supervised learning. If the data are non-labeled, it can belong to an unsupervised learning group represented by clustering. The next choice depends on whether there is a hierarchy. If there is a hierarchy, it branches into a hierarchical model. If there is no hierarchy, you can choose a model such as DBSCAN depending on the presence or absence of K. If K is present and categorical variables are present, it is possible to select K-modes, otherwise, depending on the preferential probability, the gaussian mixture model or K-means model can be selected. In the case of labeled data, it is classified into the regression group of unsupervised learning and the classification group of supervised learning according to whether it is predicting numeric or not. If it is not predicting numeric, it is divided according to the aspect of speed or accuracy. Models with  
Figure 6: The machine learning algorithms cheat sheet to find the appropriate algorithms. high accuracy include Kernel SVM/Non-linear SVM, NN, MLP, and Random Forest, and models with good speed include models such as linear SVM, K-Nearest Neighbors (KNN), and Decision trees. Models belonging to the Regression group, which is Predicting Numerics, can be divided into GRU, Linear Regression, and Decision Trees models with high speed and Neural Network, RNN, LSTM, Random Forest, and Gradient Boosting Trees models with high accuracy. The Possibilistic Fuzzy C-means (PFCM) algorithm that combines Fuzzy C-means (FCM) and Possibilistic C-means (PCM) as a weighted sum was used as a fuzzy algorithm for performance comparison. We selected a representative model from among those shown in this figure, and the regression model did not fit the experiment and was not used. Machine learning techniques that can be tried in consideration of features such as Sections 2.2.1 and 2.2.2 are mainly applied a classification model of a supervised learning method and a classification model of an unsupervised learning method in the experiment. Also, FCM and PCM have been typically used in many pattern recognition problems in the fuzzy clustering domain. However, these methods are highly sensitive to noise and overlapping cluster problems. To overcome these problems, PFCM showed the result of mitigating the problems of both methods by integrating FCM and PCM at the objective function level. Among supervised learning models, the regression method is suitable for continuous value not for classification. Since the target data of this study has classifying aspects, the regression method is foreclosed and we select representative algorithm from the other categories. The conducted supervised learning model is as follows; in the algorithms performed by Linear SVM, Non-linear SVM-Support Vector Machine Radial Basis Function (SVM RBF), KNN and MLP. The SVM is well-developed supervised learning model for pattern recognition and data analysis as one of the fields of machine learning, and is mainly used for classification and regression analysis. Linear SVM model is to find a straight line which separates classes(groups), adjusting the degree of misclassification in straight lines. There is a way to add polynomial properties to add and classify polynomial features using linear SVM. This method is simple and works mostly fine, but higher order features add a lot of polynomial features, which make the computation very complicated. As the order of the polynomial property increases, the computational amount increases. Therefore, it will take longer to find the optimal hyperplane and kernel tricks can be used.