Titanic Survival Prediction Analysis
Titanic Survival Prediction Analysis
'Sex' and 'Fare' were found to be the most important features in predicting survival. 'Sex' was the strongest predictor with a 52.0% feature importance, highlighting that women had a significantly higher likelihood of survival compared to men. 'Fare', with an 18.0% importance, suggested that passengers who paid higher fares were more likely to survive, indicating a correlation between wealth and survival probability .
The Random Forest model outperformed both Logistic Regression and Decision Tree models. It achieved an accuracy of 83.2%, which was higher than Logistic Regression at 79.3% and Decision Tree at 81.0%. In terms of precision, recall, F1-Score, and ROC-AUC, Random Forest showed superior general performance, with a precision of 80% and a recall of 76.5%. The model was more robust in capturing actual survivors and balancing sensitivity with specificity .
The survival analysis findings underscore significant socio-economic biases, reflecting historical inequalities. Women, children, and wealthier passengers (1st-class) enjoyed higher survival rates, indicating prioritization based on gender and class. Such biases highlight entrenched social hierarchies and economic disparities of the time, demonstrating how socio-economic status influenced crisis outcomes .
Engineering additional features such as interaction terms (e.g., Sex × Pclass) could uncover relationships between passenger characteristics that influence survival, potentially improving predictive accuracy. Extracting deck levels from cabin data could introduce a new variable correlated with passenger class and survival likelihood, offering better insights into location-based survival advantages or disadvantages, thereby enhancing model performance .
The cross-validation score indicated that the Random Forest model had a mean accuracy of 81.5% with a standard deviation of ±2.1%. This reflects the model's consistency in performance across different data subsets, suggesting it is reliably predicting survival outcomes and generalizing well to unseen data .
Key business recommendations include prioritizing women, children, and high-paying passengers during emergencies, reflecting effective crisis management strategies observed from survival likelihood patterns. Additionally, organizations can use historical data insights to understand socio-economic biases and improve equity in safety protocols, ensuring fairer treatment across different passenger classes in future scenarios .
The EDA revealed that survival rates were significantly higher for women and children. Specifically, women had a 74.2% survival rate compared to 18.9% for men. Ticket class also played a key role, with 1st-class passengers having a 63.0% survival rate, significantly higher than 47.3% for 2nd-class and 24.2% for 3rd-class passengers. These insights suggest a socio-economic bias in survival outcomes .
Feature engineering significantly improved predictive accuracy by creating new relevant attributes from existing data, such as FamilySize, IsAlone, Title, and Has_Cabin. These new features allowed the models to better capture underlying patterns related to survival. For example, FamilySize helped understand the impact of having companions on board, while Title provided social status insights. Additionally, Has_Cabin indicated access to more expensive accommodations linked to higher survival rates .
Handling missing values in Age, Embarked, and Fare was crucial to improving model reliability by reducing data inaccuracies and biases that could impact model predictions. Imputation of missing age values ensured robust age-related inference, while filling Embarked and Fare gaps helped in capturing embarkation trends and fare-based survival likelihoods. Additionally, preprocessing steps such as creating FamilySize and Has_Cabin helped in accommodating missing cabin data effectively .
Using XGBoost or Neural Networks might enhance model accuracy by leveraging their capability to handle complex non-linear relationships and interactions more effectively than Random Forests. XGBoost can provide higher precision with its boosting algorithm, especially in handling class imbalance. Neural Networks, with their layered architecture, could better capture intricate patterns in the data, potentially improving prediction outcomes through deeper learning .