Visual, executable learning guides

Machine learning from scratch

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.

Normalized gradient descent steps moving across objective contours toward a minimum

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 guide
Logistic regression decision boundary changing as a two-class model is fitted

Chapter 6 / Introductory

Logistic Regression from Scratch in Python

Build binary logistic regression with NumPy from the sigmoid, cross-entropy loss, and gradient update.

Read the guide
K-means points changing cluster assignments as centroids move

Chapter 8 / Introductory

K-Means Clustering from Scratch in Python

Implement K-means clustering with NumPy by alternating nearest-centroid assignments and centroid updates.

Read the guide