Maths 3.7Lesson outlineLesson 7 of 7 in Module 3
The Covariance Matrix
Build the covariance matrix from a centred data matrix and read its entries and its shape.
Video in production.
Learn
In this lesson10 parts
- 01One matrix for the shape of a cloud
- 02Four points, centred
- 03Building XᵀX cell by cell
- 04Reading the entries
- 05The covariance ellipse
- 06Checkpoint: the covariance matrix so far
- 07Age and mileage on the used car lot
- 08Standardise first: the correlation matrix
- 09The covariance matrix in NumPy
- 10Recap, challenge, and next: derivatives
Key terms
The words this lesson introduces, each in one line. The module’s glossary collects them all.
- covariance matrix
(1/n) XᵀXfor centredX; one row and column per feature |[[5, 4], [4, 5]]- variance
- the mean squared distance from the mean |
5 - covariance
- the mean of the products of two centred features; positive when they rise together |
4 - correlation
- covariance divided by both standard deviations, between −1 and 1 |
0.8 - covariance ellipse
- axes along the covariance matrix's eigenvectors, semi-axes the square roots of its eigenvalues |
3and1 - correlation matrix
- the covariance matrix of standardised features; ones on the diagonal, correlations off it |
[[1, 0.9588], [0.9588, 1]]
Quiz
Your first pick on each question is the one that counts, and a right one earns a coin. Getting one wrong here is how the lesson sticks.