Making Predictions with All Three Models
End-to-End Machine Learning: Titanic Survival Prediction
2 min read
Published Nov 18 2025
Guide Sections
Guide Comments
Once the models are trained and evaluated, a common final step is to use them for real predictions.
We will prepare an example passenger (or multiple passengers) and run them through:
- Logistic Regression
- Random Forest
- Keras Neural Network
This demonstrates how to make new, real-world predictions using your pipelines and transformed data.
Create a Sample Passenger to Predict
We’ll create a small dataframe with one or more new passengers.
Here’s an example with two fictional passengers:
In tabular form:
Passenger A:
- First class young woman travelling alone
Passenger B:
- Third class adult man with family
We expect dramatically different survival probabilities.
Predictions with Logistic Regression
Output:
The output gives:
0= predicted death1= predicted survival- Probability = model’s confidence the passenger survives
Predictions with Random Forest
Output:
Random Forest typically gives:
- Stronger confidence for clear “rules”
- Slightly noisier for edge cases
Predictions with the Keras Neural Network
The Keras model requires preprocessed numeric arrays, so we must transform using the fitted preprocessor:
Output:
Final Combined Output

Passenger A (1st-class woman travelling alone)
- All three models give a very high survival probability (> 94%).
- Random Forest is almost certain (99.5%).
- Logistic Regression and Keras also strongly agree.
- This aligns with:
- “Women first” evacuation procedures
- First-class passengers having better access to lifeboats
- Historical survival rates (≈97% for 1st-class females)
All models predict survival confidently.
Passenger B (3rd-class man with family)
- All three models give a very low survival probability (< 8%).
- Random Forest gives near-zero chance (1.5%).
- Logistic Regression agrees (≈2.7%).
- Keras is slightly less certain but still low (7.8%).
- This matches historical data:
- Only ~14% of 3rd-class males survived
- Men were deprioritised
- Family groups in 3rd class were often delayed or blocked from access
All models predict he does not survive.














