text_plain_output_1.png image_output_1.png
import matplotlib.pyplot as plt

import pandas as pd

train_full_set = pd.read_csv('../input/train.csv')

full_set_initial = pd.get_dummies(data=train_full_set, columns=['Embarked', 'Sex', 'Survived'], drop_first=True)
full_set_initial = full_set_initial.drop(['PassengerId', 'Name', 'Ticket', 'Cabin'], axis=1)
corr = full_set_initial.corr()
print(corr)
plt.figure()
plt.imshow(corr, cmap='GnBu')
plt.colorbar()
plt.xticks(range(len(corr)), corr.columns, rotation='vertical')
plt.yticks(range(len(corr)), corr.columns)
plt.suptitle('Correlation Matrix', fontsize=15, fontweight='bold')
plt.show()