A suggested order
The machine learning path
15 stages from your first line of Python to machine learning in production, with each maths and statistics lesson placed just before the model that uses it. Follow it in order, or start at the stage you need. Every course can also be taken on its own.
- Stages
- 15
- Checkpoints
- 14
- Lessons
- 172 open of 209
- Courses
- Python, Data Tools, Maths, Statistics, Machine Learning
Where to start
Start at the stage that fits you
| You are | Start at | Skip |
|---|---|---|
| New to programming | Stage 0 | Nothing |
| Comfortable with basic Python (variables, loops, functions, lists) | Stage 1 | Stage 0. Take Python Module 6 before Stage 4 if you have not used classes |
| A programmer who knows NumPy, pandas and school maths | Stage 2 | Stages 0 and 1. Take any foundation lesson a lesson lists that you cannot answer |
| Already know some machine learning | The first checkpoint you cannot yet do | Every stage whose checkpoint you can already do |
The stages
Every stage, with its checkpoint
The checkpoint is what you should be able to do before moving on. If you can already do it, skip the stage.
Stage 0
Python from zero
CheckpointRead a CSV file by hand, count how often each word appears using a dictionary, and print the ten most common words. Write a pytest test for the counting function, and make Ruff and mypy report nothing on it.Skip it if you can already write a function that loops over a list.
Start with Python 1.1 →27 lessons
Python
- Python 1.1Why Python?
- Python 1.2Run Your First Python Code
- Python 1.3Variables, Keywords and Identifiers
- Python 1.4Data Types
- Python 1.5Input, Output and Formatting
- Python 1.6Operators
- Python 2.1if, elif and else
- Python 2.2while Loops
- Python 2.3for Loops and range
- Python 2.4break, continue and else on Loops
- Python 3.1Lists
- Python 3.2Tuples
- Python 3.3Sets
- Python 3.4Dictionaries
- Python 3.5Strings
- Python 3.6Comprehensions
- Python 4.1Defining Functions
- Python 4.2Arguments and Scope
- Python 4.3Recursion
- Python 4.4Lambdas and Functions as Values
- Python 5.1Modules and Packages
- Python 5.2uv, Packages and Environments
- Python 5.3Working with Files
- Python 5.4Exceptions
- Python 5.5Debugging
- Python 5.6Testing with assert and pytest
- Python 5.7Formatting, Linting and Type Checking
Stage 1
Your tools, and reading maths
CheckpointLoad a table with pandas, compute the average of one column per group, and plot it. Readŷᵢ = Σⱼ wⱼ xᵢⱼaloud in words.Start with Tools 0.1 →24 lessons
Data Tools
- Tools 0.1Why These Tools
- Tools 1.1Why NumPy
- Tools 1.2Shape, dtype and Reshaping
- Tools 1.3Indexing, Slicing and Masks
- Tools 1.4Vectorised Operations and Broadcasting
- Tools 1.5Aggregations Along Axes
- Tools 2.1Meet pandas
- Tools 2.2Series and DataFrames
- Tools 2.3Selecting and Filtering
- Tools 2.5groupby and Aggregation
- Tools 3.1Why Matplotlib and seaborn
- Tools 3.2Meet Matplotlib
- Tools 3.3Matplotlib Fundamentals
- Tools 3.4Several Plots and Readable Charts
Statistics
Maths
Stage 2
What machine learning is
CheckpointGiven ten real problems, say which are regression, which are classification and which are unsupervised. Name the features and label of each.Start with ML 1.1 →4 lessons
Stage 3
Understanding data
CheckpointProduce a written data report on a dataset you have never seen, using the ML 2.2 checklist. Reproduce one tempting claim from that dataset, check its denominator and plot choices, and rewrite it with its limitations.Start with Tools 2.4 →18 lessons
Statistics
- Stats 1.1Histograms and Density
- Stats 1.2The CDF, Percentiles and Quantiles
- Stats 1.3Mean, Median and Mode
- Stats 1.4Variance, Standard Deviation and IQR
- Stats 1.5Box Plots and Violin Plots
- Stats 1.6Correlation, Confounding and Causation
- Stats 1.7Who Is in the Dataset?
- Stats 1.8Categorical Counts, Rates and Bar Plots
- Stats 1.9Scatter, Joint and Density Plots
- Stats 2.1EDA Is a Sequence of Decisions
- Stats 2.2How Charts Can Mislead
- Stats 2.3Denominators, Base Rates and Missing Groups
- Stats 2.4Project Lab: End-to-End EDA for an ML Decision
Stage 4
Your first model: linear regression
CheckpointImplement linear regression with gradient descent from scratch in NumPy, and match scikit-learn's coefficients (the ML 3.3 assignment). Explain why a coefficient changes when another feature is added, and why correlated features make coefficients unstable while the predictions hold.Start with Maths 2.2 →23 lessons
Maths
- Maths 2.2Vector Arithmetic and Norms
- Maths 4.1Derivatives: Rate of Change and the Tangent
- Maths 4.2Derivative Rules and the Chain Rule
- Maths 4.3Maxima, Minima and Setting the Derivative to Zero
- Maths 4.4Partial Derivatives and the Gradient
- Maths 3.1Matrices, the Matrix–Vector Product and the Transpose
- Maths 3.2Matrix Multiplication as Transformation
- Maths 3.3Identity, Inverse and Singular Matricessecond pass
- Maths 3.4Linear Systems, Rank and Least Squares
- Maths 3.5Eigenvalues and Eigenvectors
- Maths 4.5Curvature: Second Derivatives, Taylor and Newtonsecond pass
Machine Learning
Stage 5
Classification, and knowing whether a model works
CheckpointTune K for k-NN with cross-validation, touch the test set once, and report precision, recall and AUC. Choose a ridge penalty by cross-validation and explain what lasso does that ridge does not. Explain why the training score is not evidence.Start with Maths 2.3 →20 lessons
Machine Learning
- ML 4.1Distance and Similarity
- ML 4.2k-Nearest Neighbours
- ML 4.3Overfitting, Underfitting and the Test Set
- ML 4.4Cross-Validation
- ML 4.5Hyperparameter Search
- ML 4.6Learning Curves and Validation Curves
- ML 4.7Polynomial Regression: Choosing Model Capacity
- ML 4.8Ridge Regression
- ML 4.9Lasso and Elastic Net
- ML 5.1The Confusion Matrix, Precision and Recall
- ML 5.2Thresholds, ROC and AUC
- ML 5.3Precision–Recall Curves and Choosing a Threshold
- ML 5.4Imbalanced Data
- ML 5.5Evaluating a Regression Model
Data Tools
Stage 6
Linear classifiers
CheckpointCalculate the log loss of individual predictions and explain why a confidently wrong answer costs more; train a logistic regression and explain one weight in plain words, including when you are not allowed to read it as importance. Deriving log loss algebraically is optional.Start with Maths 2.4 →14 lessons
Maths
Machine Learning
Stage 7
Probabilistic models and text
CheckpointBuild a spam or sentiment classifier with a bag of words and Naive Bayes, compare it with TF-IDF and logistic regression by a cross-validated score, and explain why Naive Bayes adds log probabilities instead of multiplying probabilities.Start with Stats 4.3 →5 lessons
Statistics
Machine Learning
Stage 8
Margins, kernels, and the first full project
CheckpointComplete the ML 7.9 assignments, at least the easy and medium tiers, and present your comparison table.Start with ML 7.6 →4 lessons
Machine Learning
Maths
Stage 9
Preparing real data
CheckpointTurn a messy table with missing values and categories into onePipelinethat cross-validates without leaking, and complete the ML 8.7 assignments.Start with Stats 4.5 →9 lessons
Statistics
Data Tools
Machine Learning
Maths
- Maths 2.5Shapes and Distance in d Dimensionssecond pass
Stage 10
Trees, ensembles, and explaining models
CheckpointBeat your logistic regression with gradient boosting on a tabular problem, choose the threshold from the costs, and explain the final model's biggest drivers.Start with Stats 5.3 →10 lessons · 7 open now
Machine Learning
- ML 9.1Decision Trees
- ML 9.2Random Forests
- ML 9.3Gradient Boosting
- ML 9.4Gradient Boosting in Practice
- ML 9.6Stacking, Voting and Cascadessecond pass
- ML 10.1Feature ImportanceComing soon
- ML 10.2Partial Dependence and ICE PlotsComing soon
- ML 10.3SHAP ValuesComing soon
Stage 11
Learning without labels
CheckpointReduce a digits dataset with PCA, cluster it, and judge the clusters with and without the labels.Start with Maths 3.5 →14 lessons · 4 open now
Maths
Data Tools
Machine Learning
- ML 11.1Principal Component AnalysisComing soon
- ML 11.2PCA: Why the EigenvectorsComing soonsecond pass
- ML 11.3t-SNEComing soon
- ML 12.1K-MeansComing soon
- ML 12.2Hierarchical ClusteringComing soon
- ML 12.3DBSCANComing soon
- ML 12.4Gaussian Mixture Models and EMComing soon
- ML 12.5Evaluating ClustersComing soon
- ML 13.1Local Outlier FactorComing soon
- ML 13.2Isolation ForestComing soon
Stage 12
Recommendations and time
CheckpointForecast a series with walk-forward validation and beat the seasonal-naive baseline.Start with Tools 2.7 →7 lessons · 2 open now
Machine Learning
- ML 14.1Collaborative FilteringComing soon
- ML 14.2Matrix FactorisationComing soon
- ML 15.1Time Series BasicsComing soon
- ML 15.2Forecasting as RegressionComing soon
- ML 15.3Smoothing and ARIMAComing soon
Data Tools
Statistics
Stage 13
Machine learning in the real world
CheckpointTake your Stage 10 model and calibrate it, put a confidence interval on its score, and save it as a pipeline that could be served. Then write down how you would monitor it and what would make you retrain.Start with Stats 6.1 →13 lessons · 4 open now
Statistics
Machine Learning
- ML 17.1Probability CalibrationComing soon
- ML 17.2Is Model B Really Better?Coming soon
- ML 17.3From Notebook to ProductionComing soon
- ML 17.4Rolling Out a New Model: Shadow, Canary and A/BComing soon
- ML 17.5Monitoring, Drift and RetrainingComing soon
- ML 17.6Reproducibility and Experiment TrackingComing soon
- ML 17.7FairnessComing soon
- ML 17.9Prediction Intervals and Sets: Conformal PredictionComing soon
- ML 17.10Choosing an AlgorithmComing soon
Stage 14Optional
Going further
Start with Stats 1.10 →18 lessons · 8 open now
Statistics
Machine Learning
- ML 4.10k-NN at Scale: kd-Trees and HashingComing soon
- ML 7.5Multi-Label ClassificationComing soon
- ML 9.5AdaBoostComing soon
- ML 13.3One-Class SVMComing soon
- ML 14.3Learning to RankComing soon
- ML 17.8PrivacyComing soon
- ML 16.1Semi-Supervised LearningComing soon
- ML 16.2Active LearningComing soon
- ML 18.1Case Study: Human Activity RecognitionComing soon
- ML 18.2Case Study: Friend RecommendationComing soon
Why this order
Built so what you learn is used straight away
Each foundation, just before you need it
You learn the dot product just before k-nearest neighbours and Bayes' theorem just before Naive Bayes, so what you learn is used straight away.
Wide first, then deep
On the first pass, learn what each method does and when to use it. Lessons marked second pass go deeper; come back to them later.
A checkpoint at every stage
Each stage ends in something to do, not something to read. If you can already do it, skip the stage.
Do the notebook, don't just watch
Watching gives the feeling of understanding; the notebook tells you whether you have it.
Prefer to pick your own order? Browse the courses; each one lists what it needs first.