Mathematics for Machine Learning

Linear algebra, matrix calculus, probability and information theory as machine learning uses them.

AI-210 Year 2 3 credits 12 lessons · 6 h 7 min

Offered by HSM University · Artificial Intelligence

What you'll learn

  • Use vectors, matrices, eigendecompositions and the SVD to compute similarities, solve systems, find low-rank approximations and perform PCA
  • Solve least-squares problems as projections, use rank, leverage and condition numbers, and find minimum-norm solutions of underdetermined systems
  • Explain distance concentration and near-orthogonality in high dimensions, search embeddings by cosine similarity, apply random projections and use kernels
  • Compute gradients, Jacobians and Hessians of common machine learning functions, derive least squares and softmax cross-entropy gradients, and verify backpropagation numerically
  • Explain forward- and reverse-mode automatic differentiation and their costs, choose floating-point formats, and write numerically stable computations
  • Apply expectation, variance, Bayes' rule, maximum likelihood and MAP estimation, and explain loss functions and regularization as probabilistic models
  • Work with multivariate Gaussians: Mahalanobis distance, Cholesky sampling, conditioning, Bayesian linear regression and Gaussian process regression
  • Decompose error into bias, variance and noise, size test sets with concentration bounds, reason about generalization bounds and explain double descent
  • Calculate entropy, cross-entropy, KL divergence, perplexity and mutual information, and relate them to training and evaluating models
  • Express deep learning operations as tensor algebra: einsum, attention, convolution as matrices, parameter and FLOP counts, and low-rank adaptation
  • Recognize convex problems, predict gradient descent behaviour from curvature and conditioning, and solve constrained problems with Lagrange multipliers
  • Derive, implement, optimize and evaluate logistic regression and a two-layer network from first principles

Course content

12 lessons · 6 h 7 min total · final exam

  1. 1 Vectors, matrices and decompositions 35 min · quiz
  2. 2 Linear systems, least squares and projections 28 min · quiz
  3. 3 High-dimensional geometry, embeddings and kernels 29 min · quiz
  4. 4 Matrix calculus and gradients 34 min · quiz
  5. 5 Automatic differentiation and numerical precision 32 min · quiz
  6. 6 Probability for learning 33 min · quiz
  7. 7 The multivariate Gaussian and Gaussian processes 27 min · quiz
  8. 8 Generalization: bias, variance and learning theory 27 min · quiz
  9. 9 Information theory: entropy and divergence 30 min · quiz
  10. 10 The linear algebra of deep learning 27 min · quiz
  11. 11 Convexity and optimization basics 36 min · quiz
  12. 12 Putting it together: models from first principles 29 min · quiz
  13. E Final exam 20 questions

Requirements

Recommended background. You can start any course at any time.

Description

Linear algebra, matrix calculus, probability and information theory as machine learning uses them.

Part of the Science stream, typically taken in year 2.