Skip to content

~/teaching · machine learning · centrale méditerranée

Machine learning, the course notes

One public summary per deck of the Centrale Méditerranée course: the key ideas, the formulas, a worked example

The slides of the course are encrypted for its students. Each deck also has a public page: what it teaches, the formulas rendered properly, one example computed by hand, the glossary, and the plan of the deck.

Read them in order to follow the course from framing a project to a model in service, or go straight to the topic you need.

The course page: sessions, dates, homework and the encrypted slides

The course, in order

  1. Introduction

    AI at a crossroads: the two AI winters, the 2026 job market for young engineers, and a method to work in it

    Two AI winters, the perceptron, expert systems, the 2026 job market for junior developers, and the method an engineer needs to stay useful.

  2. Tools

    Kaggle, GitHub and Python: the accounts, the Git workflow and the repository of a machine learning project

    Kaggle competitions, the daily Git cycle, branches and pull requests, and the layout of a reproducible machine learning project repository.

  3. Session 1

    Frame before you model, then least squares: decision, leakage, normal equations and conditioning

    Frame a machine learning project (decision, target, metric, guard-rails, leakage), then derive least squares, the hat matrix and the condition number.

  4. Session 2

    Maximum likelihood, logistic regression and honest validation, step by step

    From the Bernoulli likelihood to the log-loss, the sigmoid, its gradient and convexity, odds ratios, bias-variance and leak-free validation.

  5. Session 3

    Convex optimisation and regularisation: gradient descent, step size, ridge and lasso

    Convexity, gradient descent and its step size, SGD, then ridge and lasso as shrinkage, with worked numbers and lambda chosen by cross-validation.

  6. Session 4

    Metrics, calibration and a decision threshold under asymmetric costs, then a repository someone else can rerun

    Confusion matrix, ROC and AUC, precision-recall, Brier score, a decision threshold derived from costs, and a reproducible ML repository.

  7. Homework

    How to build a defensible baseline model: reproducible, calibrated, thresholded by cost

    A defensible machine learning baseline: frozen split, leakage map, calibrated logistic regression, cost-based threshold, pre-registered ablation.

  8. Session 5

    The kernel trick, support vector machines, kernel ridge and decision trees, with worked numbers

    Maximum margin, hinge loss and the SVM dual, the kernel trick and kernel ridge, then decision trees with Gini, entropy and pruning, on worked examples.

  9. Session 6

    Random forests, gradient boosting and XGBoost, then the honest comparison of two models

    Bagging and random forests, gradient boosting and XGBoost derived step by step, then nested cross-validation and the Nadeau and Bengio corrected t-test.

  10. Session 7

    Explaining a Credit Score with SHAP, Auditing its Fairness, and Finding Structure with PCA, k-means and EM

    Shapley values computed by hand, fairness measures and their impossibility, the AI Act for credit, then PCA, k-means and EM on tiny worked examples.

  11. Homework

    Model selection, done honestly: corrected intervals, a pre-registered rule and a model card with a fairness audit

    How to compare models with nested cross-validation, corrected confidence intervals and a pre-registered rule, then document the champion in a model card.

  12. Session 8

    From the neural network to the model in service: backpropagation, drift, conformal prediction and an API

    Forward pass and backpropagation by hand, networks on tabular data, PSI drift monitoring, split conformal prediction and a FastAPI model service.

  13. Homework

    Delivering a machine learning project: repository, tested service, traceable report and the documents a committee reads

    What a delivered ML project contains: a rerunnable repository, a tested prediction API, a traceable report, model card, monitoring plan and client memo.

  14. Session 9

    Defending a machine learning project: the pitch, the live demonstration, the questions, and what comes after

    What a machine learning project defence must show, the questions a jury asks, the classic traps, and how to reuse the project in interviews.

Reference decks

  1. 15

    A credit default scoring project, step by step: the reproducible repository behind the UCI Default of Credit Card Clients data

    A reproducible credit default scoring project on the UCI credit card data: repository, make reproduce, tests, cost threshold, robustness, CI.

  2. 16

    Predicting an asset price: time series, XGBoost and news sentiment, measured honestly

    A worked ML project: log returns, walk-forward validation, lagged features, FinBERT and GDELT sentiment, Diebold-Mariano tests and Sharpe net of costs.

  3. 17

    The code of every model: import, download by API, fit, predict

    Python basics, how data become numbers, downloading data by API, then the same fit and predict code for every scikit-learn model, with real outputs.

  4. 18

    Deep learning, the essentials: backpropagation, batch norm, ResNet, convolution, LSTM, attention, VAE and GAN, derived and checked

    Backpropagation, batch norm and its gradient, ResNet, convolution, LSTM, attention, VAE and GAN, each derived on the board and checked in PyTorch.

  5. 19

    Open data and machine learning projects by sector: finance, insurance, logistics, tech, sport

    Where to find open data and under which licence, a six-line project brief, and ML project ideas in finance, insurance, logistics, tech and sport.

  6. 20

    The data and AI expert handbook: scope, tool up, model, deploy, observe

    Scope a data project, pick tools (Airflow, Spark, Docker, Kubernetes), choose a model, deploy an API and app, then observe it in production.

  7. 21

    Data engineering, SRE and cloud: the commands, the principles and the jobs, from junior to expert

    Pipelines, Parquet, SQL on DuckDB, idempotent loads, SLOs and error budgets, Terraform, Docker, Kubernetes, FinOps, and what each career level expects.

  8. 22

    A Panorama of Machine Learning Models: Which Ones, What For, in Which Sectors

    Machine learning model families: what each is for, which Python libraries, the main pitfall, and where it serves in finance, logistics and industry.

Long-form article

  1. 23

    The attention mechanism and the transformer, step by step

    Queries, keys and values, multi-head attention, positional encoding, encoder and decoder: one plain sentence, then the maths, then a worked example.