DS StatisticsLesson 17Free preview
Stat Correlation Matrix
This lesson is part of Data Science · All levels
Summary
A correlation matrix is a table that displays the correlation coefficients between all the variables pairs in a single dataset, thus facilitating the scanning of the relationship as a whole. The main diagonal is always 1 because each variable correlates perfectly with itself. This matrix is also useful for detecting multicolinearities between predictors.
Key points
- The correlation matrix = the correlation coefficient table of all the variables.
- The main diagonal is always 1.
- The value approaching ±1 indicates a strong relationship between the column pairs.
- Helps detect multicolinearity in regression modeling.
- In pandas is available via df.corr().
Full lesson
Code examples and quizzes
Full lessons, code examples, and quizzes are available to subscribers. 5 questions.