internalsGet Pro

Module 05 · Lesson 7 of 14Pro

Covariance matrices: how features move together

Level
Intermediate
Topic
Probability and statistics for machine learning
Reading time
16 min

When you finish this page you can

  1. Compute a covariance by hand and a covariance matrix in NumPy, with features on the right axis.
  2. Find the spread of any weighted sum of features from the covariance matrix, and explain why ignoring covariance misjudges it.
  3. Use the inverse covariance matrix to judge how unusual a customer is when features move together.
  4. Choose between the sample covariance matrix, a diagonal matrix and a shrunk estimate by how many rows you have per feature.

Builds on 2 lessons

Start with lesson 513 min
  1. Expected value, variance and spread13 min
  2. Eigenvectors: the natural axes of a matrix16 min

Joseph budgets for 4,600 customers and gets 11,400

is our example online store. Its ML team predicts which customers will stop buying, so Joseph’s growth team can win them back. Farah, an ML engineer, works on a notebook sample of 200,000 customers.

Our biggest sale ever · Black Friday

Flat 50% Off

Pro

Continue reading

Unlock every course, now and later

  • System Design, live
  • AI Engineering, live
  • Data Engineering, live
  • Machine Learning Engineering, live
  • Inference Engineering, coming soon
  • AI Research, coming soon
  • Performance Engineering, coming soon
  • Agent & Harness Engineering, coming soon
  • LLM Fine-tuning, coming soon
  • LLM Pre-training & Post-training, coming soon
  • Reinforcement Learning, coming soon
  • AI Infrastructure & Platform Engineering, coming soon
  • AI Evaluation & Safety, coming soon
  • Forward Deployed Engineering, coming soon
  • Cloud Computing, coming soon
  • DevOps, coming soon

50% off · Annual and Lifetime

BLACKFRIDAY50Applied at checkout

Choose a plan