Research Article

Survival Prediction of the Titanic: A Comparison of Multiple Machine Learning Algorithms

Haolin Tong*
Sichuan University

* Corresponding author: [email protected]

Abstract

The sinking of the Titanic is one of the most famous marine perils in history. Predicting survival data has become a classic practice in machine learning. This research used the Titanic passengers dataset to explore the performance variation of 3 classical statistical models (logistic regression, decision trees, and random forests). The research included data preprocessing (missing value imputation, categorical feature encoding, and feature standardisation). Model evaluation was conducted using 5-fold cross-validation to identify key survival factors and to ensure robustness against data-split bias. The results show that the average accuracy of the random forest and decision tree models under 5-fold cross-validation is 0.81, while the logistic regression is 0.78. The random forest demonstrated slightly greater stability than the decision tree. Feature importance analysis indicates that Gender, Fare, and Age collectively account for 79.4% of the total importance. This research provides a reference for machine learning on small-sample classification tasks and enriches similar survival prediction analyses.

Keywords: Titanic; Survival Prediction; MachinXe Learning; Algorithm Comparison; Classification Model
Published: June 8, 2026
DOI: 10.54254/2755-2721/2026.34283
Volume: ACE Vol.231
pp. 7-14
Download PDF

References

  1. Hosmer Jr D W, Lemeshow S. Applied logistic regression (2nd ed.) [M]. John Wiley & Sons, 1999.
  2. Dawson R. Titanic survival prediction using machine learning [R]. Kaggle Competition Technical Report, 2011.
  3. Chen T, Guestrin C. XGBoost: A scalable tree boosting system [C]//Proceedings of the 22nd ACM SIGKDD International Conference on Knowledge Discovery and Data Mining. 2016: 785-794. https: //doi.org/10.1145/2939672.2939785
  4. Wang J, Li G. Optimization of Titanic survival prediction model based on K-nearest neighbor imputation [J]. Computer Engineering and Applications, 2020, 56(12): 182-187.
  5. Li Y, Zhang M. Comparative study of ensemble learning algorithms in Titanic survival prediction [J]. Data Analysis and Knowledge Discovery, 2022, 6(3): 45-52. https: //doi.org/10.11925/infotech.2096-3467.2021.0812
  6. Zheng W, Liu Y. Feature importance analysis in Titanic survival prediction [C]//2018 17th International Conference on Machine Learning and Cybernetics (ICMLC). 2018: 1020-1025. https: //doi.org/10.1109/ICMLC.2018.8527789
  7. Breiman L. Random forests [J]. Machine Learning, 2001, 45(1): 5-32. https: //doi.org/10.1023/A: 1010933404324
  8. Liu J, Wang H. Ensemble learning for small-sample classification: A case study on Titanic survival prediction [J]. Applied Sciences, 2023, 13(4): 2456. https: //doi.org/10.3390/app13042456