The growth of transportation data has created opportunities to leverage machine learning for supporting decision-making in public transportation services. However, research on classifying intercity bus service class preferences during the Eid al-Fitr homecoming (Mudik) period remains relatively limited. This study aims to analyze and classify passengers’ service class preferences using the Random Forest and XGBoost algorithms. The dataset consists of 3,942 passenger records collected from six intercity bus companies during the period of March 1–31, 2026. The features used include the relative day to Eid al-Fitr, weekend category, destination region, payment status, and bus company. The data were processed through data cleaning, feature engineering, exploratory data analysis, and machine learning modeling. The results indicate that the Random Forest algorithm achieved the best performance with an accuracy of 79.21%, slightly outperforming XGBoost, which achieved an accuracy of 78.96%. Feature importance analysis revealed that the destination region (35.24%) and the relative day to Eid al-Fitr (28.02%) were the most influential factors affecting passengers’ service class preferences. This study provides insights into passenger behavior during the Eid al-Fitr homecoming period and supports data-driven decision-making for intercity bus companies.
Copyrights © 2026