Multivariate analysis on the combined dataframe

Let's perform the multivariate analysis with the combined dataset. We are going to use the same heatmap diagram to perform multivariate analysis:

  1. Let's start by creating the figure. First, we create a subplot:
fig, (ax) = plt.subplots(1, 1, figsize=(14,8))
  1. Next, we create the heatmap, as follows:
hm = sns.heatmap(df_wines.corr(), 
ax=ax,
cmap="bwr",
annot=True,
fmt='.2f',
linewidths=.05)
  1. Finally, let's plot the subplot and populate it with a suitable title:
fig.subplots_adjust(top=0.93)
fig.suptitle('Combined Wine Attributes and their Correlation Heatmap', fontsize=14, fontweight='bold')

The output of the preceding code is given as follows:

Figure 12.13 - A heatmap illustrating correlation between several columns

Note the preceding screenshot is similar to Figure 12.5 and should be interpreted in the same way. The only difference, in this case, is that we have performed multivariate analysis on the combined dataframe. 

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.223.107.85