A Comparative Analysis of Ensemble Learning Algorithms: Random Forest, XGBoost, and LightGBM on the Titanic Dataset
Abstract
This paper presents a comprehensive comparative analysis of three prominent ensemble learning algorithms: Random Forest, XGBoost, and LightGBM; applied to the binary classification problem of predicting passenger survival in the Titanic disaster. The study encompasses extensive data preprocessing, feature engineering, hyperparameter optimization, and rigorous evaluation. Our experimental results demonstrate that Random Forest achieved the highest performance with a test accuracy of 82.1% and cross-validation accuracy of 82.5%. Feature importance analysis revealed that Fare, Sex and Age were the most significant predictors of survival. This research provides valuable insights into algorithm selection for structured data classification tasks and contributes to the understanding of ensemble methods’ relative strengths and limitations.
References
- Breiman, L. (2001). Random forests. Machine learning, 45 (1), 5-32.
- Chen, T., & Guestrin, C. (2016). XGBoost: A scalable tree boosting system. Proceedings of the 22nd ACM SIGKDD international conference on knowledge discovery and data mining.
- Ke, G., et al. (2017). LightGBM: A highly efficient gradient boosting decision tree. Advances in neural information processing systems, 30. 9
- Suenaga, D., Takase, Y., Abe, T., Orita, G., & Ando, S. (2023). Prediction accuracy of Random Forest, XGBoost, LightGBM, and artificial neural network for shear resistance of post-installed anchors. Structures, 50, 1252–1263.
- Guo, X., Gui, X., Xiong, H., Hu, X., Li, Y., Cui, H., Qiu, Y., & Ma, C. (2023). Critical role of climate factors for groundwater potential mapping in arid regions: Insights from random forest, XGBoost, and LightGBM algorithms. Journal of Hydrology, 621, 129599.
- Yu, T.-K., Chang, I.-C., Chen, S.-D., Chen, H.-L., & Yu, T.-Y. (2025). Predicting potential soil and groundwater contamination risks from gas stations using three machine learning models (Xgboost, lightgbm, and random forest). Process Safety and Environmental Protection, 199, 107249.
- Dai, Z., & Huang, W. (2025). Improving energy management practices through accurate building energy consumption prediction: Analyzing the performance of LightGBM, RF, and XGBoost models with advanced optimization strategies. Electrical Engineering, 107 (9), 12583–12605.