## 4 Results and Discussion  
### Supervised Machine Learning Analysis for Pattern Recognition  
There are various supervised machine learning used in classification techniques, which can be sorted into a few categories: logic-based, perceptron-based, instance-based, statistical learning-based and vector-based [54]. The classifiers for each category are shown in Table 8. For this study, three algorithms which have been used in many applications, especially involving odour or smell classification, have been chosen: MLP (perceptron-based), KNN (instance-based), and LDA (statistical learning-based) [55; 56; 57]. All of these classifiers have been run using MATLAB's 2015 functions library that supports supervised machine learning. At the end of the program, the MATLAB R2015b (version 8.6, The MathWorks Company, Natick, MA, USA, 2015) produced an output file which then embedded to the system. The example of one of the algorithms, such as the MLP model, along with its classification performance of six features is discussed in this section. For each of the features, a separate MLP model was formulated. Separate models need to be formulated as the aim of the research is to find the optimal classification accuracy for each feature. In order to identify the source affecting the IAQ, this study used the MLP, which consists of three layers: the input layer, hidden layer and output layer. As network architecture, a 3-layer perceptron model as shown in Figure 7 was used. The first input layer contains the input variables for the network, which is the data after the pre-processing technique. For the data set before PCA, the input layer contains nine neurons of IAQ parameters, which are CO\({}_{2}\), CO, O\({}_{3}\), NO\({}_{2}\), O\({}_{2}\), VOC, PM\({}_{10}\), temperature and humidity, while, for the data set after PCA, the input layer contains the dimensions for each feature after reduction. There is one hidden layer used and the numbers of hidden neurons were not fixed and were adjusted until the desired performance was achieved. The last layer of the model is the output layer, which consists of five target outputs that represent five types of sources of indoor air pollution, such as combustion activity, the presence of fragrances and so on. Sixty percent of all data is selected randomly to become the training set. A goal is set (in this case, a mean square error (MSE) of 0.0001 has been chosen as the goal) \begin{table}
\begin{tabular}{c c c c} \hline \hline
**Feature** & **Original Dimension** & **New Dimension** & **Total Variance Explained** \\ \hline RW & 9 & 4 & 80.88\% \\ DIFF & 9 & 4 & 84.48\% \\ REL & 9 & 4 & 80.85\% \\ FRACT & 9 & 4 & 80.85\% \\ SN & 9 & 4 & 73.99\% \\ VAN & 9 & 2 & 93.70\% \\ \hline \hline \end{tabular}
\end{table} 
Table 7: Total variance explained for all features. \begin{table}
\begin{tabular}{c c} \hline \hline
**Method** & **Classifier** \\ \hline Logic-based & \(\bullet\) & Decisions trees \\  & \(\bullet\) & Rule based \\ \hline Perceptron-based & \(\bullet\) & Artificial neural network (ANN) \\  & \(\bullet\) & Multilayer perceptron (MLP) \\ \hline Instance-based & \(\bullet\) & K-nearest neighbour (KNN) \\ \hline Statistical Learning-based & \(\bullet\) & Linear discriminant analysis (LDA) \\ \hline Vector-based & \(\bullet\) & Support vector machine (SVM) \\ \hline \hline \end{tabular}
\end{table} 
Table 8: Methods for supervised machine learning. and the training dataset is trained until the desired MSE is obtained. MSE was used as the stopping criterion. Training was conducted until the MSE fell below 0.0001 or a maximum epoch limit of 1000 is reached. This is to ensure that the model is trained with minimum error iteration and not over-trained. The learning rate and momentum factor were chosen based on experimental analysis. The number of hidden neurons was adjusted by the network to achieve this goal. The testing tolerance of the neural network model was chosen as 0.1. This value is the maximum allowable tolerance level for the testing.