Javascript is required
1.
N. Bharadwaj, P. Kumar, S. S. Arkatkar, and G. Joshi, “Deriving capacity and level-of-service thresholds for intercity expressways in India,” Transp. Lett., vol. 12, no. 3, pp. 182–196, 2019. [Google Scholar] [Crossref]
2.
K. Wiley, H. Maoh, and P. Kanaroglou, “Exploring and modeling the level of service of urban public transit: the case of the Greater Toronto and Hamilton Area, Canada,” Transp. Lett., vol. 3, no. 2, pp. 77–89, 2011. [Google Scholar] [Crossref]
3.
P. K. Bhuyan and M. S. Nayak, “A review on level of service analysis of urban streets,” Transp. Rev., vol. 33, no. 2, pp. 219–238, 2013. [Google Scholar] [Crossref]
4.
L. Zadeh, “Fuzzy sets,” Inf. Control., vol. 8, no. 3, pp. 338–353, 1965. [Google Scholar] [Crossref]
5.
P. Chakroborty and S. Kikuchi, “Application of fuzzy set theory to the analysis of capacity and level of service of highways,” in Proceedings First International Symposium on Uncertainty Modeling and Analysis. College Park, MD, USA, pp. 146–150, 1990. [Google Scholar] [Crossref]
6.
N. N. Ndoh and N. J. Ashford, “Evaluation of transportation level of service using fuzzy sets,” Transp. Res. Rec., vol. 1461, pp. 31–37, 1994. [Google Scholar]
7.
J. Xu, S. C. Wong, H. Yang, and C. Tong, “Modeling level of urban taxi services using neural network,” J. Transp. Eng., vol. 125, no. 3, pp. 216–223, 1999. [Google Scholar] [Crossref]
8.
D. Lee, T. Kim, and M. T. Pietrucha, “Incorporation of transportation user perception into evaluation of service quality of signalized intersections,” Transp. Res. Rec., vol. 2027, no. 1, pp. 9–18, 2007. [Google Scholar] [Crossref]
9.
S. B. Pattnaik and K. Ramesh Kumarb, “Level of service of urban roads based on users’ perception,” Civ. Eng. Syst., vol. 14, no. 2, pp. 87–110, 1996. [Google Scholar] [Crossref]
10.
D. Basu, S. R. Maitra, and B. Maitra, “Modelling passenger car equivalency at an urban midblock using stream speed as measure of equivalence,” Eur. Transp., vol. 34, pp. 75–87, 2006. [Google Scholar]
11.
E. Cicek, M. Akin, F. Uysal, and R. T. Aytas, “Comparison of traffic accident injury severity prediction models with explainable machine learning,” Transp. Lett., vol. 15, no. 9, pp. 1043–1054, 2023. [Google Scholar] [Crossref]
12.
T. Baykal, F. Ergezer, E. Eriskin, and S. Terzi, “Impact of meteorological factors on asphalt pavement surface temperatures: a machine learning approach,” J. Civ. Hydraul. Eng., vol. 2, no. 2, pp. 100–108, 2024. [Google Scholar] [Crossref]
13.
A. Gupta, S. Gowda, A. Tiwari, and A. K. Gupta, “XGBoost-SHAP framework for asphalt pavement condition evaluation,” Constr. Build. Mater., vol. 426, p. 136182, 2024. [Google Scholar] [Crossref]
14.
F. Zhang, A. C. Falchetto, D. Wang, Z. Li, Y. Sun, and W. Lin, “Prediction of asphalt rheological properties for paving and maintenance assistance using explainable machine learning,” Fuel, vol. 396, p. 135319, 2025. [Google Scholar] [Crossref]
15.
S. Dong, A. Khattak, I. Ullah, J. Zhou, and A. Hussain, “Predicting and analyzing road traffic injury severity using boosting-based ensemble learning models with SHAPley additive exPlanations,” Int. J. Environ. Res. Public Health, vol. 19, no. 5, p. 2925, 2022. [Google Scholar] [Crossref]
16.
Y. Kang and A. J. Khattak, “Deep learning model for crash injury severity analysis using Shapley additive explanation values,” Transp. Res. Rec., vol. 2676, no. 12, pp. 242–254, 2022. [Google Scholar] [Crossref]
17.
C. Panda, A. K. Mishra, A. K. Dash, and H. Nawab, “Predicting and explaining severity of road accident using artificial intelligence techniques, SHAP and feature analysis,” Int. J. Crashworthiness, vol. 28, no. 2, pp. 186–201, 2022. [Google Scholar] [Crossref]
18.
M. Biswal and P. K. Bhuyan, “Shapley additive explanation method for assessing motorized two-wheeler level of service at signalized intersections,” in Proceedings Urban Mobility India. Kochi, India, pp. 381–389, 2022. [Google Scholar] [Crossref]
19.
J. Park, Z. Chen, L. Kiliaris, M. L. Kuang, M. A. Masrur, A. M. Phillips, and Y. L. Murphey, “Intelligent vehicle power control based on machine learning of optimal control parameters and prediction of road type and traffic congestion,” IEEE Trans. Veh. Technol., vol. 58, no. 9, pp. 4741–4756, 2009. [Google Scholar] [Crossref]
20.
X. Yin, G. Wu, J. Wei, Y. Shen, H. Qi, and B. Yin, “Deep learning on traffic prediction: methods, analysis, and future directions,” IEEE Trans. Intell. Transp. Syst., vol. 23, no. 6, pp. 4927–4943, 2021. [Google Scholar] [Crossref]
21.
E. Çiçek, T. Ozdemir, O. Kaplan, T. Yusel, and M. Punar, “Investigation of pedestrian and vehicle level of service regulation for Hacettepe Sıhhiye campus,” J. Innov. Transp., vol. 5, no. 1, pp. 1–7, 2024. [Google Scholar] [Crossref]
22.
J. Kaur, M. A. Khan, M. Iftikhar, M. Imran, and Q. E. U. Haq, “Machine learning techniques for 5G and beyond,” IEEE Access, vol. 9, pp. 23472–23488, 2021. [Google Scholar] [Crossref]
23.
M. Elbadawi, S. Gaisford, and A. W. Basit, “Advanced machine-learning techniques in drug discovery,” Drug Discov. Today, vol. 26, no. 3, pp. 769–777, 2021. [Google Scholar] [Crossref]
24.
D. Shah, S. Patel, and S. K. Bharti, “Heart disease prediction using machine learning techniques,” SN Comput. Sci., vol. 1, no. 6, pp. 1–6, 2020. [Google Scholar] [Crossref]
25.
S. K. S. Durai and M. D. Shamili, “Smart farming using machine learning and deep learning techniques,” Decis. Anal. J., vol. 3, p. 100041, 2022. [Google Scholar] [Crossref]
26.
C. Z. Basha, N. Bhavana, P. Bhavya, and S. V, “Rainfall prediction using machine learning & deep learning techniques,” in 2020 International Conference on Electronics and Sustainable Communication Systems (ICESC). Coimbatore, India, 2020. [Google Scholar] [Crossref]
27.
F. Ergezer, “AI-based prediction of optimum binder content in asphalt mixtures using machine learning–genetic algorithm hybrid modeling,” Int. J. Pavement Res. Technol., pp. 1–15, 2026. [Google Scholar] [Crossref]
28.
F. Zantalis, G. Koulouras, S. Karabetsos, and D. Kandris, “A review of machine learning and IoT in smart transportation,” Future Internet, vol. 11, no. 4, p. 94, 2019. [Google Scholar] [Crossref]
29.
M. Bansal, A. Goyal, and A. Choudhary, “A comparative analysis of K-Nearest Neighbor, Genetic, Support Vector Machine, Decision Tree, and Long Short Term Memory algorithms in machine learning,” Decis. Anal. J., vol. 3, p. 100071, 2022. [Google Scholar] [Crossref]
30.
Z. Zhang, “Introduction to machine learning: k-nearest neighbors,” Ann. Transl. Med., vol. 4, no. 11, p. 218, 2016. [Google Scholar] [Crossref]
31.
G. E. A. P. A. Batista and D. F. Silva, “How k-nearest neighbor parameters affect its performance,” in Anales JAIIO. Mar del Plata: SADIO., pp. 1–12, 2009. [Google Scholar]
32.
N. Garcia-Pedrajas, J. A. R. del Castillo, and G. Cerruela-Garcia, “A proposal for local k values for k-nearest neighbor rule,” IEEE Trans. Neural Networks Learn. Syst., vol. 28, no. 2, pp. 470–475, 2015. [Google Scholar] [Crossref]
33.
A. X. Wang, S. S. Chukova, and B. P. Nguyen, “Ensemble k-nearest neighbors based on centroid displacement,” Inf. Sci., vol. 629, pp. 313–323, 2023. [Google Scholar] [Crossref]
34.
S. Nayak, M. Bhat, N. V. S. Reddy, and B. Ashwath Rao, “Study of distance metrics on k-nearest neighbor algorithm for star categorization,” J. Phys.: Conf. Ser., vol. 2161, p. 012004, 2022. [Google Scholar] [Crossref]
35.
R. K. Halder, M. N. Uddin, A. Uddin, S. Aryal, and A. Khraisat, “Enhancing K-nearest neighbor algorithm: a comprehensive review and performance analysis of modifications,” J. Big Data, vol. 11, no. 1, pp. 1–55, 2024. [Google Scholar] [Crossref]
36.
W. D. Yang, Z. Z. Lou, and B. Ji, “A multi-factor analysis model of quantitative investment based on GA and SVM,” in 2017 2nd International Conference on Image, Vision and Computing (ICIVC). Chengdu, China, pp. 1152–1155, 2017. [Google Scholar] [Crossref]
37.
J. Cervantes, F. Garcia-Lamont, L. Rodríguez-Mazahua, and A. Lopez, “A comprehensive survey on support vector machine classification: applications, challenges and trends,” Neurocomputing, vol. 408, pp. 189–215, 2020. [Google Scholar] [Crossref]
38.
S. Chidambaram and K. G. Srinivasagan, “Performance evaluation of support vector machine classification approaches in data mining,” Cluster Comput., vol. 22, no. S1, pp. 189–196, 2018. [Google Scholar] [Crossref]
39.
S. Chen, J. Ren, Y. Yan, M. Sun, F. Hu, and H. Zhao, “Multi-sourced sensing and support vector machine classification for effective detection of fire hazard in early stage,” Comput. Electr. Eng., vol. 101, p. 108046, 2022. [Google Scholar] [Crossref]
40.
M. Barstuğan and R. Ceylan, “The effect of dictionary learning on weight update of AdaBoost and ECG classification,” J. King Saud Univ. Comput. Inf. Sci., vol. 32, no. 10, pp. 1149–1157, 2020. [Google Scholar] [Crossref]
41.
S. Wang, W. Liu, S. Yang, and H. Huang, “An optimized AdaBoost algorithm with atherosclerosis diagnostic applications: adaptive weight-adjustable boosting,” J. Supercomput., vol. 80, no. 9, pp. 13187–13216, 2024. [Google Scholar] [Crossref]
42.
E. Sevinç, “An empowered AdaBoost algorithm implementation: A COVID-19 dataset study,” Comput. Ind. Eng., vol. 165, p. 107912, 2022. [Google Scholar] [Crossref]
43.
R. Natras, B. Soja, and M. Schmidt, “Ensemble machine learning of Random Forest, AdaBoost and XGBoost for vertical total electron content forecasting,” Remote Sens., vol. 14, no. 15, p. 3547, 2022. [Google Scholar] [Crossref]
44.
L. H. Li, W. P. Jing, and H. H. Wang, “Extracting the forest type from remote sensing images by random forest,” IEEE Sensors J., vol. 21, no. 16, pp. 17447–17454, 2020. [Google Scholar] [Crossref]
45.
R. Iranzad and X. Liu, “A review of random forest-based feature selection methods for data science education and applications,” Int. J. Data Sci. Anal., vol. 20, no. 2, pp. 197–211, 2024. [Google Scholar] [Crossref]
46.
R. Valavi, J. Elith, J. J. Lahoz-Monfort, and G. Guillera-Arroita, “Modelling species presence-only data with random forests,” Ecography, vol. 44, no. 12, pp. 1731–1742, 2021. [Google Scholar] [Crossref]
47.
H. A. Salman, A. Kalakech, and A. Steiti, “Random forest algorithm overview,” Babylonian J. Mach. Learn., vol. 2024, pp. 69–79, 2024. [Google Scholar] [Crossref]
48.
X. Jiang and C. Xu, “Deep learning and machine learning with grid search to predict later occurrence of breast cancer metastasis using clinical data,” J. Clin. Med., vol. 11, no. 19, p. 5772, 2022. [Google Scholar] [Crossref]
49.
T. Yan, S. Shen, A. Zhou, and X. Chen, “Prediction of geological characteristics from shield operational parameters by integrating grid search and K-fold cross validation into stacking classification algorithm,” J. Rock Mech. Geotech. Eng., vol. 14, no. 4, pp. 1292–1303, 2022. [Google Scholar] [Crossref]
50.
K. P. M. Kannangara, W. Zhou, Z. Ding, and Z. Hong, “Investigation of feature contribution to shield tunneling-induced settlement using Shapley additive explanations method,” J. Rock Mech. Geotech. Eng., vol. 14, no. 4, pp. 1052–1063, 2022. [Google Scholar] [Crossref]
51.
S. M. Lundberg and S. I. Lee, “A unified approach to interpreting model predictions,” in Advances in Neural Information Processing Systems. Curran Associates, Inc., 2017. [Online]. Available: https://proceedings.neurips.cc/paper_files/paper/2017/file/8a20a8621978632d76c43dfd28b67767-Paper.pdf [Google Scholar]
52.
H. Sahlaoui, E. A. A. Alaoui, A. Nayyar, S. Agoujil, and M. M. Jaber, “Predicting and interpreting student performance using ensemble models and Shapley additive explanations,” IEEE Access, vol. 9, pp. 152688–152703, 2021. [Google Scholar] [Crossref]
53.
A. C. Kelle and H. Yüce, “MQTT Trafiğinde DoS Saldırılarının Makine Öğrenmesi ile Sınıflandırılması ve Modelin SHAP ile Yorumlanması,” J. Mater. Mechatron. A, vol. 3, no. 1, pp. 50–62, 2022. [Google Scholar] [Crossref]
54.
I. Ullah, K. Liu, T. Yamamoto, M. Zahid, and A. Jamal, “Prediction of electric vehicle charging duration time using ensemble machine learning algorithm and Shapley additive explanations,” Int. J. Energy Res., vol. 46, no. 11, pp. 15211–15230, 2022. [Google Scholar] [Crossref]
55.
L. Antwarg, R. M. Miller, B. Shapira, and L. Rokach, “Explaining anomalies detected by autoencoders using Shapley additive explanations,” Expert Syst. Appl., vol. 186, p. 115736, 2021. [Google Scholar] [Crossref]
56.
S. Kumari, D. Kumar, and M. Mittal, “An ensemble approach for classification and prediction of diabetes mellitus using soft voting classifier,” Int. J. Cognit. Comput. Eng., vol. 2, pp. 40–46, 2021. [Google Scholar] [Crossref]
57.
M. Sokolova and G. Lapalme, “A systematic analysis of performance measures for classification tasks,” Inf. Process. Manag., vol. 45, no. 4, pp. 427–437, 2009. [Google Scholar] [Crossref]
58.
V. N. G. Raju, K. P. Lakshmi, V. M. Jain, A. Kalidindi, and V. Padma, “Study the influence of normalization/transformation process on the accuracy of supervised classification,” in 2020 Third International Conference on Smart Systems and Inventive Technology (ICSSIT). Tirunelveli, India, pp. 729–735, 2020. [Google Scholar] [Crossref]
59.
N. G. Sorboni, J. Wang, and M. R. Najafi, “Fusion of Google Street View, LiDAR, and orthophoto classifications using ranking classes based on F1 score for building land-use type detection,” Remote Sens., vol. 16, no. 11, p. 2011, 2024. [Google Scholar] [Crossref]
60.
A. S. Kolesnyk and N. F. Khairova, “Justification for the use of Cohen’s kappa statistic in experimental studies of NLP and text mining,” Cybern. Syst. Anal., vol. 58, no. 2, pp. 280–288, 2022. [Google Scholar] [Crossref]
61.
A. Ben-David, “About the relationship between ROC curves and Cohen’s kappa,” Eng. Appl. Artif. Intell., vol. 21, no. 6, pp. 874–882, 2008. [Google Scholar] [Crossref]
62.
M. L. McHugh, “Interrater reliability: the kappa statistic,” Biochem. Med., vol. 22, no. 3, pp. 276–282, 2012. [Google Scholar] [Crossref]
63.
Z. H. Hoo, J. Candlish, and D. Teare, “What is an ROC curve?,” Emerg. Med. J., vol. 34, no. 6, pp. 357–359, 2017. [Google Scholar] [Crossref]
64.
J. Miao and W. Zhu, “Precision–recall curve (PRC) classification trees,” Evol. Intell., vol. 15, no. 3, pp. 1545–1569, 2021. [Google Scholar] [Crossref]
65.
J. F. Salgado, “Transforming the area under the normal curve (AUC) into Cohen’s d, Pearson’s r pb, odds-ratio, and natural log odds-ratio: two conversion tables,” Eur. J. Psychol. Appl. Leg. Context, vol. 10, no. 1, pp. 35–47, 2018. [Google Scholar] [Crossref]
66.
A. M. Carrington, D. G. Manuel, P. W. Fieguth, T. Ramsay, V. Osmani, B. Wernly, C. Bennett, S. Hawken, O. Magwood, Y. Sheikh, M. McInnes, and A. Holzinger, “Deep ROC analysis and AUC as balanced average accuracy, for improved classifier selection, audit and explanation,” IEEE Trans. Pattern Anal. Mach. Intell., vol. 45, no. 1, pp. 329–341, 2022. [Google Scholar] [Crossref]
67.
A. J. Bowers and X. Zhou, “Receiver operating characteristic (ROC) area under the curve (AUC): a diagnostic measure for evaluating the accuracy of predictors of education outcomes,” J. Educ. Stud. Placed Risk, vol. 24, no. 1, pp. 20–46, 2019. [Google Scholar] [Crossref]
68.
A. M. Borges, J. Kuang, H. Milhorn, and R. Yi, “An alternative approach to calculating area-under-the-curve (AUC) in delay discounting research,” J. Exp. Anal. Behav., vol. 106, no. 2, pp. 145–155, 2016. [Google Scholar] [Crossref]
69.
T. Le, H. Kim, H. Kang, and H. Kim, “Classification and explanation for intrusion detection system based on ensemble trees and SHAP method,” Sensors, vol. 22, no. 3, p. 1154, 2022. [Google Scholar] [Crossref]
70.
Z. Deng, X. Zhu, D. Cheng, M. Zong, and S. Zhang, “Efficient kNN classification algorithm for big data,” Neurocomputing, vol. 195, pp. 143–148, 2016. [Google Scholar] [Crossref]
71.
F. Tarakci and I. A. Ozkan, “Comparison of classification performance of kNN and WKNN algorithms,” Selcuk Univ. J. Eng. Sci., vol. 20, no. 2, pp. 32–37, 2021. [Google Scholar]
72.
A. Koushik, M. Manoj, and N. Nezamuddin, “SHapley additive exPlanations for explaining artificial neural network based mode choice models,” Transp. Dev. Econ., vol. 10, no. 1, pp. 1–11, 2024. [Google Scholar] [Crossref]
Search
Open Access
Research article

Machine Learning-Based Road Level-of-Service Classification Using K-Nearest Neighbours and Shapley Additive Explanations Analysis

elif cicek1,
fatih ergezer2,
tahsin baykal3,
ekinhan eriskin4,
serdal terzi5*
1
Department of Civil Engineering, Hacettepe University, 06800 Ankara, Turkey
2
Department of International Trade and Logistics, Bandırma Onyedi Eylul University, 10200 Bandırma, Turkey
3
Department of Civil Engineering, Kırıkkale University, 71450 Kırıkkale, Turkey
4
Department of Property Protection and Security, Suleyman Demirel University, 32260 Isparta, Turkey
5
Department of Civil Engineering, Suleyman Demirel University, 32260 Isparta, Turkey
Journal of Civil and Hydraulic Engineering
|
Volume 4, Issue 2, 2026
|
Pages 83-97
Received: 04-21-2026,
Revised: 05-30-2026,
Accepted: 06-05-2026,
Available online: 06-10-2026
View Full Article|Download PDF

Abstract:

Accurate classification of road level of service (LOS) is essential for evaluating traffic operating conditions, supporting road safety assessment, and informing maintenance and rehabilitation planning. In this study, vehicle-count data were collected at the entrance to the car park of Hacettepe University’s Sıhhiye Campus and used to develop machine learning (ML)-based models for LOS classification. Four supervised classification algorithms—K-nearest neighbours (KNN), support vector classification (SVC), AdaBoost, and random forest (RF)—were evaluated using the number of cars, number of trucks, hourly traffic volume, and flow rate as predictor variables. The dataset was divided into training and testing subsets using an 80:20 ratio. To improve model generalisation and reduce the risk of overfitting, five-fold cross-validation combined with grid-search-based hyperparameter optimisation was performed using the training data. Model performance was assessed using accuracy, Cohen’s kappa coefficient, F1 score, recall, precision, confusion matrices, and receiver operating characteristic (ROC) curve analysis. Among the evaluated classifiers, KNN achieved the highest overall performance in LOS classification. To enhance the interpretability of the resulting predictions, Shapley Additive Explanations (SHAP) analysis was subsequently applied to the best-performing model. The SHAP results indicated that flow rate was the most influential predictor of LOS classification, whereas the number of heavy vehicles exerted the smallest overall influence among the variables considered. These findings demonstrate the potential of interpretable ML approaches to complement conventional traffic-performance assessment by providing both predictive classification and insight into the relative contribution of traffic-flow variables to LOS determination.

Keywords: Level of service, Machine learning, Shapley Additive Explanations, Grid search cross-validation, Road safety

1. Introduction

As is well known, road safety has a critical impact on human life, influencing economic, environmental, social, and political outcomes. A review of the literature reveals that determining road quality is essential for ensuring traffic safety and developing intelligent traffic systems. In traffic engineering, this concept is commonly represented by the level of service (LOS) [1,] [2]. With recent advancements in technological tools, traffic management has become a fundamental component of smart city infrastructure, and traffic prediction plays a key role in real-world applications.

Historically, studies on LOS were first formalized in the Highway Capacity Manual (HCM). Six levels, from A to F, were established to classify varying traffic conditions. In the 1965 edition of the HCM, travel time and the flow-to-capacity ratio were identified as critical factors for LOS. In the 1985 edition, traffic flow, travel speed, and traffic density were highlighted. The 2000 edition further emphasized travel time and speed, as well as driver maneuverability, comfort, and convenience, and interruptions experienced while traveling [3].

With the advent of modern technologies, traffic-related challenges have found new potential solutions. As a result, LOS prediction has increasingly been explored through computational methods, including fuzzy logic and artificial neural networks (ANNs) [4], [5], [6], [7], [8]. For instance, Pattnaik and Ramesh Kumarb [9] evaluated speed, volume, and acceleration noise within the HCM framework using various fuzzy sets. Basu et al. [10] employed a neural network approach to assess vehicle equivalency, using stream speed as a performance measure and analyzing the effects of traffic volume and composition.

In recent years, newer analytical approaches such as Shapley Additive Explanations (SHAP) and machine learning (ML) have been increasingly adopted [11], [12], [13], [14]. SHAP has been widely used in traffic safety studies [15], [16], [17]. However, its application to LOS prediction remains limited, making it a promising and valuable direction for future research. For instance, Biswal and Bhuyan [18] applied SHAP to predict LOS at intersections, identifying key features that influence LOS at signalized intersections. Additionally, ML methods have proven effective in exploring LOS and traffic congestion. For example, Park et al. [19] and Yin et al. [20], investigated road types and congestion levels using various ML techniques.

Therefore, it is evident that the integration of these advanced methods and a deeper understanding of parameter relationships can yield valuable insights for traffic management and LOS prediction.

This study aimed to accurately predict the LOS using ML techniques. Four different algorithms, K-nearest neighbours (KNN), support vector classification (SVC), random forest (RF), and AdaBoost, were applied for this purpose. Before model development, a correlation matrix was utilized to examine the relationships between input features and LOS classes. The models were subsequently evaluated using various performance metrics, including accuracy, Cohen’s Kappa, receiver operating characteristic (ROC) curves, and Area Under the Curve (AUC) scores, providing a comprehensive comparison of their classification capabilities.

The paper is organized as follows: Section 2 provides an overview of the methodology and describes the dataset used in the study. It also details the methods applied and the evaluation metrics employed; Section 3 presents the results obtained; Section 4 provides the conclusions of the study.

2. Methodology

In this study, a structured approach was followed to generate ML models aimed at predicting LOS. Initially, a correlation matrix was generated to investigate the relationships among variables. Based on these insights, four classification algorithms, KNN, SVC, RF, and AdaBoost, were selected and implemented. Model performance was evaluated using standard evaluation metrics such as accuracy, Cohen’s Kappa, ROC curves, and AUC values.

2.1 Data

This study used traffic counts on the vehicle access road in Hacettepe University Sıhhiye campus hospital, a critical area for vehicle traffic [21]. The counts were taken at 15-minute intervals during peak hours with high entry and exit traffic. The statistical information of the parameters used as input in the ML models is given in Table 1, and the Box and whisker plot is shown in Figure 1.

Table 1. Statistical information of the input parameters

Statistical Descriptions

Number of Cars

Number of Trucks

Hourly Volume

Flow Rate

Count

77

77

77

77

Mean

224.06

21.71

220.52

347.62

std

147.27

30.14

164.33

223.81

Note: std = standard deviation
Figure 1. Box and whisker plot

In this study, the LOS classes (A–E) were determined based on the threshold criteria specified in the HCM for uninterrupted-flow facilities. For each observation, key performance indicators such as average speed and volume-to-capacity (V/C) ratio were calculated and compared with the corresponding HCM-defined ranges. Observations with higher average speeds and lower V/C ratios were categorized as LOS A or B, representing free-flow conditions, whereas those with lower speeds and higher V/C ratios were classified as LOS D or E, indicating unstable or near-capacity flow.

2.2 Machine Learning

As is known, ML is a set of methods that utilize many algorithms. ML-based algorithms offer different analysis techniques for an adopted algorithm. ML methods typically encompass three primary learning techniques: reinforcement, supervised, and unsupervised [22]. ML has recently been experiencing its heyday as it has a popular usage area with the possibility of being used by users in scientific studies and branches covering many different subjects in the field of industry. In recent studies with the ML technique, it has come to the forefront with different usage areas, such as its use in the field of medicine [23]. Its use in heart attack prediction [24], Its use in agriculture [25], its use in precipitation prediction [26], Its use in predicting the optimum binder content of asphalt pavement [27], Its use in intelligent transportation systems [28].

In this study, KNN, SVC, AdaBoost, and RF algorithms were selected. The selection of these algorithms was based on their representation of different learning paradigms and their adaptability to various types of data in both classification and regression problems. In this study, four different ML methods were used to predict five different service levels in the road network of the specified area, with A being the most accurate and E being the least accurate. The ML methods used in the study are given in Table 2.

Table 2. Overview of ML algorithms

Algorithms

Sklearn. neighbors

KNN

Sklearn. neighbors

SVC

Sklearn. svc

Ada boost

sklearn. ensemble

RF

Sklearn. ensemble

Note: ML: machine learning; KNN: K-nearest neighbours; SVC: Support vector classification; RF: random forest.
2.2.1 K-nearest neighbors

KNN is a commonly applied ML algorithm positioned under supervised learning techniques for both classification and regression tasks [29]. Due to its simplicity and strong generalization performance, the KNN classification method is recognized as a commonly applied approach. The KNN algorithm classifies unlabeled instances by classifying them into the category of the closest labeled examples [30]. Each data entry in the dataset is associated with a corresponding label, and the KNN algorithm determines the class of new instances based on these related labels [31].

The choice of an appropriate $k$ value is critical in classification tasks. Choosing the right $k$ value for a given dataset is often challenging due to the limited size of the training set. While many KNN approaches operate using a single predefined $k$ value, employing different $k$ values based on data boundaries can significantly improve classification accuracy [32]. For variable samples ($x, xi$), the Euclidean distance used in KNN is defined by a specific equation [33]. Higher accuracy is typically achieved with low-dimensional datasets. In contrast, when the dataset is high-dimensional and sparse, the Manhattan distance is used, as formulated in the corresponding equation [34].

$d (x, x i)=\sqrt{(x-x i)^T(x-x i)} $
(1)
$d(x, y)=\sum_{i=1}^n|x i-y i| $
(2)

Here, $x$ and $y$ represent vector variables.

Certain criteria influence the performance success of the KNN algorithm. These include the choice of $k$, the distribution of the data, the distance metric used, as well as the algorithm’s susceptibility to noise and outliers [35].

2.2.2 Support vector classification

SVC is a robust and widely recognized type of supervised ML algorithm that has been employed for classification task across different fields [36]. In recent years, the method has garnered increasing interest from researchers due to its ability to deliver high generalization performance, making it a preferred choice for accurately distinguishing between different data classes in complex classification tasks [37], [38]. The principle of SVC lies in identifying the most appropriate hyperplane that effectively constructs a decision boundary between different classes, thereby maximizing the margin between them and leading to improved generalization effectiveness [39].

2.2.3 AdaBoost

AdaBoost is a widely utilized algorithm within the ensemble learning paradigm of ML. Its fundamental purpose is to enhance classification accuracy by iteratively combining multiple weak classifiers into a single, strong learner [40]. The algorithm initiates by applying equal weights to all training samples and constructs an initial weak learner [41]. In successive iterations, events that are misclassified are assigned higher weights, while the number of correctly classified samples decreases, thereby directing the learning process toward the more difficult cases.

Through this iterative reweighting mechanism, AdaBoost incrementally improves the overall model by emphasizing the importance of errors made in previous rounds. By reducing the influence of accurately predicted observations and amplifying that of incorrectly predicted ones, the algorithm systematically refines the decision boundary. The overall classification is determined through a weighted majority vote of all weak learners, where each model’s contribution is proportional to its predictive effect [42], [43].

2.2.4 Random forest

RF is one of the ensembles learning algorithms in ML, based on the principle of constructing multiple decision trees [44]. Due to its resistance to overfitting and its ability to deliver high generalization performance, the RF algorithm is frequently preferred by researchers. It is applied for both classification and regression applications. In regression tasks, the final prediction is obtained by averaging the outputs of individual decision trees. In classification, each tree votes for a class, and the final prediction is determined by majority voting among the trees [45].

The RF algorithm builds decision trees, from randomly selected training samples, and aggregates their outputs using majority voting scheme to determine the outcome [46], [47]. This ensemble approach contributes to the consistency and reliability of the predictive model, particularly in complex prediction tasks involving high-dimensional or noisy data.

2.3 Grid search CV

Grid Search Cross-Validation (GridSearch CV) is a widely used technique for identifying the optimal hyperparameter values in ML models [48]. It is primarily employed to optimize model performance by systematically evaluating multiple parameter combinations. GridSearch CV enhances the reliability of ML models by integrating cross-validation into the optimization process [49].

In this method, the hyperparameter optimization process begins with the definition of a broad search space and parameter range. Subsequently, based on previous research findings and feedback from model performance, the search space and step size are progressively refined. This iterative procedure continues until the most suitable combination of hyperparameters is achieved.

2.4 Shapley Additive Explanations

In recent years, SHAP, has gained significant attention among researchers as a reliable approach for interpreting the outputs of AI algorithms. SHAP allows the model to be interpreted for a more detailed analysis within classification methods. SHAP algorithm stands out for its ability to fairly and systematically calculate the role of each feature in determining the model outcome, based on a game-theoretic approach [50], [51]. Conceptually, the Shapley value is structured around two key components: the game and the players. In this context, the game refers to the prediction model, while the players represent the features (i.e., model parameters) [52]. The Shapley value is used to quantify the contribution level of each feature to the model’s outcome.

SHAP's powerful visualization capabilities enable decision-makers to more clearly understand how the model responds to different variables, thereby enhancing model interpretability and promoting its broader adoption. Analyses typically close to interpretation between input and output models become interpretable with SHAP [53], [54].

When interpreting outputs using SHAP, the SHAP value plays a crucial role. In SHAP, the output of the forecasting model for a single observation value "$x$" is explained by a linear function, as defined in Eq. (3).

$f(x)=g\left(x^{\imath}\right)=\emptyset_o+\sum_{i=1}^M \emptyset_i X_i^{\imath} $
(3)

where, $x$ is the state to be interpreted, $x^{\imath}$ is the input, $\emptyset_i$ is the base value missing in all inputs, and $M$ is the number of input features [55]. This method can be used to explain the most contributing factors [11].

2.5 Evaluation Metrics

In this study, the performance of the ML models was determined via multiple evaluation metrics, namely accuracy, Cohen’s Kappa, precision, recall, F1-Score, ROC curve, and AUC. These metrics were selected to offer a detailed assestment of the models’ overall accuracy, class-specific performance, and ability to distinguish between different outcome classes.

Accuracy is a fundamental performance metric that represents the proportion of the total number of correctly predicted observations to the overall number of observations, and it is calculated using Eq. (4) [56].

$Accuracy=\frac{T P+T N}{T P+F P+T N+F N} $
(4)

Recall evaluates the ability of a classifier in correctly identifying positive cases, reflecting the proportion of true positives among all actual positives. The formula for calculating recall is provided in Eq. (5) [57].

$Recall=\frac{T P}{T P+F N} $
(5)

Precision is used as a performance metric to minimize the number of false positives, indicating the proportion of correctly predicted values that are true positives, as shown in Eq. (6) [58].

$Precision=\frac{T P}{T P+F P} $
(6)

Here, TP, TN, FP, and FN denote true positive, ture negative, false positive, false negative, respectively.

The F1-score provides a balanced evaluation of precision and recall by calculating their harmonic meaning, as expressed in Eq. (7) [59].

$F 1 Score =2 \times \frac{{ Precision }\times { Recall }}{{ Precision }+{ Recall }} $
(7)

Cohen's Kappa coefficient serves as a statistical tool to evaluate the degree of agreement between two raters, considering the possibility of chance agreement. Essentially, it quantifies how much the observed agreement exceeds what would be expected by random chance when ratings are made on a nominal scale. Cohen's Kappa measures the accuracy of classifiers in statistics, psychology, biology, and medicine. Cohen's Kappa is calculated by Eq. (8) [60].

$K=\frac{P_0-P e}{1-P e} $
(8)

$P_0$ denotes of overall agreement or accuracy, and $Pe$ is the probability of agreement by chance [61]. Cohen recommended interpreting Kappa values as follows: A value of $\leq$ 0 indicates no agreement, 0.01–0.20 indicates slight agreement, 0.21–0.40 corresponds to fair agreement, 0.41–0.60 suggests moderate agreement, 0.61–0.80 reflects substantial agreement, and values ranging from 0.81 to 1.00 indicate perfect agreement [62]. The ROC curve is a widely employed tool for assessing the effect of classification models across a range of threshold values. It is generated by representing the true positive rate (TPR) against the false positive rate (FPR), with the x-axis representing the FPR and the y-axis corresponding to the TPR [63]. By connecting the threshold-specific points for each TPR–FPR pair, the ROC curve offer a graphical illustration of the trade-off between sensitivity and specificity under varying decision thresholds [64]. Moreover, it captures the functional relationships among competing alternatives, thereby supporting decision-making under uncertainty [65].

The AUC method is utilized in classification applications to determine the impact of model performance. AUC is defined as the area under the ROC curve, which is displayed on the ROC graph [66]. It is evaluated in conjunction with the ROC curve in studies [67]. The AUC value ranges from 0 to 1 [68]. As the value approaches 1, it indicates that the model has a higher discrimination potential. The higher the AUC, the better the model accurately predicts each class [69]. The AUC area is given according to the relationship between FPR and TPR in the Eq. (9) [66]. The AUC and ROC curves are shown in Figure 2.

Figure 2. ROC and AUC example plot [69]
Note: ROC: receiver operating characteristic; AUC: area under the curve.
$p A U C(x 1, x 2)=A y=\int_{x 1}^{x 2} r(x) d x$
(9)

Here, $x1$ and $x2$ represent the FPR range, and $y$ represents the TPR value.

In this study, the workflow is illustrated in Figure 3. It begins with data collection, where relevant parameters are gathered as reported by [21]. The values of LOS are defined as 0 (A), 1 (B), 2 (C), 3 (D), and 4 (E). The collected data then undergoes preprocessing, which includes cleaning, normalizing, and structuring to prepare the dataset for analysis.

Figure 3. A simple, schematized representation of the ML process
Note: ML: machine learning.

Following data processing stage, the dataset is seperated into training and test subsets. The training data is used to develop predictive models for LOS classification by applying several ML algorithms, such as KNN, SVC, RF, and AdaBoost.

The test set is subsequently used to evaluate the performance and generalizability of these models through metrics including accuracy, precision, recall, AUC, and ROC. Cohen’s Kappa coefficient is computed to assess the agreement between predicted and actual LOS categories beyond chance. Finally, the Shapley method is employed to interpret the contribution of each input feature to the model outputs, enhancing the explainability and transparency of the ML predictions.

3. Results

3.1 Model Performance Evaluation

In this study, various ML models were developed for LOS prediction, aiming to analyze the data and enhance predictive accuracy. To ensure the effectiveness of the models and the reliability of the results, relationships among the input variables were thoroughly examined in advance using a correlation matrix (Figure 4). The analysis revealed that the number of cars, hourly volume, and flow rate exhibited a strong positive correlation with LOS, whereas the number of trucks showed a weak negative correlation. Based on these findings, ML models were implemented using KNN, SVC, RF, and AdaBoost algorithms. Prior to model training, the dataset was split into two parts: 80% training and 20% testing. To ensure robust hyperparameter tuning and minimize the risk of overfitting due to the relatively small dataset, a 5-fold CV strategy was used on the training subset. GridSearch CV was applied to systematically explore the hyperparameter spaces for each model (KNN, SVC, RF, AdaBoost). A suitable hyperparameter combination was selected according to the average CV accuracy, and the selected model was then refitted on the whole training set and evaluated on the external test set. The CV and test results of the ML models are summarized in Table 3, and the optimal hyperparameters are presented in Table 4.

Figure 4. Correlation matrix
Note: LOS: level of service.
Table 3. Cross-validation and test performance metrics of machine learning models

Model

CV Best Accuracy

Test Accuracy

Test Cohen Kappa

KNN

0.90

0.94

0.92

SVC

0.83

0.81

0.76

Ada boost

0.92

0.88

0.84

RF

0.85

0.88

0.84

Note: KNN: K-nearest neighbours; SVC: Support vector classification; RF: random forest.
Table 4. Hyperparameters of the models

Model

Hyperparameters

KNN

‘metric’: ‘euclidean’, ‘n_neighbors’: 3, ‘weights’: ‘uniform’

SVC

‘C’: 0.20, ‘gamma’: 0.02, ‘kernel’: ‘poly’

Ada boost

‘estimator’: DecisionTreeClassifier(max_depth = 2), ‘learning_rate’: 0.833, ‘n_estimators’: 49

RF

‘max_depth’: None, ‘max_features’: ‘sqrt’, ‘n_estimators’: 95

Note: KNN: K-nearest neighbours; SVC: Support vector classification; RF: random forest.

Table 3 shows that the KNN model achieved the most balanced and robust performance with an average CV accuracy of 0.90 and a maximum test accuracy of 0.94. It also achieved a Cohen Kappa value of 0.92 for the test set. This indicates a strong agreement between the predicted and actual classes. The AdaBoost model provided the highest CV accuracy (0.92), achieving excellent fit for the training set. However, the test accuracy dropped to 0.88, and the Cohen Kappa value was 0.84. RF showed similar test performance (accuracy = 0.88, Kappa = 0.84), but its performance was lower than AdaBoost due to its lower CV accuracy (0.85). SVC, on the other hand, showed the lowest performance across all metrics. The CV accuracy is 0.83 and the test accuracy is 0.81. Cohen's Kappa value is 0.76. Overall, KNN emerges as the most reliable model in terms of both training and generalization performance.

3.2 Classification Analysis of the K-Nearest Neighbours Model

The confusion matrices of the KNN model for the training and test sets are presented in Figure 5 and Figure 6, respectively. These matrices illustrate classifier’s performance by displaying the number of correct and incorrect predictions for each class. In the training set (Figure 5), the model demonstrates high accuracy, particularly for Class 0 and Class 2, with 24 and 14 correct predictions, respectively. Only a few misclassifications are observed, suggesting effective learning of the underlying patterns in the training data. This finding aligns with existing studies in literature, where the KNN algorithm has been shown to perform well in classification problems due to its simplicity and strong local decision-making capabilities [70], [71].

Figure 5. Confusion matrix for KNN model training set
Note: KNN: K-nearest neighbours.
Figure 6. Test set confusion matrix for the KNN model
Note: KNN: K-nearest neighbours.

In the test set (Figure 6), the KNN model maintains strong generalization performance, achieving perfect classification for Classes 0 through 3 and only a single misclassification in Class 4, which was predicted as Class 3. The clear diagonal dominance in both matrices highlights the model’s robustness and its ability to perform reliably on unseen data.

Additionally, key performance metrics, including precision, recall, F1-score, accuracy, macro average, and weighted average, were calculated for each class and are summarized in Table 5. These metrics offer a detailed assessment of the model’s predictive performance across all classes.

Table 5. Evaluation metric results for the KNN model test set

Precision

Recall

F1-Score

0

1.00

1.00

1.00

1

1.00

1.00

1.00

2

1.00

1.00

1.00

3

0.75

1.00

0.86

4

0.00

0.00

0.00

Accuracy

0.94

0.94

0.94

Macro Avg

0.75

0.80

0.77

Weighted Avg

0.89

0.94

0.91

Note: KNN: K-nearest neighbours.

According to Table 5, the KNN model achieved the highest accuracy, recall, and F1 score values for classes 0, 1, and 2. Accuracy, recall, and F1 score were recorded as 1.00 for these classes. Additionally, when analyzing the weighted average metric, the model achieved a precision of 0.89, a recall of 0.94, and an F1-score of 0.91. These results demonstrate that the KNN model is effective in LOS estimation.

Furthermore, ROC curves were generated for both the training and test sets of the KNN model, and the corresponding AUC values were calculated to assess its classification performance. As illustrated in Figure 7 and Figure 8, the model achieved high AUC scores on both datasets, indicating a strong ability to distinguish between LOS classes. Additionally, micro-average and macro-average ROC curves were computed. While the micro-average considers each prediction equally and reflects overall performance, the macro-average treats all classes equally by averaging the AUCs of each class. These curves provide a broader understanding of the model’s effectiveness. The obtained results indicated that the KNN model achieves good performance across the datasets, demonstrating its reliability and robustness for practical use.

Figure 7. ROC curve for the KNN model training set
Note: ROC: receiver operating characteristic; KNN: K-nearest neighbours.
Figure 8. ROC curve for the KNN model test set
Note: ROC: receiver operating characteristic; KNN: K-nearest neighbours.

Figure 7 shows the ROC curve for the training set of the KNN model. Notably, AUC for Class 0, 2 and 4 is 1.00, indicating perfect prediction for this class during the training phase, while the AUC values for the other classes are above 0.99. Figure 8 presents the ROC curves and corresponding AUC values for the test set. The AUCs for Classes 0, 1, and 2 are all 1.00, demonstrating successful classification of these classes. Meanwhile, the AUC for Class 3 is 0.96, and for Class 4, it is 0.93.

3.3 Model Interpretability (Shapley Additive Explanations)

To provide deeper insight into the results obtained from the KNN model, SHAP values were employed to clarify the relationship between the input features and the model's predictions. SHAP values quantify the role of each feature to the prediction results, allowing for a more interpretable analysis of the model's decision-making process, as also widely demonstrated in the literature to enhance model transparency and explainability across various domains [72]. These values were meticulously calculated, and a SHAP summary plot, presented in Figure 9, was generated to visually represent the impact of individual features across the dataset. This visualization enables a clearer understanding of which features most strongly influence the model’s outputs, thereby enhancing transparency and interpretability of the predictive model.

Figure 9. KNN model SHAP summary plot
Note: KNN: K-nearest neighbours; SHAP: Shapley Additive Explanations.

Figure 9 presents the effect of each input feature on the predicted classes. The flow rate parameter shows the greatest impact on Classes 0 and 2, while its influence is minimal on Class 4. Similarly, the hourly volume and number of cars exhibit the highest impact on Class 0. Overall, flow rate, hourly volume, and number of cars appear to significantly influence all classes. In contrast, the number of trucks has a noticeable effect only on Classes 0 and 1.

4. Conclusions

This study developed and evaluated four ML models: KNN, SVC, RF, and AdaBoost for predicting the LOS. Correlation analysis revealed strong positive relationships between LOS and the number of cars, hourly volume, and flow rate, while the number of trucks showed a weak negative correlation. The efficiency of the ML models was optimized using GridSearch CV for hyperparameter tuning. Key findings are summarized as follows:

$\bullet$ KNN and RF models achieved near-perfect performance, outperforming SVC and AdaBoost.

$\bullet$ The GridSearch CV technique, combined with 5-fold CV, effectively optimized the model performance and prevented overfitting.

$\bullet$ The KNN model achieved the highest accuracy (0.94) and Cohen’s Kappa coefficient (0.92) on the test set.

$\bullet$ Precision, recall, and F1-score metrics confirmed robust class-wise performance of the KNN model (for class 0: precision 1.00, recall 1.00, F1-score 1.00). The weighted-average precision, recall, and F1-score were 0.89, 0.94, and 0.91, respectively.

$\bullet$ ROC curve analysis demonstrated high discriminative ability, with AUC values close to or equal to 1 for most classes in both training and test sets.

$\bullet$ SHAP analysis identified flow rate as the most influential input feature on KNN model predictions, while the number of trucks was the least influential.

$\bullet$ Flow rate, hourly volume, and number of cars affected all LOS classes, whereas the number of trucks influenced only classes 0 and 1.

These findings demonstrate the effectiveness and reliability of ML approaches, particularly KNN, for accurate LOS prediction.

As a conclusion of this study, it can be said that ML systems and analysis techniques can be effectively used to predict the LOS behavior of traffic flow. Especially, the KNN method provided better results in this analysis. However, other models such as SVC, RF, and AdaBoost also demonstrated considerable predictive capabilities, highlighting that the choice of method may depend on specific data characteristics and application requirements. Additionally, interpretability tools like SHAP analysis helped to identify key input variables influencing predictions, emphasizing the importance of combining accurate modeling with explainable AI approaches for reliable and comprehensive traffic flow assessment.

Limitations and future work:

This study provides an initial exploration of LOS prediction using ML techniques on a small-scale campus road dataset. However, the data set comprised only 77 observations collected from a single road segment, which limits the statistical representativeness of the findings. Previous studies have also indicated that small datasets can limit model generalization, although they remain useful for methodological feasibility analyses. The findings from this preliminary study are intended to guide future research that will include more diverse and larger-scale datasets, ensuring improved external validity over time. Future work will involve collecting larger and more diverse datasets from various road types and seasons, incorporating additional variables such as weather, driver behavior, and intersection control types to improve generalization.

5. Declaration on the Use of Generative AI and AI-assisted Technologies

Author Contributions

Conceptualization, E.E.; methodology, F.E., T.B., and E.E.; formal analysis, T.B. and S.T.; investigation, F.E.; resources, E.C. and E.E.; data curation, E.C.; writing—original draft preparation, F.E. and T.B.; writing—review and editing, E.C.; visualization, F.E. and T.B.; supervision, S.T. All authors have read and agreed to the published version of the manuscript.

Data Availability

The dataset used in this study is based on measurements collected by one of the authors, Elif Çiçek (Çiçek et al., 2024). The details of the dataset are reported in: Çiçek, E., Özdemir, T., Kaplan, O., Yüsel, T., & Punar, M. (2024). Investigation of pedestrian and vehicle level of service regulation for a hacettepe sıhhiye campus. Journal of Innovative Transportation, 5(1), 1–7. https://doi.org/10.53635/jit.1364097.

Conflicts of Interest
The authors declare that they have no conflicts of interest.
Declaration on the Use of Generative AI and AI-assisted Technologies

In the course of preparing this manuscript, the author(s) employed ChatGPT to improve the linguistic quality and readability of the text. The generated content was subsequently reviewed, edited, and validated by the author(s).

References
1.
N. Bharadwaj, P. Kumar, S. S. Arkatkar, and G. Joshi, “Deriving capacity and level-of-service thresholds for intercity expressways in India,” Transp. Lett., vol. 12, no. 3, pp. 182–196, 2019. [Google Scholar] [Crossref]
2.
K. Wiley, H. Maoh, and P. Kanaroglou, “Exploring and modeling the level of service of urban public transit: the case of the Greater Toronto and Hamilton Area, Canada,” Transp. Lett., vol. 3, no. 2, pp. 77–89, 2011. [Google Scholar] [Crossref]
3.
P. K. Bhuyan and M. S. Nayak, “A review on level of service analysis of urban streets,” Transp. Rev., vol. 33, no. 2, pp. 219–238, 2013. [Google Scholar] [Crossref]
4.
L. Zadeh, “Fuzzy sets,” Inf. Control., vol. 8, no. 3, pp. 338–353, 1965. [Google Scholar] [Crossref]
5.
P. Chakroborty and S. Kikuchi, “Application of fuzzy set theory to the analysis of capacity and level of service of highways,” in Proceedings First International Symposium on Uncertainty Modeling and Analysis. College Park, MD, USA, pp. 146–150, 1990. [Google Scholar] [Crossref]
6.
N. N. Ndoh and N. J. Ashford, “Evaluation of transportation level of service using fuzzy sets,” Transp. Res. Rec., vol. 1461, pp. 31–37, 1994. [Google Scholar]
7.
J. Xu, S. C. Wong, H. Yang, and C. Tong, “Modeling level of urban taxi services using neural network,” J. Transp. Eng., vol. 125, no. 3, pp. 216–223, 1999. [Google Scholar] [Crossref]
8.
D. Lee, T. Kim, and M. T. Pietrucha, “Incorporation of transportation user perception into evaluation of service quality of signalized intersections,” Transp. Res. Rec., vol. 2027, no. 1, pp. 9–18, 2007. [Google Scholar] [Crossref]
9.
S. B. Pattnaik and K. Ramesh Kumarb, “Level of service of urban roads based on users’ perception,” Civ. Eng. Syst., vol. 14, no. 2, pp. 87–110, 1996. [Google Scholar] [Crossref]
10.
D. Basu, S. R. Maitra, and B. Maitra, “Modelling passenger car equivalency at an urban midblock using stream speed as measure of equivalence,” Eur. Transp., vol. 34, pp. 75–87, 2006. [Google Scholar]
11.
E. Cicek, M. Akin, F. Uysal, and R. T. Aytas, “Comparison of traffic accident injury severity prediction models with explainable machine learning,” Transp. Lett., vol. 15, no. 9, pp. 1043–1054, 2023. [Google Scholar] [Crossref]
12.
T. Baykal, F. Ergezer, E. Eriskin, and S. Terzi, “Impact of meteorological factors on asphalt pavement surface temperatures: a machine learning approach,” J. Civ. Hydraul. Eng., vol. 2, no. 2, pp. 100–108, 2024. [Google Scholar] [Crossref]
13.
A. Gupta, S. Gowda, A. Tiwari, and A. K. Gupta, “XGBoost-SHAP framework for asphalt pavement condition evaluation,” Constr. Build. Mater., vol. 426, p. 136182, 2024. [Google Scholar] [Crossref]
14.
F. Zhang, A. C. Falchetto, D. Wang, Z. Li, Y. Sun, and W. Lin, “Prediction of asphalt rheological properties for paving and maintenance assistance using explainable machine learning,” Fuel, vol. 396, p. 135319, 2025. [Google Scholar] [Crossref]
15.
S. Dong, A. Khattak, I. Ullah, J. Zhou, and A. Hussain, “Predicting and analyzing road traffic injury severity using boosting-based ensemble learning models with SHAPley additive exPlanations,” Int. J. Environ. Res. Public Health, vol. 19, no. 5, p. 2925, 2022. [Google Scholar] [Crossref]
16.
Y. Kang and A. J. Khattak, “Deep learning model for crash injury severity analysis using Shapley additive explanation values,” Transp. Res. Rec., vol. 2676, no. 12, pp. 242–254, 2022. [Google Scholar] [Crossref]
17.
C. Panda, A. K. Mishra, A. K. Dash, and H. Nawab, “Predicting and explaining severity of road accident using artificial intelligence techniques, SHAP and feature analysis,” Int. J. Crashworthiness, vol. 28, no. 2, pp. 186–201, 2022. [Google Scholar] [Crossref]
18.
M. Biswal and P. K. Bhuyan, “Shapley additive explanation method for assessing motorized two-wheeler level of service at signalized intersections,” in Proceedings Urban Mobility India. Kochi, India, pp. 381–389, 2022. [Google Scholar] [Crossref]
19.
J. Park, Z. Chen, L. Kiliaris, M. L. Kuang, M. A. Masrur, A. M. Phillips, and Y. L. Murphey, “Intelligent vehicle power control based on machine learning of optimal control parameters and prediction of road type and traffic congestion,” IEEE Trans. Veh. Technol., vol. 58, no. 9, pp. 4741–4756, 2009. [Google Scholar] [Crossref]
20.
X. Yin, G. Wu, J. Wei, Y. Shen, H. Qi, and B. Yin, “Deep learning on traffic prediction: methods, analysis, and future directions,” IEEE Trans. Intell. Transp. Syst., vol. 23, no. 6, pp. 4927–4943, 2021. [Google Scholar] [Crossref]
21.
E. Çiçek, T. Ozdemir, O. Kaplan, T. Yusel, and M. Punar, “Investigation of pedestrian and vehicle level of service regulation for Hacettepe Sıhhiye campus,” J. Innov. Transp., vol. 5, no. 1, pp. 1–7, 2024. [Google Scholar] [Crossref]
22.
J. Kaur, M. A. Khan, M. Iftikhar, M. Imran, and Q. E. U. Haq, “Machine learning techniques for 5G and beyond,” IEEE Access, vol. 9, pp. 23472–23488, 2021. [Google Scholar] [Crossref]
23.
M. Elbadawi, S. Gaisford, and A. W. Basit, “Advanced machine-learning techniques in drug discovery,” Drug Discov. Today, vol. 26, no. 3, pp. 769–777, 2021. [Google Scholar] [Crossref]
24.
D. Shah, S. Patel, and S. K. Bharti, “Heart disease prediction using machine learning techniques,” SN Comput. Sci., vol. 1, no. 6, pp. 1–6, 2020. [Google Scholar] [Crossref]
25.
S. K. S. Durai and M. D. Shamili, “Smart farming using machine learning and deep learning techniques,” Decis. Anal. J., vol. 3, p. 100041, 2022. [Google Scholar] [Crossref]
26.
C. Z. Basha, N. Bhavana, P. Bhavya, and S. V, “Rainfall prediction using machine learning & deep learning techniques,” in 2020 International Conference on Electronics and Sustainable Communication Systems (ICESC). Coimbatore, India, 2020. [Google Scholar] [Crossref]
27.
F. Ergezer, “AI-based prediction of optimum binder content in asphalt mixtures using machine learning–genetic algorithm hybrid modeling,” Int. J. Pavement Res. Technol., pp. 1–15, 2026. [Google Scholar] [Crossref]
28.
F. Zantalis, G. Koulouras, S. Karabetsos, and D. Kandris, “A review of machine learning and IoT in smart transportation,” Future Internet, vol. 11, no. 4, p. 94, 2019. [Google Scholar] [Crossref]
29.
M. Bansal, A. Goyal, and A. Choudhary, “A comparative analysis of K-Nearest Neighbor, Genetic, Support Vector Machine, Decision Tree, and Long Short Term Memory algorithms in machine learning,” Decis. Anal. J., vol. 3, p. 100071, 2022. [Google Scholar] [Crossref]
30.
Z. Zhang, “Introduction to machine learning: k-nearest neighbors,” Ann. Transl. Med., vol. 4, no. 11, p. 218, 2016. [Google Scholar] [Crossref]
31.
G. E. A. P. A. Batista and D. F. Silva, “How k-nearest neighbor parameters affect its performance,” in Anales JAIIO. Mar del Plata: SADIO., pp. 1–12, 2009. [Google Scholar]
32.
N. Garcia-Pedrajas, J. A. R. del Castillo, and G. Cerruela-Garcia, “A proposal for local k values for k-nearest neighbor rule,” IEEE Trans. Neural Networks Learn. Syst., vol. 28, no. 2, pp. 470–475, 2015. [Google Scholar] [Crossref]
33.
A. X. Wang, S. S. Chukova, and B. P. Nguyen, “Ensemble k-nearest neighbors based on centroid displacement,” Inf. Sci., vol. 629, pp. 313–323, 2023. [Google Scholar] [Crossref]
34.
S. Nayak, M. Bhat, N. V. S. Reddy, and B. Ashwath Rao, “Study of distance metrics on k-nearest neighbor algorithm for star categorization,” J. Phys.: Conf. Ser., vol. 2161, p. 012004, 2022. [Google Scholar] [Crossref]
35.
R. K. Halder, M. N. Uddin, A. Uddin, S. Aryal, and A. Khraisat, “Enhancing K-nearest neighbor algorithm: a comprehensive review and performance analysis of modifications,” J. Big Data, vol. 11, no. 1, pp. 1–55, 2024. [Google Scholar] [Crossref]
36.
W. D. Yang, Z. Z. Lou, and B. Ji, “A multi-factor analysis model of quantitative investment based on GA and SVM,” in 2017 2nd International Conference on Image, Vision and Computing (ICIVC). Chengdu, China, pp. 1152–1155, 2017. [Google Scholar] [Crossref]
37.
J. Cervantes, F. Garcia-Lamont, L. Rodríguez-Mazahua, and A. Lopez, “A comprehensive survey on support vector machine classification: applications, challenges and trends,” Neurocomputing, vol. 408, pp. 189–215, 2020. [Google Scholar] [Crossref]
38.
S. Chidambaram and K. G. Srinivasagan, “Performance evaluation of support vector machine classification approaches in data mining,” Cluster Comput., vol. 22, no. S1, pp. 189–196, 2018. [Google Scholar] [Crossref]
39.
S. Chen, J. Ren, Y. Yan, M. Sun, F. Hu, and H. Zhao, “Multi-sourced sensing and support vector machine classification for effective detection of fire hazard in early stage,” Comput. Electr. Eng., vol. 101, p. 108046, 2022. [Google Scholar] [Crossref]
40.
M. Barstuğan and R. Ceylan, “The effect of dictionary learning on weight update of AdaBoost and ECG classification,” J. King Saud Univ. Comput. Inf. Sci., vol. 32, no. 10, pp. 1149–1157, 2020. [Google Scholar] [Crossref]
41.
S. Wang, W. Liu, S. Yang, and H. Huang, “An optimized AdaBoost algorithm with atherosclerosis diagnostic applications: adaptive weight-adjustable boosting,” J. Supercomput., vol. 80, no. 9, pp. 13187–13216, 2024. [Google Scholar] [Crossref]
42.
E. Sevinç, “An empowered AdaBoost algorithm implementation: A COVID-19 dataset study,” Comput. Ind. Eng., vol. 165, p. 107912, 2022. [Google Scholar] [Crossref]
43.
R. Natras, B. Soja, and M. Schmidt, “Ensemble machine learning of Random Forest, AdaBoost and XGBoost for vertical total electron content forecasting,” Remote Sens., vol. 14, no. 15, p. 3547, 2022. [Google Scholar] [Crossref]
44.
L. H. Li, W. P. Jing, and H. H. Wang, “Extracting the forest type from remote sensing images by random forest,” IEEE Sensors J., vol. 21, no. 16, pp. 17447–17454, 2020. [Google Scholar] [Crossref]
45.
R. Iranzad and X. Liu, “A review of random forest-based feature selection methods for data science education and applications,” Int. J. Data Sci. Anal., vol. 20, no. 2, pp. 197–211, 2024. [Google Scholar] [Crossref]
46.
R. Valavi, J. Elith, J. J. Lahoz-Monfort, and G. Guillera-Arroita, “Modelling species presence-only data with random forests,” Ecography, vol. 44, no. 12, pp. 1731–1742, 2021. [Google Scholar] [Crossref]
47.
H. A. Salman, A. Kalakech, and A. Steiti, “Random forest algorithm overview,” Babylonian J. Mach. Learn., vol. 2024, pp. 69–79, 2024. [Google Scholar] [Crossref]
48.
X. Jiang and C. Xu, “Deep learning and machine learning with grid search to predict later occurrence of breast cancer metastasis using clinical data,” J. Clin. Med., vol. 11, no. 19, p. 5772, 2022. [Google Scholar] [Crossref]
49.
T. Yan, S. Shen, A. Zhou, and X. Chen, “Prediction of geological characteristics from shield operational parameters by integrating grid search and K-fold cross validation into stacking classification algorithm,” J. Rock Mech. Geotech. Eng., vol. 14, no. 4, pp. 1292–1303, 2022. [Google Scholar] [Crossref]
50.
K. P. M. Kannangara, W. Zhou, Z. Ding, and Z. Hong, “Investigation of feature contribution to shield tunneling-induced settlement using Shapley additive explanations method,” J. Rock Mech. Geotech. Eng., vol. 14, no. 4, pp. 1052–1063, 2022. [Google Scholar] [Crossref]
51.
S. M. Lundberg and S. I. Lee, “A unified approach to interpreting model predictions,” in Advances in Neural Information Processing Systems. Curran Associates, Inc., 2017. [Online]. Available: https://proceedings.neurips.cc/paper_files/paper/2017/file/8a20a8621978632d76c43dfd28b67767-Paper.pdf [Google Scholar]
52.
H. Sahlaoui, E. A. A. Alaoui, A. Nayyar, S. Agoujil, and M. M. Jaber, “Predicting and interpreting student performance using ensemble models and Shapley additive explanations,” IEEE Access, vol. 9, pp. 152688–152703, 2021. [Google Scholar] [Crossref]
53.
A. C. Kelle and H. Yüce, “MQTT Trafiğinde DoS Saldırılarının Makine Öğrenmesi ile Sınıflandırılması ve Modelin SHAP ile Yorumlanması,” J. Mater. Mechatron. A, vol. 3, no. 1, pp. 50–62, 2022. [Google Scholar] [Crossref]
54.
I. Ullah, K. Liu, T. Yamamoto, M. Zahid, and A. Jamal, “Prediction of electric vehicle charging duration time using ensemble machine learning algorithm and Shapley additive explanations,” Int. J. Energy Res., vol. 46, no. 11, pp. 15211–15230, 2022. [Google Scholar] [Crossref]
55.
L. Antwarg, R. M. Miller, B. Shapira, and L. Rokach, “Explaining anomalies detected by autoencoders using Shapley additive explanations,” Expert Syst. Appl., vol. 186, p. 115736, 2021. [Google Scholar] [Crossref]
56.
S. Kumari, D. Kumar, and M. Mittal, “An ensemble approach for classification and prediction of diabetes mellitus using soft voting classifier,” Int. J. Cognit. Comput. Eng., vol. 2, pp. 40–46, 2021. [Google Scholar] [Crossref]
57.
M. Sokolova and G. Lapalme, “A systematic analysis of performance measures for classification tasks,” Inf. Process. Manag., vol. 45, no. 4, pp. 427–437, 2009. [Google Scholar] [Crossref]
58.
V. N. G. Raju, K. P. Lakshmi, V. M. Jain, A. Kalidindi, and V. Padma, “Study the influence of normalization/transformation process on the accuracy of supervised classification,” in 2020 Third International Conference on Smart Systems and Inventive Technology (ICSSIT). Tirunelveli, India, pp. 729–735, 2020. [Google Scholar] [Crossref]
59.
N. G. Sorboni, J. Wang, and M. R. Najafi, “Fusion of Google Street View, LiDAR, and orthophoto classifications using ranking classes based on F1 score for building land-use type detection,” Remote Sens., vol. 16, no. 11, p. 2011, 2024. [Google Scholar] [Crossref]
60.
A. S. Kolesnyk and N. F. Khairova, “Justification for the use of Cohen’s kappa statistic in experimental studies of NLP and text mining,” Cybern. Syst. Anal., vol. 58, no. 2, pp. 280–288, 2022. [Google Scholar] [Crossref]
61.
A. Ben-David, “About the relationship between ROC curves and Cohen’s kappa,” Eng. Appl. Artif. Intell., vol. 21, no. 6, pp. 874–882, 2008. [Google Scholar] [Crossref]
62.
M. L. McHugh, “Interrater reliability: the kappa statistic,” Biochem. Med., vol. 22, no. 3, pp. 276–282, 2012. [Google Scholar] [Crossref]
63.
Z. H. Hoo, J. Candlish, and D. Teare, “What is an ROC curve?,” Emerg. Med. J., vol. 34, no. 6, pp. 357–359, 2017. [Google Scholar] [Crossref]
64.
J. Miao and W. Zhu, “Precision–recall curve (PRC) classification trees,” Evol. Intell., vol. 15, no. 3, pp. 1545–1569, 2021. [Google Scholar] [Crossref]
65.
J. F. Salgado, “Transforming the area under the normal curve (AUC) into Cohen’s d, Pearson’s r pb, odds-ratio, and natural log odds-ratio: two conversion tables,” Eur. J. Psychol. Appl. Leg. Context, vol. 10, no. 1, pp. 35–47, 2018. [Google Scholar] [Crossref]
66.
A. M. Carrington, D. G. Manuel, P. W. Fieguth, T. Ramsay, V. Osmani, B. Wernly, C. Bennett, S. Hawken, O. Magwood, Y. Sheikh, M. McInnes, and A. Holzinger, “Deep ROC analysis and AUC as balanced average accuracy, for improved classifier selection, audit and explanation,” IEEE Trans. Pattern Anal. Mach. Intell., vol. 45, no. 1, pp. 329–341, 2022. [Google Scholar] [Crossref]
67.
A. J. Bowers and X. Zhou, “Receiver operating characteristic (ROC) area under the curve (AUC): a diagnostic measure for evaluating the accuracy of predictors of education outcomes,” J. Educ. Stud. Placed Risk, vol. 24, no. 1, pp. 20–46, 2019. [Google Scholar] [Crossref]
68.
A. M. Borges, J. Kuang, H. Milhorn, and R. Yi, “An alternative approach to calculating area-under-the-curve (AUC) in delay discounting research,” J. Exp. Anal. Behav., vol. 106, no. 2, pp. 145–155, 2016. [Google Scholar] [Crossref]
69.
T. Le, H. Kim, H. Kang, and H. Kim, “Classification and explanation for intrusion detection system based on ensemble trees and SHAP method,” Sensors, vol. 22, no. 3, p. 1154, 2022. [Google Scholar] [Crossref]
70.
Z. Deng, X. Zhu, D. Cheng, M. Zong, and S. Zhang, “Efficient kNN classification algorithm for big data,” Neurocomputing, vol. 195, pp. 143–148, 2016. [Google Scholar] [Crossref]
71.
F. Tarakci and I. A. Ozkan, “Comparison of classification performance of kNN and WKNN algorithms,” Selcuk Univ. J. Eng. Sci., vol. 20, no. 2, pp. 32–37, 2021. [Google Scholar]
72.
A. Koushik, M. Manoj, and N. Nezamuddin, “SHapley additive exPlanations for explaining artificial neural network based mode choice models,” Transp. Dev. Econ., vol. 10, no. 1, pp. 1–11, 2024. [Google Scholar] [Crossref]

Cite this:
APA Style
IEEE Style
BibTex Style
MLA Style
Chicago Style
GB-T-7714-2015
Cicek, E., Ergezer, F., Baykal, T., Eriskin, E., & Terzi, S. (2026). Machine Learning-Based Road Level-of-Service Classification Using K-Nearest Neighbours and Shapley Additive Explanations Analysis. J. Civ. Hydraul. Eng., 4(2), 83-97. https://doi.org/10.56578/jche040203
E. Cicek, F. Ergezer, T. Baykal, E. Eriskin, and S. Terzi, "Machine Learning-Based Road Level-of-Service Classification Using K-Nearest Neighbours and Shapley Additive Explanations Analysis," J. Civ. Hydraul. Eng., vol. 4, no. 2, pp. 83-97, 2026. https://doi.org/10.56578/jche040203
@research-article{Cicek2026MachineLR,
title={Machine Learning-Based Road Level-of-Service Classification Using K-Nearest Neighbours and Shapley Additive Explanations Analysis},
author={Elif Cicek and Fatih Ergezer and Tahsin Baykal and Ekinhan Eriskin and Serdal Terzi},
journal={Journal of Civil and Hydraulic Engineering},
year={2026},
page={83-97},
doi={https://doi.org/10.56578/jche040203}
}
Elif Cicek, et al. "Machine Learning-Based Road Level-of-Service Classification Using K-Nearest Neighbours and Shapley Additive Explanations Analysis." Journal of Civil and Hydraulic Engineering, v 4, pp 83-97. doi: https://doi.org/10.56578/jche040203
Elif Cicek, Fatih Ergezer, Tahsin Baykal, Ekinhan Eriskin and Serdal Terzi. "Machine Learning-Based Road Level-of-Service Classification Using K-Nearest Neighbours and Shapley Additive Explanations Analysis." Journal of Civil and Hydraulic Engineering, 4, (2026): 83-97. doi: https://doi.org/10.56578/jche040203
CICEK E, ERGEZER F, BAYKAL T, et al. Machine Learning-Based Road Level-of-Service Classification Using K-Nearest Neighbours and Shapley Additive Explanations Analysis[J]. Journal of Civil and Hydraulic Engineering, 2026, 4(2): 83-97. https://doi.org/10.56578/jche040203
cc
©2026 by the author(s). Published by Acadlore Publishing Services Limited, Hong Kong. This article is available for free download and can be reused and cited, provided that the original published version is credited, under the CC BY 4.0 license.