logo

Exploring commuter stress dynamics through machine learning and double optimization

Authors

DOI:

https://doi.org/10.22581/muet1982.0062

Keywords:

Double optimization, Imbalanced dataset, Machine learning, stress, SHAP, Road safety

Abstract

Travel dynamics significantly impact commuter stress, influenced by traffic behavior, road conditions, travel modes, distance, and socio-demographic characteristics. Previous research on travel stress often exhibits limitations, including narrow scopes focusing on specific routes, vehicle types, or demographics. This study addresses these constraints by employing a comprehensive approach to analyze the influence of various travel attributes on commuter stress levels. An interview-based dataset was collected to capture the multifaceted experiences of road users. Five tree-based machine learning models–Decision Tree (DT), Random Forests (RF), Extra Trees (ET), Extreme Gradient Boosting (XGBoost), and k-Nearest Neighbor (k-NN)–were deployed for imbalanced multi-class classification. XGBoost demonstrated superior performance with the highest accuracy (73.33%) and precision (75.63%) with a standard deviation of ±5.9. A novel double hyperparameter optimization technique enhanced the prediction accuracy across all models, notably increasing the k-NN classifier’s accuracy to 19.99%. The SHAP (SHapley Additive exPlanations) method was utilized for model interpretability, revealing distance traveled per day as the most influential factor across stress levels, followed by mode of transport, gender, and age for low, medium, and high-stress categories, respectively. The study also examines the impact of features on individual commuter stress levels through random instance selection. This research provides valuable insights into the complex interplay between travel attributes and commuter stress, paving the way for the development of effective stress mitigation strategies and improved travel experiences for all road users.

Downloads

Download data is not yet available.

Author Biographies

  • Ashar Ahmed, NED University of Engineering and Technology

    Dr. Ashar Ahmed is Assistant Professor in the Department of Urban and Infrastructure Engineering, NED University of Engineering and Technology. He obtained his PhD from Universiti Sains Malaysia in 2016 and has been actively involved in research in Transportation engineering since then. He has published in JCR Q1 journals like Accident Analysis and Prevention and Transportation Research Part F.

  • Mario Muñoz-Organero, Carlos III University of Madrid

    Mario Muñoz-Organero received the M.Sc. degree in telecommunications engineering from the Polytechnic University of Catalonia, Barcelona, Spain, in 1996, and the Ph.D. degree in telecommunications engineering from the Carlos III University of Madrid, Leganes, Spain, in 2004.
    He is a full Professor in Telematics Engineering at the Carlos III University of Madrid. His main current research interests are in machine learning, deep learning, human activity recognition, health applications enhanced by machine learning, pervasive learning, personal recommender systems, mobile distributed and service oriented technologies and architectures, information systems, artificial intelligence, smart environments, adaptive systems and applications for the Internet of Things. He has participated as principal investigator in several regional, national and international funded research projects such as "ANALISIS EN TIEMPO REAL DE SENSORES SOCIALES Y ESTIMACION DE RECURSOS PARA TRANSPORTE MULTIMODAL BASADA EN APRENDIZAJE PROFUNDO" MaGIST-RALES), funded by the Spanish Agencia Estatal de Investigación (AEI, doi 10.13039/501100011033) under grant PID2019-105221RB-C44, "ANALYTICS USING SENSOR DATA FOR FLATCITY" TIN2016-77158-C4-1-R, HERMES-SMARTDRIVER - TIN2013-46801-C4-2-R, TUD COST Action TU1305 - Social networks and travel behaviourthe Spanish funded OSAMI project (TSI-020400-2009-92), the EU FP7 funded GEEWHEZ project (FP7/2007-2013) under grant agreement n° 286533, the Spanish funded project “HAUS. Hogar digital y contenidos Audiovisuales adaptados a los USuarios” IPT-2011-1049-430000 or the Spanish funded project “ARTEMISA Arquitectura para la eficiencia energética y sostenibilidad en ambientes inteligentes” TIN2009-14378-C02-02, inside the Carlos III University of Madrid. He has published over 100 articles in national and international conferences and journals.”

  • Bushra Aijaz, Independent Researcher

    Bushra Aijaz is Master of Engineering in Industrial Electronic. She has been serving as an academician and researcher since 2012 in the field of Electrical Engineering and Machine Learning. 

References

Britannica, “Karachi, Pakistan”, Accessed: Dec. 03, 2024. Available at: https://www.britannica.com/place/Karachi.

Worldometer, “Largest cities in the world”, Accessed: Dec. 03, 2024. Available at: https://www.worldometers.info/population/largest-cities-in-the-world/.

M. Welde and E. Tveter, “The wider local impacts of new roads: A case study of 10 projects”, Transport Policy, vol. 115, pp. 164–180, 2022, doi: 10.1016/j.tranpol.2021.11.012.

R. Mushtaq and O. Hashmi, “Traffic congestion and prevalence of mental and physical health issues in Karachi, Pakistan”, Journal of Psychology, vol. 53, no. 02, pp. 15–24, 2022.

V. C. Magaña, M. M. Organero, J. A. Fisteus, and L. S. Fernández, “Estimating the stress for drivers and passengers using deep learning”, Proceedings of “JARCA 2016”, Almería, Spain, 2016, pp. 1–6.

M. A. Conceição, M. M. Monteiro, D. Kasraian, P. van den Berg, S. Haustein, I. Alves, C. L. Azevedo, and B. Miranda, “The effect of transport infrastructure, congestion, and reliability on mental wellbeing: a systematic review of empirical studies”, Transport Reviews, vol. 43, no. 2, pp. 264–302, 2023, doi: 10.1080/01441647.2022.2100943.

A. Ahmed and B. Aijaz, “A Case Study on the Potential Applications of V2V Communication for Improving Road Safety in Pakistan”, Engineering Proceedings, vol. 32, no. 1, p. 17, Karachi, Pakistan, 2023, doi: 10.3390/engproc2023032017.

S. Mirza, M. Pervaiz, and N. Khatoon, “Stress-inducing factors among occupational drivers in Karachi, Pakistan”, Eastern Mediterranean Health Journal, vol. 26, no. 10, pp. 1233–1241, 2020, doi: 10.26719/emhj.20.059.

S. Zhong, X. Fu, W. Lu, F. Tang, and Y. Lu, “An expressway driving stress prediction model based on vehicle, road, and environment features”, IEEE Access, vol. 10, pp. 57212–57226, 2022, doi: 10.1109/ACCESS.2022.3165570.

G. Gottholmseder, K. Nowotny, G. J. Pruckner, and E. Theurl, “Stress perception and commuting”, Health Economics, vol. 18, no. 5, pp. 559–576, 2009, doi: 10.1002/hec.1389. DOI: https://doi.org/10.1002/hec.1389

A. Legrain, N. Eluru, and A. M. El-Geneidy, “Am stressed, must travel: The relationship between mode choice and commuting stress”, Transportation Research Part F: Traffic Psychology and Behaviour, vol. 34, pp. 141–151, 2015, doi: 10.1016/j.trf.2015.08.001. DOI: https://doi.org/10.1016/j.trf.2015.08.001

S. M. A. Jahangeer, N. Hasnain, M. T. Tariq, A. Jamil, S. Y. Zia, and W. Amir, “Frequency and association of stress levels with modes of commuting among medical students of a developing country”, Malaysian Journal of Medical Sciences, vol. 28, pp. 113–122, 2021, doi: 10.21315/mjms2021.28.4.12.

D. Ettema, M. Friman, T. Garling, and L. E. Olsson, “Travel mode use, travel mode shift, and subjective well-being: Overview of theories, empirical findings and policy implications”, Mobility, Sociability and Wellbeing of Urban Living, D. Wang and S. He, Eds. Berlin, Heidelberg: Springer, 2016, pp. 129–150. ISBN: 978-3-662-48184-4. DOI: https://doi.org/10.1007/978-3-662-48184-4_7

V. Singh, K. Gupta, A. Agarwal, and N. Chakrabarty, “Psychological impacts on the travel behaviour post COVID-19”, Asian Transport Studies, vol. 8, p. 100087, 2022, doi: 10.1016/j.eastsj.2022.100087.

M. C. I. van Schalkwyk and J. S. Mindell, “Current issues in the impacts of transport on health”, British Medical Bulletin, vol. 125, no. 1, pp. 67–77, 2018, doi: 10.1093/bmb/ldx048. DOI: https://doi.org/10.1093/bmb/ldx048

L. Montoro, S. Useche, F. Alonso, and B. Cendales, “Work environment, stress, and driving anger: A structural equation model for predicting traffic sanctions of public transport drivers”, International Journal of Environmental Research and Public Health, vol. 15, no. 3, p. 497, 2018, doi: 10.3390/ijerph15030497. DOI: https://doi.org/10.3390/ijerph15030497

N. A. Mohammad, “Stress and anxiety on the road: The silent victims and their sufferings”, Journal of Advanced Vehicle System, vol. 13, no. 1, pp. 57–69, 2022.

W. Wei, X. Fu, S. Zhong, and H. Ge, “Driver's mental workload classification using physiological, traffic flow, and environmental factors”, Transportation Research Part F: Traffic Psychology and Behaviour, vol. 94, pp. 151–169, 2023, doi: 10.1016/j.trf.2023.02.004.

M. Kavitha, M. Pingili, M. Spurthi, S. K. Fayaz, K. Kirthan, and S. Santhosh, “Classification algorithms based mental health prediction using data mining”, Turkish Journal of Computer and Mathematics Education, vol. 13, no. 2, pp. 1168–1175, 2020, doi: 10.17762/turcomat.v13i2.13708.

V. Dham, K. Rai, and U. Soni, “Mental stress detection using artificial intelligence models”, Journal of Physics: Conference Series, vol. 1950, p. 012047, 2021, doi: 10.1088/1742-6596/1950/1/012047.

C. Ding, Y. Zhang, and T. Ding, “A systematic hybrid machine learning approach for stress prediction”, PeerJ Computer Science, vol. 9, p. e1154, 2023, doi: 10.7717/peerj-cs.1154.

Y. Meng, N. Yang, Z. Qian, and G. Zhang, “What makes an online review more helpful: An interpretation framework using XGBoost and SHAP values”, Journal of Theoretical and Applied Electronic Commerce Research, vol. 16, no. 3, pp. 466–490, 2020, doi: 10.3390/jtaer16030029.

Y. Xue, “An overview of overfitting and its solutions”, Journal of Physics: Conference Series, vol. 1168, no. 2, p. 022022, 2019, doi: 10.1088/1742-6596/1168/2/022022.

M. U. Abdulazeez, W. Khan, and K. A. Abdullah, “Predicting child occupant crash injury severity in the United Arab Emirates using machine learning models for the imbalanced dataset”, IATSS Research, vol. 47, no. 2, pp. 134–159, 2023, doi: 10.1016/j.iatssr.2023.05.003.

S. Devlin, C. Singh, W. J. Murdoch, and B. Yu, “Disentangled attribution curves for interpreting random forests and boosted trees”, Machine Learning, 2019, doi: 10.48550/arXiv.1905.07631.

S. M. Lundberg and S.-I. Lee, “A unified approach to interpreting model predictions”, Advances in Neural Information Processing Systems, vol. 30, 2017.

M. T. Kashifi, “Investigating two-wheeler risk factors for severe crashes using an interpretable machine learning approach and SHAP analysis”, IATSS Research, vol. 47, no. 3, pp. 357–371, 2023, doi: 10.1016/j.iatssr.2023.07.005.

S. M. Lundberg, G. G. Erion, and S.-I. Lee, “Consistent individualized feature attribution for tree ensembles”, ArXiv, vol. abs/1802.03888, 2018.

G. M. Sullivan and A. R. Artino Jr., “Analyzing and interpreting data from Likert-type scales”, Journal of Graduate Medical Education, vol. 5, pp. 541–542, 2013, doi: 10.4300/JGME-5-4-18. DOI: https://doi.org/10.4300/JGME-5-4-18

T. Shimazaki and M. Rahman, “Physical characteristics of paratransit in developing countries of Asia”, Journal of Advanced Transportation, vol. 30, no. 2, pp. 5–24, 1996, doi: 10.1002/atr.5670300203. DOI: https://doi.org/10.1002/atr.5670300203

M. McCaffery and A. Beebe, Pain: Clinical Manual for Nursing Practice. Mosby, 1989.

S. M. Saqib, T. Mazhar, M. Iqbal, T. Shahazad, A. Almogren, A. U. Rehman, et al., “Enhancing electricity theft detection with ADASYN-enhanced machine learning models”, Electrical Engineering, 2025/03/23 2025. doi: 10.1007/s00202-025-03044-4.

E. Bartz, T. Bartz-Beielstein, M. Zaefferer, and O. Mersmann, Hyperparameter Tuning for Machine and Deep Learning with R., 2023.

L. Breiman, “Random forests”, Machine Learning, vol. 45, no. 1, pp. 5–32, 2001, doi: 10.1023/A:1010933404324. DOI: https://doi.org/10.1023/A:1010933404324

P. Geurts, D. Ernst, and L. Wehenkel, “Extremely randomized trees”, Machine Learning, vol. 63, pp. 3–42, 2006, doi: 10.1007/s10994-006-6226-1. DOI: https://doi.org/10.1007/s10994-006-6226-1

T. Chen and C. Guestrin, “XGBoost: A scalable tree boosting system”, Proceedings of the 22nd ACM SIGKDD International Conference on Knowledge Discovery and Data Mining, 2016, pp. 785–794, USA, 2016, ISBN 9781450342322. DOI: https://doi.org/10.1145/2939672.2939785

D. W. Aha, D. Kibler, and M. K. Albert, “Instance-based learning algorithm”, Machine Learning, vol. 6, pp. 37–66, 1991, doi: 10.1007/BF00153759. DOI: https://doi.org/10.1007/BF00153759

L. S. Shapley, “A value for n-person games”, Contributions to the Theory of Games II, H. W. Kuhn and A. Tucker, Eds. Princeton: Princeton University Press, 1953, pp. 69–79.

L. Li, X. Pan, H. Yang, T. Zhang, and Z. Liu, “Supervised dictionary learning with regularization for near-infrared spectroscopy classification”, IEEE Access, vol. 7, pp. 100923–100932, 2019, doi: 10.1109/ACCESS.2019.2930288.

K. Chatterjee, S. Chng, B. Clark, A. Davis, J. De Vos, D. Ettema, S. Handy, A. Martin, and L. Reardon, “Commuting and wellbeing: a critical overview of the literature with implications for policy and future research”, Transport Reviews, vol. 40, no. 1, pp. 5–34, 2020, doi: 10.1080/01441647.2019.1649317.

F. Rahman, Md. A. Islam, and Md. Hadiuzzaman, “Paratransit service quality modeling reflecting users' perception: A case study in Dhaka, Bangladesh”, IATSS Research, vol. 47, no. 3, pp. 335–348, 2023, doi: 10.1016/j.iatssr.2023.07.001.

M. Harikha, J. C. Kimmel, M. Abdelsalam, and M. Gupta, “Analyzing and explaining black-box models for online malware detection”, IEEE Access, vol. 11, pp. 25237–25252, 2023, doi: 10.1109/ACCESS.2023.3255176.

Downloads

Published

2025-04-09

How to Cite

Exploring commuter stress dynamics through machine learning and double optimization. (2025). Mehran University Research Journal of Engineering and Technology, 44(2), 35-46. https://doi.org/10.22581/muet1982.0062