Long-form article
23
The attention mechanism and the transformer, step by stepQueries, keys and values, multi-head attention, positional encoding, encoder and decoder: one plain sentence, then the maths, then a worked example.
~/teaching · machine learning · centrale méditerranée
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
Introduction
Two AI winters, the perceptron, expert systems, the 2026 job market for junior developers, and the method an engineer needs to stay useful.
Tools
Kaggle competitions, the daily Git cycle, branches and pull requests, and the layout of a reproducible machine learning project repository.
Session 1
Frame a machine learning project (decision, target, metric, guard-rails, leakage), then derive least squares, the hat matrix and the condition number.
Session 2
From the Bernoulli likelihood to the log-loss, the sigmoid, its gradient and convexity, odds ratios, bias-variance and leak-free validation.
Session 3
Convexity, gradient descent and its step size, SGD, then ridge and lasso as shrinkage, with worked numbers and lambda chosen by cross-validation.
Session 4
Confusion matrix, ROC and AUC, precision-recall, Brier score, a decision threshold derived from costs, and a reproducible ML repository.
Homework
A defensible machine learning baseline: frozen split, leakage map, calibrated logistic regression, cost-based threshold, pre-registered ablation.
Session 5
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.
Session 6
Bagging and random forests, gradient boosting and XGBoost derived step by step, then nested cross-validation and the Nadeau and Bengio corrected t-test.
Session 7
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.
Homework
How to compare models with nested cross-validation, corrected confidence intervals and a pre-registered rule, then document the champion in a model card.
Session 8
Forward pass and backpropagation by hand, networks on tabular data, PSI drift monitoring, split conformal prediction and a FastAPI model service.
Homework
What a delivered ML project contains: a rerunnable repository, a tested prediction API, a traceable report, model card, monitoring plan and client memo.
Session 9
What a machine learning project defence must show, the questions a jury asks, the classic traps, and how to reuse the project in interviews.
15
A reproducible credit default scoring project on the UCI credit card data: repository, make reproduce, tests, cost threshold, robustness, CI.
16
A worked ML project: log returns, walk-forward validation, lagged features, FinBERT and GDELT sentiment, Diebold-Mariano tests and Sharpe net of costs.
17
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.
18
Backpropagation, batch norm and its gradient, ResNet, convolution, LSTM, attention, VAE and GAN, each derived on the board and checked in PyTorch.
19
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.
20
Scope a data project, pick tools (Airflow, Spark, Docker, Kubernetes), choose a model, deploy an API and app, then observe it in production.
21
Pipelines, Parquet, SQL on DuckDB, idempotent loads, SLOs and error budgets, Terraform, Docker, Kubernetes, FinOps, and what each career level expects.
22
Machine learning model families: what each is for, which Python libraries, the main pitfall, and where it serves in finance, logistics and industry.
23
Queries, keys and values, multi-head attention, positional encoding, encoder and decoder: one plain sentence, then the maths, then a worked example.