
Chapter 3 / Introductory
Gradient Descent from Scratch in Python
Understand the gradient descent update rule, implement it with NumPy, and see how step size changes convergence.
Read the guideVisual, executable learning guides
Build core algorithms from their equations with compact, tested NumPy examples. Every guide connects its visual explanation to the official Machine Learning Refined chapter, notebook, exercises, and source repository.
You will need basic Python, NumPy arrays, and some familiarity with derivatives. Start with gradient descent to understand parameter updates, then use logistic regression to fit a two-class model. Choose K-means to explore grouping samples without labels. Each guide includes runnable code, expected output, parameter choices, and an experiment you can try.
For the full mathematical treatment, browse the book chapters and exercises. To explore the companion animations and run source notebooks, open the Python notebook workbench.

Chapter 3 / Introductory
Understand the gradient descent update rule, implement it with NumPy, and see how step size changes convergence.
Read the guide
Chapter 6 / Introductory
Build binary logistic regression with NumPy from the sigmoid, cross-entropy loss, and gradient update.
Read the guide
Chapter 8 / Introductory
Implement K-means clustering with NumPy by alternating nearest-centroid assignments and centroid updates.
Read the guide