Correlations Among Numeric Features
End-to-End Machine Learning: Titanic Survival Prediction
1 min read
This section is 1 min read, full guide is 12 min read
Published Nov 18 2025
10
Show sections list
0
Log in to enable the "Like" button
0
Guide comments
0
Log in to enable the "Save" button
Respond to this guide
Guide Sections
Guide Comments
KerasMachine LearningMatplotlibNumPyPandasPythonscikit-learnSciPySeabornTensorFlow
We compute correlations to understand linear relationships:
numeric_cols = ["survived", "pclass", "age", "sibsp", "parch", "fare"]
sns.heatmap(titanic[numeric_cols].corr(), annot=True, cmap="coolwarm")
plt.title("Correlation Matrix")
plt.show()
Copy to Clipboard

Key observations:
- Higher class (lower
pclassnumber) correlates with survival. - Higher fares correlate with survival.
- Age has a weak negative correlation.
These correlations help form hypotheses for statistical testing and modelling.














