p PREDIKSI KEPADATAN LALU LINTAS MENGGUNAKAN RANDOM FOREST (STUDI KASUS JALAN TOL SEMARANG DEMAK)
Abstract
Traffic jams are a serious problem in big cities, including on the Semarang-Demak Highway. Increased vehicle volumes, illegal parking, and lack of use of public transportation exacerbate this situation. This research aims to predict traffic density using the Random Forest model, considering that this model can handle data with many variables and provide stable results. The dataset used includes 120 rows of traffic volume data from January to April 2024. The methods applied include data collection, preprocessing, model training, and evaluation. Data were cleaned of missing values and outliers and normalized before being divided into 80% for training and 20% for testing. The evaluation results show that the Random Forest model has a mean square error (MSE) value on the training data of 486235 and a root mean square error (RMSE) of 697, with a coefficient of determination (R2) of 0.9639. However, on the test data, the MSE increases to 4104797, RMSE 2026, and R² 0.6167, which indicates potential overfitting. Overall, the Random Forest model shows good performance in predicting the number of vehicles but needs further optimization to increase accuracy on test data. It is hoped that this research will provide insights for better traffic planning in the future.