Intelligent Traffic Forecasting System Using Machine Learning Algorithms: A Comparative Study of Random Forest and Linear Regression Models
DOI:
https://doi.org/10.47392/IRJAEH.2026.0522Keywords:
Traffic Flow Prediction, Random Forest, Linear Regression, Machine Learning, Intelligent Transportation Systems, Feature Engineering, Urban Congestion, Smart CityAbstract
Urban traffic congestion represents one of the most pressing challenges facing modern smart city infrastructure, imposing substantial economic, environmental, and social costs. This paper presents an Intelligent Traffic Forecasting System (ITFS) that employs supervised machine learning algorithms—specifically Random Forest (RF) and Linear Regression (LR)—to predict short-term traffic flow and congestion levels with high accuracy. The proposed system was evaluated on a publicly available urban traffic dataset comprising over 48,000 temporal records with features including vehicle count, speed, time-of-day, day-of-week, and road segment identifiers, spanning a twelve-month observation window. A rigorous preprocessing pipeline incorporating missing value imputation, outlier detection via the Interquartile Range (IQR) method, Min-Max normalization, and temporal feature extraction was applied prior to model training. The Random Forest model achieved a Mean Absolute Error (MAE) of 8.34, Root Mean Square Error (RMSE) of 11.27, Mean Absolute Percentage Error (MAPE) of 6.82%, and an R² score of 0.9431, outperforming Linear Regression across all evaluation metrics. The principal contributions of this work are: (i) a systematic comparative analysis of ensemble versus parametric learning models for traffic forecasting; (ii) a comprehensive feature engineering framework that captures both cyclical temporal patterns and spatial road attributes; and (iii) an end-to-end deployable forecasting pipeline validated against real-world urban traffic data. Experimental results confirm that the proposed ITFS provides reliable, actionable predictions suitable for integration into adaptive traffic signal control and intelligent route guidance systems.
Downloads
Downloads
Published
Issue
Section
License
Copyright (c) 2026 International Research Journal on Advanced Engineering Hub (IRJAEH)

This work is licensed under a Creative Commons Attribution-NonCommercial 4.0 International License.
.