Heatmaps
Heatmaps
A 2D graph of matrix data and this can be tweaked using seaborn library.
Description:
The output of simple corr() can be plotted as a heatmap to understand, visually, how each column of the dataset are correlated to each other column.
annot=True:
To display the correlation values in the boxes
cmap:
Refers to the color map of the color bar
cbar=False:
Used to turn off the color bar
square=True:
makes all the boxes as squares so that the over all shape looks like a square.
linewidth and linecolor:
Used to manipulate the lines in between the grids
fmt:
Used to change the format of text in each box.
From the doc:
corr():
Compute pairwise correlation of columns, excluding NA/null values Parameters ---------- method : {'pearson', 'kendall', 'spearman'} * pearson : standard correlation coefficient * kendall : Kendall Tau correlation coefficient * spearman : Spearman rank correlation
Comments
Post a Comment
Hey there, feel free to leave a comment.