AI contentThis course was created with AI: the lectures, quizzes, labs, narrated videos and the animated instructor are AI-generated. It can contain mistakes, so check important facts against primary sources. The linked YouTube talks are by their original creators.
ML-course
0% complete
Machine Learning Specialization · 6 courses · 21 weeks

From a line through five points to a language model you fine-tuned yourself.

Written lectures with a narrated video for each one, curated talks from the open web, interactive demos you can push around, a quiz and a practice quiz every week, a final exam and certificate per course and a lab with a checkpoint that tells you whether your code is right. Everything runs in this page or in a Python notebook; nothing needs an account.

211lectures, each with a narrated video
9interactive demos
82quizzes and final exams
7certificates
20Jupyter labs with solutions
~170 hat six to eight hours a week
Course 1 · 3 weeks

Supervised Learning: Regression and Classification

The model, the cost, the gradient. Linear and logistic regression built from NumPy up, then regularized.

  • Gradient descent, with a demo you can break
  • Feature scaling and polynomial features
  • Log loss, decision boundaries, overfitting
Open course →
Course 2 · 4 weeks

Neural Networks and Applied Machine Learning

Forward and backward propagation, softmax, Adam, then the discipline of evaluating a model and the tree models that still win on tables.

  • A network trained live in your browser
  • Bias, variance, learning curves, error analysis
  • Decision trees, random forests, boosting
Open course →
Course 3 · 3 weeks

Unsupervised Learning, Recommenders and Reinforcement Learning

Finding structure without labels, learning what people will like, and learning from reward.

  • K-means and anomaly detection
  • Collaborative and content-based filtering
  • Q-learning on a grid you can watch train
Open course →
Course 4 · 5 weeks

Fine-Tuning Language Models

Take a pretrained open model and make it yours: data, LoRA and QLoRA, the training run, preference alignment, evaluation and serving.

  • A LoRA memory calculator and LoRA from scratch
  • SFT, DPO, a tokenizer and a tiny GPT built from scratch
  • Quantization, KV cache, serving; capstone on your own task
Open course →
Course 5 · 3 weeks

Convolutional Neural Networks

Convolutions from scratch, the architectures that won ImageNet and run on phones, and detection, segmentation and face recognition.

  • Conv, padding, stride and pooling in NumPy
  • ResNet, Inception, MobileNet, transfer learning
  • IoU, non-max suppression, YOLO, U-Net, triplet loss
Open course →
Course 6 · 3 weeks

Machine Learning in Production

Everything around the model: deployment patterns, drift monitoring, data-centric development, scoping and responsible operations.

  • Canary, shadow and blue-green deployments
  • PSI and KS drift monitoring, label consistency
  • Scoping, serving, model cards, retraining
Open course →

How the courses work

Lectures are written, in two layersEach lecture is a 6–12 minute read: intuition, the formula to remember, the code. Under it, a Deep dive expands into the full derivation, a worked example you can follow with a calculator, and the mistakes people actually make.
Demos replace the chalkboardNine small simulations run in this page: push the learning rate too high, overfit a polynomial, train a neural network, watch k-means converge, train an agent on a grid.
Quizzes check understandingFive questions per week with explanations for every answer. Scores stay in this browser.
Labs are Jupyter notebooksEach lab is a notebook with TODO cells and a self-check after every step, then a graded practice set of harder exercises and a mini-project. A checkpoint on this page asks for one number your code must produce. The solutions notebooks are fully executed, with outputs and plots.
PrerequisitesPython at the level of loops, functions and lists; high-school algebra. Linear algebra and calculus are introduced where needed.
ToolsPython 3, NumPy, scikit-learn, PyTorch. For Course 4, the Hugging Face stack and a free Colab GPU.

Schedule

One week per row at six to eight hours. Every week has module quizzes, a graded quiz or lab, and a narrated video for each lecture; every course ends with a final exam and a certificate.

WeekCourseTopicYou finish with
11Linear regression and gradient descentGradient descent written from scratch, fitting a price line
21Regression with many featuresVectorized regression with z-score scaling and polynomial features
31Classification and regularizationRegularized logistic regression with a plotted decision boundary
42Neural networksA network written in NumPy, then the same in PyTorch
52Neural network trainingA ten-class digit classifier with softmax and Adam
62Advice for applying machine learningDegree and λ chosen by cross-validation, learning curves, an error analysis
72Decision treesA tree built from information gain, compared with forests and boosting
83Clustering, anomaly detection, PCAK-means image compression and a Gaussian anomaly detector
93Recommender systemsCollaborative filtering trained in PyTorch
103Reinforcement learningTabular Q-learning that solves a grid world
114From pretrained to adaptedAn instruction dataset rendered through the model's chat template
124Parameter-efficient fine-tuningA complete LoRA run with TRL and a read loss curve
134Alignment, evaluation, deploymentA DPO run, an evaluation against the base model, a GGUF served locally
144Tokenizer and transformer from scratchBPE, multi-head attention and a tiny GPT trained on CPU, with sampling
154Quantization, inference and servingint8 / 4-bit quantization, a KV cache verified against full recompute
165Foundations of convolutional networksA convolutional layer and pooling written in NumPy, checked against PyTorch
175Deep convolutional modelsA CNN trained on digits in the page, compared with a dense network
185Detection, segmentation and recognitionIoU, YOLO-style filtering and non-max suppression
196Lifecycle and deploymentA weekly drift monitor that separates data drift from concept drift
206Modeling and data in productionCleaner labels and a per-camera pipeline fix that lift accuracy
216Scoping and operating ML systemsA scoped project with feasibility, metrics and a model card

The notebooks

Twenty labs in notebooks/, each with a student version (TODO cells, self-checks) and an executed solutions version in notebooks/solutions/. Small datasets ship in notebooks/data/; everything in Courses 1–3, 5 and 6 runs offline on a laptop, and every lab runs in this page. Course 4's real training cells are guarded by a RUN_TRAINING flag for a GPU machine.

LabNotebookBuildsNeeds
C1 · W1c1w1_linear_regression Runs in browsercost, gradients with a numerical check, gradient descent, convergence test, 100-house fit vs closed formNumPy
C1 · W2c1w2_multiple_features Runs in browservectorized regression, z-score scaling, polynomial features, scikit-learn comparisonNumPy, scikit-learn
C1 · W3c1w3_logistic_regression Runs in browsersigmoid, log loss, boundary plot, L2 regularization, λ sweep on breast cancer dataNumPy, scikit-learn
C2 · W1c2w1_neural_network Runs in browserNumPy forward prop, parameter counting, PyTorch training, cross-framework check, custom LinearPyTorch
C2 · W2c2w2_multiclass_training Runs in browsersoftmax, early stopping loop, confusion matrix, experiments, backprop by hand with gradient checkPyTorch
C2 · W3c2w3_trees_and_diagnostics Runs in browserentropy and information gain, recursive tree, learning curve, precision/recall, forest vs XGBoostPyTorch, XGBoost
C3 · W1c3w1_clustering_anomaly_pca Runs in browserk-means in two functions, image compression, Gaussian anomaly detector with ε selection, PCA via SVDNumPy, scikit-learn
C3 · W2c3w2_recommenders Runs in browsermean normalization, collaborative-filtering loss, Adam training, new-user recommendations, item similarityPyTorch
C3 · W3c3w3_q_learning Runs in browsergrid world, tabular Q-learning, policy rendering, stochastic world with a trap, minimal DQNNumPy (+PyTorch)
C4 · W1c4w1_dataset_and_template Runs in browsermessages format, filtering and dedupe, split, gold set and decontamination, ChatML renderer, token lengthspandas (+transformers)
C4 · W2c4w2_lora_and_sft Runs in browserLoRA layer from scratch with merge, parameter/memory calculator, checkpoint selection from a log, real TRL runPyTorch (+TRL on GPU)
C4 · W3c4w3_dpo_eval_export Runs in browserDPO loss, structured-output metrics, position-swapped pairwise judge, regression table, real DPO and GGUF exportPyTorch (+TRL on GPU)
C4 · W4c4w4_transformer_from_scratch Runs in browserBPE tokenizer, causal attention checked against PyTorch, transformer block, tiny GPT, temperature/top-k/top-p samplingPyTorch
C4 · W5c4w5_quantization_inference Runs in browserabsmax and zero-point int8, block-wise 4-bit, quantized model accuracy, KV cache, memory calculatorPyTorch
C2 · W3c2w3_advice_for_applying_ml Runs in browsertrain/cv/test errors, degree and λ by cross-validation, learning curves, baseline diagnosis, error analysisscikit-learn
C5 · W1c5w1_convolution_from_scratch Runs in browserpadding, conv_forward and max pooling in NumPy, checked against PyTorch, Sobel filters on digitsNumPy + PyTorch
C5 · W2c5w2_cnn_digits Runs in browsertwo-block CNN on digits with Conv2d and MaxPool2d, mini-batch training, dense comparison, learned filtersPyTorch
C5 · W3c5w3_iou_nms Runs in browserIoU, YOLO-style score filtering, per-class non-max suppression with plotsNumPy
C6 · W1c6w1_drift_monitoring Runs in browserPSI and KS statistic, weekly drift report, data drift versus concept driftNumPy + scikit-learn
C6 · W2c6w2_data_centric Runs in browserCohen's kappa, majority-vote label cleaning, slice analysis by camera, per-camera standardizationpandas + scikit-learn

Labs marked Runs in browser execute right on this page: open one, press Start Python, then edit and run cells (Shift+Enter). Python is loaded once (about 10 MB; extra packages load only when a cell needs them, and everything is cached afterwards) and your edits are kept in this browser. PyTorch labs run on torchlite, a NumPy re-implementation of the PyTorch API bundled in this page (same code, slower than real PyTorch, CPU only). The Hugging Face training cells in Course 4 stay switched off by RUN_TRAINING = False; for those, download the notebook and the data files below into a folder named data/ and run it on a GPU.

Your progress

Tick each lecture, quiz and lab as you finish it. Ticks and quiz scores stay in this browser only.

Course 1 · Supervised learning0 / 0
Course 2 · Neural networks0 / 0
Course 3 · Unsupervised & RL0 / 0
Course 4 · Fine-tuning0 / 0
Course 5 · CNNs0 / 0
Course 6 · ML in production0 / 0