1import matplotlib.pyplot as plt
2import seaborn as sns
3figure = plt.figure(figsize=(12, 6))
4sns.heatmap(train_data.corr(), annot=True,cmap=plt.cm.cool)
5plt.tight_layout()
6plt.xlabel('Corr')
7plt.show()
1import seaborn as sns
2%matplotlib inline
3
4# calculate the correlation matrix
5corr = auto_df.corr()
6
7# plot the heatmap
8sns.heatmap(corr,
9 xticklabels=corr.columns,
10 yticklabels=corr.columns)
11