Pairwise correlation

Dimensionality Reduction in Python

Jeroen Boeye

Head of Machine Learning, Faktion

Pairwise correlation

sns.pairplot(ansur, hue="gender")

ansur pairplot

Dimensionality Reduction in Python

Pairwise correlation

sns.pairplot(ansur, hue="gender")

ansur pairplot annotated

Dimensionality Reduction in Python

Correlation coefficient

extreme correlations

Dimensionality Reduction in Python

Correlation coefficient

scrambled correlations

Dimensionality Reduction in Python

Correlation matrix

weights_df.corr()

correlation matrix ansur

Dimensionality Reduction in Python

Correlation matrix

weights_df.corr()

correlation matrix ansur duplicates

Dimensionality Reduction in Python

Correlation matrix

weights_df.corr()

correlation matrix ansur duplicates 2

Dimensionality Reduction in Python

Correlation matrix

weights_df.corr()

correlation matrix ansur diagonal

Dimensionality Reduction in Python

Visualizing the correlation matrix

cmap = sns.diverging_palette(h_neg=10, 
                             h_pos=240, 
                             as_cmap=True)

sns.heatmap(weights_df.corr(), center=0, 
            cmap=cmap, linewidths=1, 
            annot=True, fmt=".2f")

correlation matrix visualized

Dimensionality Reduction in Python

Visualizing the correlation matrix

corr = weights_df.corr()

mask = np.triu(np.ones_like(corr, dtype=bool))
array([[ True,  True,  True],
       [False,  True,  True],
       [False, False,  True]])
Dimensionality Reduction in Python

Visualizing the correlation matrix

sns.heatmap(weights_df.corr(), mask=mask, 
            center=0, cmap=cmap, linewidths=1, 
            annot=True, fmt=".2f")

weights vs. height correlations masked

Dimensionality Reduction in Python

Visualising the correlation matrix

ansur selection correlations

Dimensionality Reduction in Python

Let's practice!

Dimensionality Reduction in Python

Preparing Video For Download...