internalsGet Pro

Machine Learning Engineering · Module 03

Linear algebra for machine learning

Lessons
12
Free
0
Reading
~3 h

Your progress

0 / 12 lessons done

Sign in to track

Lessons

  1. Vectors: lists of numbers with directionEvery model in this course reads its input as a vector, and many of its weights are vectors too. Reading one customer’s features as a single object you can add, subtract and average is the base for dot products, distances, embeddings and everything else in this module.13 min
  2. Dot products: measuring how similar vectors areThe dot product is the most common calculation in machine learning. Every linear model, every neural network layer and every recommendation score is built from it, so knowing when its size means “similar” and when it means “big” decides whether your rankings make sense.13 min
  3. Matrices as transformations of spaceEvery layer of a neural network, every projection into an embedding and part of every feature rescaling is a matrix moving points. Reading a matrix as a movement of space tells you what a layer can and can’t do before you train it.13 min
  4. Matrix multiplication in practiceEvery model layer, every batch of predictions and every table of similarity scores is one matrix multiplication. Getting the shapes and the layout right is most of the daily work of turning a formula into code that runs fast and gives the right answer.14 min
  5. Matrix inverses: undoing a transformationYou undo transformations whenever you report a model’s numbers in real units, read a learned layer back into features, or invert a covariance matrix. An inverse that exists can still turn a rounding error into a 30-day mistake, and NumPy won’t warn you.16 min
  6. Matrix equations: finding many unknowns togetherFitting a linear model, reproducing an old scoring rule and the inner step of many training methods all come down to solving many equations at once. Knowing how the solver works, and when there is no single answer, tells you when to trust the weights it returns.15 min
  7. Rank: spotting redundant featuresFeature tables collect copies: a total next to its parts, one quantity in two units, a column per city beside an intercept. The model’s predictions survive the copy, but its weights stop meaning anything, and someone will read those weights to make a decision.16 min
  8. Eigenvectors: the natural axes of a matrixEigenvectors tell you where a matrix stretches and by how much, without plotting anything. ML engineers meet them in covariance matrices before PCA, in gradients that explode or vanish through many layers, and in any loop that applies the same matrix again and again.16 min
  9. SVD: breaking a matrix into simple partsSVD is how ML engineers find the few directions that matter in a large table. It sits under rank and condition-number checks, PCA, the pseudo-inverse and the first recommendation models, and it decides whether those fit in memory.18 min
  10. Norms and distances between data pointsNearest neighbours, k-means and weight penalties all rest on one question: how far apart are two vectors? Get the units or the distance wrong and the model groups customers by the size of their basket in rupees, with no error message to warn you.14 min
  11. Least squares: the best-fitting lineEvery linear regression you fit, in NumPy or scikit-learn, is a least-squares problem underneath. Knowing what the solver minimizes, what it returns and how it can lose accuracy tells you when to trust the weights and when one bad row is steering them.17 min
  12. PCA: keeping the directions that matterFeature tables grow columns that move together: spend in related categories, sensor readings, embedding dimensions. PCA is the standard first tool to shrink them, and its two common failures, fitting on the wrong rows and dropping the direction that predicts the label, are easy to ship by accident.17 min

Practise with