# Assessment of Thermal Comfort in an Electric Bus Based on Machine Learning Classification
## 2 Materials and Methods
### Machine Learning Model Design
#### 2.5.1 Machine Learning Classifiers  
In this paper, ML classification models are employed to assign passengers either to group 1 or 2 depending on the parameter set. To identify the best suited model for the application, some of the most typically used classifiers for thermal comfort are compared [17]. Here, these ML models are shortly described. Artificial Neural Networks (ANNs)  
_ANNs_ consist of multiple layers of processing units, typically known as neurons, which are connected to each other through weighted channels [25]. Each neuron uses an activation function to determine the output depending on the signal received from the neurons in the  
Figure 5: Comparison of reported TS compared to the calculated PMV. previous layer. _ANNs_ are commonly employed in several applications, ranging from facial recognition [26] to weather forecasting [27] and prediction of thermal comfort [28; 29]. In this paper, an _ANN_ classifier is developed. Additionally, grid search is used to determine the optimal hidden size and number of layers using the benchmark parameter set \(S_{1}\), which are 10 and 3, respectively. Finally, a _Rectified Linear Unit_[30] was used as an activation function for each layer of the _ANN_, with the exception of the last one that used a sigmoid function. The _ANN_ is trained for 100 epochs using an Adam optimizer with a learning rate of 0.01. Ensemble Learning (ENL)  
_ENL_ is an approach that relies on the integrated use of multiple low-accuracy learning models for class prediction [31]. This allows us to improve the performance and robustness in respect to the single constituting models. Among the most commonly used _ENL_ models are _Random Forest (RF)_[32] and _Adaptive Boosting (AdaBoost)_[33]. Both _RF_[34] and _AdaBoost_[35] are widely used for the prediction of thermal comfort and are therefore applied in this paper:  
* _RF_ operates by fitting several decision tree classifiers on various distinct sub-samples of the data set. The majority vote of the decision trees is then used to compute the final classifications, thereby enabling us to greatly reduce both the variance and the sensitivity to the training data. * _AdaBoost_ is based on _Boosting_, i.e., the iterative creation of models that rectify the mistakes of the previous ones [36]. _AdaBoost_ operates by first assigning equal weights to all data points in the employed data set. Subsequently, the misclassified data points are assigned a higher value and a second model is trained. The weight adjustment is then repeated. The whole process is iteratively performed and all the resulting models are used for the final classification. k-Nearest Neighbors (kNN)  
_kNN_ classification operates by comparing and assigning a data point to the same class as the majority of its \(k\) nearest neighboring points in the data set [37]. Typical applications of _kNN_ include finance (e.g., forecasting of stock market movements [38]), text processing [39] and thermal comfort modeling [40]. Support Vector Machine (SVM)  
_SVM_ operates by identifying the hyperplane that best divides the parameter space into two classes [41]. This identification is performed by maximizing the distance (known as margin) between the data points contained in each class and the hyperplane itself. The data points closest to the hyperplane are known as support vectors. For some data sets, the data points cannot be linearly separated within the parameter space. In this case, a nonlinear transformation can be used to project the data points into a higher dimensional plane, where they can easily be separated with a hyperplane. As identifying these transformations can require very high computational power, specific functions known as kernels are typically used to determine the shape of the hyperplane [42]. Due to its high performance and simplicity of use, _SVM_ finds application in several fields, such as image processing, text recognition [41] and modeling of thermal sensation in buildings [43].