yasc.eda.corr_analysis

yasc.eda.corr_analysis(data, tight_layout=False, show_plot=False, title=None, rot=None, **kwargs)

Correlation analysis.

Parameters
dataDataFrame

Observed data.

tight_layoutbool, optional

Whether to make figure tight layout. Defaults to False.

show_plotbool, optional

Whether to show heatmap of correlation matrix.

titlestr

Title of heatmap of correlation matrix. Defautls to None.

rotint

Degrees of rotation for xticklabels.

kwargsKeyword arguments

All keyword arguments that are passed to seaborn.heatmap().

Returns
tuple

Returns correlation matrix and axes object with the heatmap.

Examples

Plot a heatmap of correlation matrix of german credit data.

>>> from yasc.data import german_data
>>> from yasc.eda import corr_analysis
>>> data = german_data()
>>> corr, ax = corr_analysis(data)