Skip to Content
03 MathsMml BookPractice Labs

Practice Labs: Math for ML (MML Book)

Source PDF: Mathematics for Machine Learning  Book: Mathematics for Machine Learning by Marc Peter Deisenroth, A. Aldo Faisal, Cheng Soon Ong (Cambridge University Press, 2020)

This book covers the mathematical foundations that underpin machine learning: linear algebra, calculus, probability, optimization, and four central ML algorithms (regression, PCA, GMM, SVM).

Labs

LabTopicBook ChapterKey Concepts
Lab 01Linear AlgebraCh 2Systems of equations, Gaussian elimination, vector spaces, basis, rank, linear mappings
Lab 02Analytic GeometryCh 3Norms, inner products, Gram-Schmidt, orthogonal projections, rotations
Lab 03Matrix DecompositionsCh 4Eigenvalues, Cholesky, SVD, low-rank approximation
Lab 04Vector CalculusCh 5Gradients, Jacobians, backpropagation, Hessians, Taylor series
Lab 05Probability & DistributionsCh 6Bayes’ theorem, Gaussian, exponential family, conjugacy
Lab 06Continuous OptimizationCh 7Gradient descent, momentum, Lagrange multipliers, Newton’s method, convexity
Lab 07Linear RegressionCh 8-9MLE, Bayesian regression, overfitting, cross-validation
Lab 08PCACh 10Maximum variance, projection, scree plot, high-dimensional PCA
Lab 09Gaussian Mixture ModelsCh 11GMM, EM algorithm, K-Means, model selection
Lab 10Support Vector MachinesCh 12Margin maximization, hinge loss, kernels, soft margin

How to Use

  1. Each lab is a Jupyter notebook with theory (markdown) and fully implemented code cells
  2. Read the theory cells, study the implementations, and run each cell
  3. Open in Jupyter: jupyter notebook lab_01_linear_algebra.ipynb

Prerequisites

  • Python 3.8+
  • NumPy
  • Matplotlib

Suggested Order

The book has two parts. Follow Part I (math foundations) first, then Part II (ML applications):

Part I: Mathematical Foundations

  1. Lab 01 - Linear Algebra (the language of ML)
  2. Lab 02 - Analytic Geometry (geometry of data)
  3. Lab 03 - Matrix Decompositions (factoring matrices)
  4. Lab 04 - Vector Calculus (training and optimization)
  5. Lab 05 - Probability & Distributions (uncertainty)
  6. Lab 06 - Optimization (finding best parameters)

Part II: Central ML Problems 7. Lab 07 - Linear Regression (prediction) 8. Lab 08 - PCA (dimensionality reduction) 9. Lab 09 - Gaussian Mixtures (density estimation) 10. Lab 10 - SVM (classification)

What Comes Next

Last updated on