# A Review of Machine Learning and IoT in Smart Transportation
## 2 Machine Learning and IoT in Smart Transportation
### Machine Learning Algorithms
#### 2.1.1 Ensemble  
Ensemble algorithms address a problem, by training multiple classifiers and combining their results. The main advantage of ensemble methods is their ability to boost the so called weak classifiers to strong classifiers. In this way, the systems can use the weak classifiers which are easily constructed and also gain the quality of a strong classifier [39]. In [17], the authors aim to prevent road accidents by creating a framework to detect the driver's consciousness. The input data are collected by a camera fixed in front of the driver, in order to track eye movement and head nodding. Then, Human HAAR features [40] are selected from an extracted integral image, which become input for the Adaptive Boosting (AdaBoost) algorithm. AdaBoost is an ensemble algorithm which is used together with other weak classifiers to form a strong classifier. In the research, a large number of features need to be processed in real time and AdaBoost shows a great advantage in that aspect. To further improve the AdaBoost results in terms of speed, the authors set the strong classifiers in a cascading order, where each classifier is fed with the features processed from the previous one. Random Forest (RF) is another popular ensemble algorithm. RF is used for regression and classification tasks, using a plethora of decision trees as weak learners, while getting their mean value or the most sampled values as an output. RF is usually less susceptible to the over-fitting effect than single decision trees. The authors in [27] developed four models, in order to forecast short-term and long-term traffic flow in work zones. They compared the methods results using the following three metrics: (a) Root Mean Square Error (RMSE), (b) Mean Absolute Error (MAE), and (c) Mean Absolute Percentage Error (MAPE). The results of this research showed that RF outperformed the implemented baseline predictor, the regression tree and a Feed Forward Neural Network in all three measurements for both long and short-term predictions. In [35], the goal is to identify road surface abnormalities. This is achieved by collecting data using accelerometer sensors with Arduino microcontrollers and then apply a set of feature selection and ML algorithms on the data. For the feature selection three techniques are used, Ranker, Greedy Algorithm, and Particle Swarm Optimisation (PSO). Consequently, three ML algorithms are compared, k-Nearest Neighbour (\(k\)-NN), RF, and Support Vector Machine (SVM). Considering the RF algorithm, it was tuned by adjusting three parameters for optimal results. The parameters used are the RF seeds, the number of iterations, and the number of the selected features. The algorithms were evaluated using the Correctly Classified Rate (CCR) measurement. The results indicate that all the classifiers performed adequately with over 99% accuracy. In [37], the authors use RF in comparison with SVM and ANN, to detect road accidents. For the data collection a traffic simulation environment, SUMO [41] is used. Vehicle to vehicle communication is established in the simulation and vehicles exchange information such as speed and location. The aforementioned classifiers are trained using the 10-fold cross validation method and are validated using accuracy, sensitivity, and specificity measurements. The RF algorithm seems to perform better than the other two classifiers in accuracy and sensitivity. Finally, in [23], five ML algorithms are trained using a labeled set of data. The data consist of speed and location data and the label of whether the respective path was congested or not. The tested algorithms are RF, decision tree, MLP, SVM, and Logistic Regression. The evaluation was based on Precision, Recall, and Accuracy, and lead to the result that the Logistic Regression slightly outperformed the other methods due to the power of regression methods against time dependent data. The ML methods mentioned above that do not belong to the ensemble category, will be reviewed separately in the following sections.