Course syllabus

Course outline

What the course covers, what you should be able to do at the end of it, how far it goes into each method, and what to read. The slides are on the slides page, and the data and notebooks on datasets and code.

InstructorDr Fatih Kansoy
Contactfatih.kansoy@economics.ox.ac.uk
Course lengthFour-day intensive course
Teaching daysMonday to Thursday
FormatLectures, seminars and hands-on labs
AssessmentFriday

Course description

Machine learning lets computers find patterns in data and turn them into predictions and decisions. The course follows the whole workflow, from framing a decision through preparing data, fitting models and evaluating them, to using them responsibly.

You will see how supervised models are built and judged, from linear and logistic regression to decision trees, random forests and boosting; how clustering and principal component analysis find structure without labels; and how embeddings, retrieval and generative tools sit alongside the classical methods. The recurring questions are how to evaluate a model honestly, how data leakage creeps in, where prediction stops short of causation, and what fairness, interpretability and governance ask of a model in use.

Course aims

The aim is a practical understanding of how machine learning works and when to trust it. You should finish able to choose a model that suits the decision, evaluate it with the right metrics, audit it for leakage and bias, and say plainly what your conclusion does not establish.

Learning outcomes

On successful completion, you will be able to:

  • frame a real decision as a supervised learning problem, and identify which variables are genuinely available before the decision is made;
  • explain and apply the core supervised models (linear and logistic regression, decision trees, random forests, and boosting) and the bias–variance trade-off that governs them;
  • evaluate models with metrics matched to the decision (accuracy, precision and recall, ROC–AUC, calibration) using train/validation/test splits and cross-validation;
  • diagnose data leakage, and distinguish predictive association from causal effect;
  • use unsupervised methods (K-means clustering and principal component analysis) to find and interpret structure in unlabelled data;
  • explain how embeddings, retrieval-augmented generation, and other modern AI workflows relate to classical machine learning;
  • assess the fairness, interpretability, monitoring and governance of a deployed model, and use AI tools responsibly, with evidence and reproducibility.

Teaching and assessment

Teaching method. Teaching follows a Socratic model, where class participation is central, and combines lectures, guided discussion, hands-on Python labs and group work in and outside class. No prior programming experience is assumed.

Assessment. Assessment takes place on Friday.

Course sessions

DayTopicFocus
MondayMathematical foundationsVectors, matrices and distance; probability and sample statistics; loss, risk and least squares; the notation the rest of the week uses.
TuesdayMachine learning: foundations, then regression and classificationWhat machine learning is and is not; features, targets, loss and the train/test split; leakage; then linear and logistic regression, and cost-based thresholds.
WednesdayFlexible models and evaluationDecision trees, random forests, and boosting; cross-validation; precision, recall, ROC and PR curves; and auditing a model for data leakage.
ThursdayUnsupervised learning, modern AI, and responsible useK-means clustering and PCA; embeddings and retrieval; and fairness, interpretability, monitoring, and governance.

Day 2 runs as two lectures. The first asks what it means for a machine to learn; the second covers linear and logistic regression.

Session overview

Session 1

Mathematical Foundations

This session builds the mathematical language the week uses: vectors, matrices and distance; probability and sample statistics; loss, risk and least squares. Every object it defines reappears inside the models the later sessions fit.

Session 2

Foundations of Machine Learning

This session sets up the workflow the rest of the week reuses. It turns a decision into a prediction problem, separates signal from noise, splits the data before any model sees it, and chooses a loss. What is known before a decision is made matters from the start, and so do data leakage and the gap between prediction and causation.

Session 3

Regression and Classification

Two baseline supervised models, linear regression for numbers and logistic regression for probabilities. The session covers coefficients and uncertainty, and how a predicted probability becomes an action through a cost-based threshold rather than a default cut-off.

Session 4

Flexible Models and Evaluation

This session introduces decision trees, random forests and boosting, together with the bias–variance trade-off that controls overfitting. The added flexibility comes with stricter evaluation, so it also covers cross-validation, the right metric for an imbalanced problem, and a disciplined leakage audit.

Session 5

Unsupervised Learning and Responsible AI

The final session moves from prediction to structure, with K-means clustering and PCA. It connects the classical tools to modern AI through embeddings and retrieval, and closes on fairness, interpretability, monitoring and governance.

How deep we go

The course does not claim the same level of mastery for every method it names. Some you will fit, calculate or operate yourself; others you will inspect without training them from scratch.

SessionYou fit, calculate or operateYou inspect without training from scratch
Day 1vectors, distance and standardisation; mean, variance and correlation; a loss minimised by hand and by least squareshow the same objects reappear inside the models the later days fit
Day 2aleast squares by hand; an always-no baseline; logistic regression on 19 client and campaign features; a decision thresholdwhat data leakage does to a score, by adding a post-call field and watching
Day 2bsimple and multiple linear regression; logistic regression; a cut-off priced from the costs of each errorthe boundary between predicting a response and estimating a causal uplift
Day 3a decision tree; a random forest; gradient boosting; cross-validation, against logistic regression as the comparatorwhy an importance score is a lead to follow rather than a cause
Day 4K-means on London listings; PCA on nine Treasury yieldslearned embeddings, retrieval-augmented generation, and responsible deployment

The wording is deliberate. PCA is a representation method rather than a predictive model. Retrieval-augmented generation (RAG) is a system that combines retrieval and generation, not a single model.

Deep-network and transformer training, reinforcement learning, production MLOps, and causal effect estimation remain outside the four-day course.

Core bibliography and reading list

Every item below is free to read online.

  1. James, Gareth, Daniela Witten, Trevor Hastie, Robert Tibshirani, and Jonathan Taylor. An Introduction to Statistical Learning with Applications in Python. Springer, 2023. Free PDF: statlearning.com
  2. Hastie, Trevor, Robert Tibshirani, and Jerome Friedman. The Elements of Statistical Learning. 2nd ed. Springer, 2009. Free PDF: hastie.su.domains/ElemStatLearn
  3. Deisenroth, Marc Peter, A. Aldo Faisal, and Cheng Soon Ong. Mathematics for Machine Learning. Cambridge University Press, 2020. Free PDF: mml-book.github.io
  4. scikit-learn developers. scikit-learn User Guide. scikit-learn.org/stable/user_guide.html
  5. VanderPlas, Jake. Python Data Science Handbook. 2nd ed. O'Reilly, 2022. Free online: jakevdp.github.io/PythonDataScienceHandbook
  6. Google. Machine Learning Crash Course. developers.google.com/machine-learning/crash-course
  7. Goodfellow, Ian, Yoshua Bengio, and Aaron Courville. Deep Learning. MIT Press, 2016. Free online: deeplearningbook.org
  8. Sanderson, Grant (3Blue1Brown). Neural Networks (visual video series). 3blue1brown.com/lessons/neural-networks
  9. Molnar, Christoph. Interpretable Machine Learning. 2nd ed., 2022. Free online: christophm.github.io/interpretable-ml-book
  10. National Institute of Standards and Technology (NIST). Artificial Intelligence Risk Management Framework (AI RMF 1.0). 2023. nist.gov/itl/ai-risk-management-framework
Prerequisites. No prior programming experience is assumed. Python is used from the first lab, but every notebook is scaffolded, and the questions you are asked to answer are about evidence and decisions rather than about code.
Oxford · United Kingdom
University of Oxford