## 4 Results and Discussion
### Supervised Machine Learning Analysis for Pattern Recognition
The detailed parameter for MLP training is given in Table 9. For example, to train the dataset (before PCA) for the condition of ambient air, the data from all 9 IAQ parameters become the neurons for the input layer. Randomly, 60% of each IAQ parameter was selected to be the training set (60% out of 960 data for ambient air). The training was conducted until the targeted MSE was reached or until a maximum epoch limit of 1000 was reached. This process was repeated with the other four conditions. In the end, the network would produce a model which was then tested against the 40% of the remaining data for all conditions (the testing set) in order to find the classification accuracy. The whole process was repeated again for different features. The model of the feature that gave the highest classification accuracy may be chosen to be embedded into the system after being compared to the model of other type of classifiers, such as KNN or LDA. \begin{table}
\begin{tabular}{c c c} \hline \hline  & **Training Parameter** & **Value** \\ \hline \hline  & Sample & \\ \(\bullet\) & Number of samples used for training: 2880 & 4800 \\ \(\bullet\) & Number of samples used for testing: 1920 & \\ \hline  & Input & 9 \\  & Hidden neurons & Flexible \\  & Output neurons & 5 \\  & Performance & MSE \\  & Goal & 0.0001 \\  & Learning rate & 0.01 \\  & Momentum constant & 0.5 \\ \hline \hline \end{tabular}
\end{table} 
Table 9: Parameters for multilayer perceptron (MLP) training. Figure 7: Network architecture of the multilayer perceptron (MLP) model. The classification performance of the MLP, KNN and LDA using the six features for the dataset before-PCA and after-PCA are shown in Figure 8. The PCA was performed because PCA is known to be able to increase the classification accuracy of certain datasets by reducing the number of variables, losing only a minimum of variability [46]. However, as shown in Figure 8, the classification rate for dataset after PCA is less than the classification rate before PCA for all features. This result is due to the information loss during PCA. According to [58], for datasets with very low complexity (few PCs), the relevant information has been excluded during the process of PCA, which resulted in a lower classification accuracy for datasets after PCA. The PCA could give a higher classification accuracy to datasets with very high complexity (many PCs), where the dataset before PCA does not only have relevant information, but also contains noise [59]. With the presence of noise, the classifier over-fits the training data and thus does not generalize well. Based on the explanation by [58], it can be seen that this study has a dataset with a very low complexity (only 9 PCs). Thus, the PCA process has excluded relevant information that could contribute to the high classification accuracy, which explains the lower classification accuracy for the dataset after PCA. Nevertheless, although the dataset after PCA (VAN feature) could not give 100% classification accuracy, it could classify 99.58% of the dataset using only two variables instead of nine variables needed for the dataset before PCA. The validation in identifying pollutants by the proposed machine learning algorithm can be obtained by looking at the confusion matrix. A confusion matrix is a table that is often used to describe the performance of a classification model (or \"classifier\") on a set of test data for which the true values are known. For example, in the case of the MLP classifier, the confusion matrix for the features giving the lowest and the highest classification accuracy are shown in Tables 10 and 11. Rows and columns represent actual and predicted values, respectively. Table 10 shows the confusion matrix for feature SN (after PCA) as it gave the lowest confusion matrix. Based on the table, it can be observed that every condition contributes to the confusion level, with human activity having the highest confusion level at 50%.