Blame

d5b8b5 lugonthier 2026-07-01 14:24:01
Refactor section headings for consistency and clarity across multiple documents in the Machine Learning module. Updated headings to include numerical prefixes for better organization and navigation. Adjusted content formatting and improved terminology in French translations for decision trees, ensemble methods, and other foundational concepts.
1
# 1. Introduction
1c3139 Lucas Gonthier 2026-06-30 12:04:21
Initial commit: course content (Machine Learning, MLOps) in EN and FR Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2
6b31d5 lugonthier 2026-07-15 12:37:13
feat: Update "Decision trees and ensemble methods" module with new content and visuals - Revamped the introduction to ensemble methods, emphasizing the benefits of combining models. - Expanded sections on decision trees, bagging, and boosting, including detailed explanations and formulas. - Added new SVG diagrams illustrating the bagging process, the transition from stumps to trees, and variance reduction. - Introduced new images for AdaBoost rounds and variance reduction to enhance understanding.
3
Le machine learning construit des modèles qui apprennent des motifs à partir de données, au lieu d'être programmés explicitement avec des règles. Ce module fixe la notation utilisée tout au long du cours et cartographie les types de problèmes abordés, afin que les modules suivants restent concis et centrés sur les formules.
1c3139 Lucas Gonthier 2026-06-30 12:04:21
Initial commit: course content (Machine Learning, MLOps) in EN and FR Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
4
0ad9b6 lugonthier 2026-07-10 12:03:30
Remove "07 Regularization and high-dimensional inference" chapter and add "07 Support Vector Machines" and "08 Decision trees and ensemble methods" chapters with corresponding images.
5
## 1.1 Types d'apprentissage
6
7
Les problèmes de machine learning se rangent d'ordinaire en trois paradigmes. Ce qui les sépare n'est pas l'algorithme mais le retour disponible pendant l'entraînement : une étiquette pour chaque exemple, aucune étiquette, ou une récompense obtenue en interagissant.
8
9
![Les trois types d'apprentissage](/fr/Machine%20Learning/01%20Introduction/a/types-of-learning.svg)
10
11
*L'apprentissage supervisé ajuste une correspondance à partir d'exemples étiquetés, l'apprentissage non supervisé trouve une structure dans des données non étiquetées, et l'apprentissage par renforcement améliore une politique en interagissant avec un environnement.*
12
13
**Apprentissage supervisé.** Chaque exemple d'entraînement associe une entrée $x$ à la réponse $y$ que le modèle doit produire, et le but est une correspondance $x \mapsto y$ qui généralise à des entrées jamais vues à l'entraînement. Prédire le prix d'une maison à partir de ses caractéristiques (régression) et décider si un courriel est un spam (classification) sont les tâches canoniques. Les étiquettes rendent l'objectif explicite et le progrès mesurable, ce qui explique que la théorie soit la plus développée ici. Presque tout ce cours se place dans ce cadre.
14
15
**Apprentissage non supervisé.** Seules les entrées $x$ sont disponibles, et aucune étiquette ne dit quelle est la bonne réponse. Le but passe de la prédiction à la description : regrouper des clients similaires en segments (clustering), compresser de nombreuses caractéristiques corrélées en quelques directions informatives (réduction de dimension), ou estimer quelles régions de l'espace d'entrée sont probables (estimation de densité). Le succès est plus difficile à quantifier, faute de vérité terrain à laquelle se comparer.
16
17
**Apprentissage par renforcement.** Il n'y a pas de jeu de données fixe. Un agent choisit une action, l'environnement renvoie un nouvel état et une récompense, et cette récompense peut arriver longtemps après l'action qui l'a produite. Le but est une politique, une règle de choix des actions qui maximise la récompense cumulée. Le jeu et la robotique en sont les exemples typiques. C'est un domaine à part entière, hors du périmètre de ce cours.
18
19
| Paradigme | Données | Signal de retour | Ce qui est appris | Tâches canoniques |
20
| --- | --- | --- | --- | --- |
21
| Supervisé | paires $(x, y)$ | l'étiquette $y$ | une correspondance $h : x \mapsto y$ | régression, classification |
22
| Non supervisé | entrées $x$ seules | aucun | une structure dans les données | clustering, réduction de dimension |
23
| Par renforcement | interaction | récompense, souvent différée | une politique d'action | contrôle, jeu |
24
25
*Remarque :* les frontières ne sont pas rigides. L'apprentissage semi-supervisé mélange quelques exemples étiquetés à beaucoup d'exemples non étiquetés, et l'apprentissage auto-supervisé fabrique des étiquettes à partir des données elles-mêmes, par exemple en masquant un mot pour le prédire. Les deux réutilisent la machinerie supervisée introduite dans ce cours.
26
6b31d5 lugonthier 2026-07-15 12:37:13
feat: Update "Decision trees and ensemble methods" module with new content and visuals - Revamped the introduction to ensemble methods, emphasizing the benefits of combining models. - Expanded sections on decision trees, bagging, and boosting, including detailed explanations and formulas. - Added new SVG diagrams illustrating the bagging process, the transition from stumps to trees, and variance reduction. - Introduced new images for AdaBoost rounds and variance reduction to enhance understanding.
27
## 1.2 La notation du cours
0ad9b6 lugonthier 2026-07-10 12:03:30
Remove "07 Regularization and high-dimensional inference" chapter and add "07 Support Vector Machines" and "08 Decision trees and ensemble methods" chapters with corresponding images.
28
6b31d5 lugonthier 2026-07-15 12:37:13
feat: Update "Decision trees and ensemble methods" module with new content and visuals - Revamped the introduction to ensemble methods, emphasizing the benefits of combining models. - Expanded sections on decision trees, bagging, and boosting, including detailed explanations and formulas. - Added new SVG diagrams illustrating the bagging process, the transition from stumps to trees, and variance reduction. - Introduced new images for AdaBoost rounds and variance reduction to enhance understanding.
29
### 1.2.1 Ensemble d'entraînement
1c3139 Lucas Gonthier 2026-06-30 12:04:21
Initial commit: course content (Machine Learning, MLOps) in EN and FR Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
30
31
L'ensemble d'entraînement est défini comme une collection de $m$ exemples étiquetés :
32
33
$$\boxed{ \{(x^{(i)}, y^{(i)})\}_{i=1}^{m} }$$
34
35
Symboles :
36
- $x^{(i)}$ est l'entrée (vecteur de caractéristiques) du $i$-ème exemple.
37
- $y^{(i)}$ est sa cible (étiquette).
38
- $m$ est le nombre d'exemples d'entraînement.
39
- $n$ est le nombre de caractéristiques.
40
- $x_j^{(i)}$ est la $j$-ème caractéristique du $i$-ème exemple.
41
42
*Remarque :* l'exposant $(i)$ indexe l'exemple et l'indice $j$ indexe la caractéristique, donc $x_j^{(i)}$ est la caractéristique $j$ de l'exemple $i$.
43
6b31d5 lugonthier 2026-07-15 12:37:13
feat: Update "Decision trees and ensemble methods" module with new content and visuals - Revamped the introduction to ensemble methods, emphasizing the benefits of combining models. - Expanded sections on decision trees, bagging, and boosting, including detailed explanations and formulas. - Added new SVG diagrams illustrating the bagging process, the transition from stumps to trees, and variance reduction. - Introduced new images for AdaBoost rounds and variance reduction to enhance understanding.
44
Par convention l'entrée est augmentée d'un terme d'ordonnée à l'origine constant $x_0 = 1$, donc $x \in \mathbb{R}^{n+1}$ et les paramètres sont $w \in \mathbb{R}^{n+1}$.
1c3139 Lucas Gonthier 2026-06-30 12:04:21
Initial commit: course content (Machine Learning, MLOps) in EN and FR Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
45
6b31d5 lugonthier 2026-07-15 12:37:13
feat: Update "Decision trees and ensemble methods" module with new content and visuals - Revamped the introduction to ensemble methods, emphasizing the benefits of combining models. - Expanded sections on decision trees, bagging, and boosting, including detailed explanations and formulas. - Added new SVG diagrams illustrating the bagging process, the transition from stumps to trees, and variance reduction. - Introduced new images for AdaBoost rounds and variance reduction to enhance understanding.
46
$$\boxed{ x_0 = 1, \quad x \in \mathbb{R}^{n+1}, \quad w \in \mathbb{R}^{n+1} }$$
1c3139 Lucas Gonthier 2026-06-30 12:04:21
Initial commit: course content (Machine Learning, MLOps) in EN and FR Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
47
6b31d5 lugonthier 2026-07-15 12:37:13
feat: Update "Decision trees and ensemble methods" module with new content and visuals - Revamped the introduction to ensemble methods, emphasizing the benefits of combining models. - Expanded sections on decision trees, bagging, and boosting, including detailed explanations and formulas. - Added new SVG diagrams illustrating the bagging process, the transition from stumps to trees, and variance reduction. - Introduced new images for AdaBoost rounds and variance reduction to enhance understanding.
48
*Remarque :* l'ordonnée à l'origine permet à un seul produit scalaire $w^T x$ de porter le terme de biais, de sorte qu'aucune constante séparée n'a besoin d'être écrite.
1c3139 Lucas Gonthier 2026-06-30 12:04:21
Initial commit: course content (Machine Learning, MLOps) in EN and FR Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
49
6b31d5 lugonthier 2026-07-15 12:37:13
feat: Update "Decision trees and ensemble methods" module with new content and visuals - Revamped the introduction to ensemble methods, emphasizing the benefits of combining models. - Expanded sections on decision trees, bagging, and boosting, including detailed explanations and formulas. - Added new SVG diagrams illustrating the bagging process, the transition from stumps to trees, and variance reduction. - Introduced new images for AdaBoost rounds and variance reduction to enhance understanding.
50
### 1.2.2 Hypothèse
1c3139 Lucas Gonthier 2026-06-30 12:04:21
Initial commit: course content (Machine Learning, MLOps) in EN and FR Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
51
52
Une hypothèse est définie comme une fonction choisie dans une famille de modèles qui associe une entrée à une prédiction :
53
6b31d5 lugonthier 2026-07-15 12:37:13
feat: Update "Decision trees and ensemble methods" module with new content and visuals - Revamped the introduction to ensemble methods, emphasizing the benefits of combining models. - Expanded sections on decision trees, bagging, and boosting, including detailed explanations and formulas. - Added new SVG diagrams illustrating the bagging process, the transition from stumps to trees, and variance reduction. - Introduced new images for AdaBoost rounds and variance reduction to enhance understanding.
54
$$\boxed{ h_w : x \mapsto \hat{y} = h_w(x) }$$
1c3139 Lucas Gonthier 2026-06-30 12:04:21
Initial commit: course content (Machine Learning, MLOps) in EN and FR Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
55
6b31d5 lugonthier 2026-07-15 12:37:13
feat: Update "Decision trees and ensemble methods" module with new content and visuals - Revamped the introduction to ensemble methods, emphasizing the benefits of combining models. - Expanded sections on decision trees, bagging, and boosting, including detailed explanations and formulas. - Added new SVG diagrams illustrating the bagging process, the transition from stumps to trees, and variance reduction. - Introduced new images for AdaBoost rounds and variance reduction to enhance understanding.
56
Deux notations, deux rôles : $h_w$ nomme la fonction, et $\hat{y}$ nomme la valeur qu'elle prédit pour une entrée, le chapeau marquant une estimation de l'étiquette $y$. L'apprentissage est la recherche, sur les paramètres $w$, de l'hypothèse qui s'ajuste le mieux à l'ensemble d'entraînement.
1c3139 Lucas Gonthier 2026-06-30 12:04:21
Initial commit: course content (Machine Learning, MLOps) in EN and FR Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
57
6b31d5 lugonthier 2026-07-15 12:37:13
feat: Update "Decision trees and ensemble methods" module with new content and visuals - Revamped the introduction to ensemble methods, emphasizing the benefits of combining models. - Expanded sections on decision trees, bagging, and boosting, including detailed explanations and formulas. - Added new SVG diagrams illustrating the bagging process, the transition from stumps to trees, and variance reduction. - Introduced new images for AdaBoost rounds and variance reduction to enhance understanding.
58
### 1.2.3 Matrice de conception
1c3139 Lucas Gonthier 2026-06-30 12:04:21
Initial commit: course content (Machine Learning, MLOps) in EN and FR Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
59
60
La matrice de conception empile les $m$ entrées transposées ligne par ligne, et le vecteur cible rassemble les étiquettes :
61
62
$$\boxed{ X = \begin{bmatrix} (x^{(1)})^{T} \\ \vdots \\ (x^{(m)})^{T} \end{bmatrix}, \quad y = \begin{bmatrix} y^{(1)} \\ \vdots \\ y^{(m)} \end{bmatrix} }$$
63
64
Ici $X \in \mathbb{R}^{m \times (n+1)}$ (chaque entrée augmentée est une ligne) et $y \in \mathbb{R}^{m}$.
65
6b31d5 lugonthier 2026-07-15 12:37:13
feat: Update "Decision trees and ensemble methods" module with new content and visuals - Revamped the introduction to ensemble methods, emphasizing the benefits of combining models. - Expanded sections on decision trees, bagging, and boosting, including detailed explanations and formulas. - Added new SVG diagrams illustrating the bagging process, the transition from stumps to trees, and variance reduction. - Introduced new images for AdaBoost rounds and variance reduction to enhance understanding.
66
*Remarque :* avec cette disposition de nombreux modèles se réduisent à des expressions matricielles compactes, par exemple une prédiction linéaire sur tous les exemples vaut $Xw$.
1c3139 Lucas Gonthier 2026-06-30 12:04:21
Initial commit: course content (Machine Learning, MLOps) in EN and FR Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
67
6b31d5 lugonthier 2026-07-15 12:37:13
feat: Update "Decision trees and ensemble methods" module with new content and visuals - Revamped the introduction to ensemble methods, emphasizing the benefits of combining models. - Expanded sections on decision trees, bagging, and boosting, including detailed explanations and formulas. - Added new SVG diagrams illustrating the bagging process, the transition from stumps to trees, and variance reduction. - Introduced new images for AdaBoost rounds and variance reduction to enhance understanding.
68
## 1.3 Types de problèmes
1c3139 Lucas Gonthier 2026-06-30 12:04:21
Initial commit: course content (Machine Learning, MLOps) in EN and FR Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
69
70
Un problème supervisé est nommé selon la nature de sa cible $y$.
71
72
| Type | Cible | Objectif |
73
| --- | --- | --- |
74
| Régression | $y \in \mathbb{R}$ | prédire une valeur continue |
75
| Classification | $y \in \{1, \dots, k\}$ | prédire l'une des $k$ classes discrètes |
76
77
*Remarque :* la classification binaire est le cas $k = 2$, souvent codé $y \in \{0, 1\}$ ou $y \in \{-1, +1\}$.
78
79
![Régression et classification](/fr/Machine%20Learning/01%20Introduction/a/regression-vs-classification.png)
80
81
*À gauche : la régression ajuste une sortie continue. À droite : la classification sépare l'espace en classes.*
82
0ad9b6 lugonthier 2026-07-10 12:03:30
Remove "07 Regularization and high-dimensional inference" chapter and add "07 Support Vector Machines" and "08 Decision trees and ensemble methods" chapters with corresponding images.
83
*Le problème étant posé et la notation fixée, la partie suivante aborde ce que l'apprentissage exige vraiment : minimiser une perte est facile, généraliser au-delà de l'ensemble d'entraînement est le défi.*
1c3139 Lucas Gonthier 2026-06-30 12:04:21
Initial commit: course content (Machine Learning, MLOps) in EN and FR Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
84
85
---
86
Suivant : [Concepts généraux](/fr/Machine%20Learning/02%20General%20concepts) · [Vue d'ensemble du cours](/fr/Machine%20Learning)