Calculus for machine learning

Free calculus course from zero for ML: slopes, derivatives, the chain rule, partial derivatives, gradients, gradient descent and backpropagation.

7 modules · 12 lessons so far

Module 1 · Beginner

Getting started with calculus

What calculus is, why models need it to learn, and the idea of a limit without the formal maths.

  1. What is calculus? A beginner guide
  2. Limits and continuity explained

Module 2 · Beginner

Derivatives

How fast things change: slopes of curves, the derivative rules, and checking them with Python.

  1. Rate of change explained
  2. What is a derivative? Explained visually
  3. The derivative from first principles
  4. Derivative rules: power, constant and sum
  5. Derivatives of exponentials and logs
  6. The product and quotient rules
  7. The chain rule explained step by step
  8. Derivative of the sigmoid function
  9. Numerical derivatives with Python

Module 3 · Intermediate

Finding the minimum

Use derivatives to find the lowest point of a curve: the core idea of model training.

  1. Lagrange multipliers explained
  2. Maxima and minima with derivatives
  3. Second derivatives and curvature
  4. Taylor series: approximating a function near a point
  5. Convex functions explained
  6. Optimisation explained for beginners
  7. Newton's method explained

Module 4 · Intermediate

Many variables

Real models have millions of inputs: partial derivatives, gradients, Jacobians and Hessians.

  1. Functions of several variables
  2. Partial derivatives explained
  3. The gradient explained visually
  4. Why the gradient points uphill
  5. The multivariable chain rule
  6. The Jacobian matrix explained
  7. The Hessian matrix explained
  8. Matrix calculus for machine learning

Module 5 · Intermediate

Integrals

Adding up infinitely many tiny pieces: areas under curves and the link to probability.

  1. What is an integral? Area under a curve
  2. Integrals and probability distributions
  3. Numerical integration with Python

Module 6 · Advanced

Gradient descent and optimisers

How models actually learn, from plain gradient descent to Adam.

  1. Gradient descent explained, with Python code
  2. Loss functions and their derivatives
  3. The learning rate explained
  4. Stochastic and mini-batch gradient descent
  5. Momentum, RMSProp and Adam explained

Module 7 · Advanced

Backpropagation

The chain rule at scale: how neural networks compute their gradients.

  1. Calculus for machine learning, made easy
  2. Computational graphs explained
  3. Backpropagation step by step
  4. Build a neural network from scratch with NumPy
  5. Automatic differentiation with PyTorch
  6. Calculus interview questions for ML