Skip to content

Instantly share code, notes, and snippets.

@NMZivkovic
Created April 21, 2019 18:24
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save NMZivkovic/e9590ca95e8a7f96c5a152b25f5d0bdb to your computer and use it in GitHub Desktop.
Save NMZivkovic/e9590ca95e8a7f96c5a152b25f5d0bdb to your computer and use it in GitHub Desktop.
corrMatt = data[["SepalLength","SepalWidth","PetalLength","PetalWidth","Species"]].corr()
mask = np.array(corrMatt)
mask[np.tril_indices_from(mask)] = False
fig,ax= plt.subplots()
fig.set_size_inches(20,10)
sn.heatmap(corrMatt, mask=mask,vmax=.8, square=True,annot=True)
@armathur
Copy link

What is the point of adding 'Species' in the column array on line 1? Can't I just do data.corr() since it ignores any categorical variables ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment