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
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 l'éventail des problèmes et des modèles, afin que les modules suivants restent concis et centrés sur les formules.
4
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.
5
## 1.1 Types d'apprentissage
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>
6
7
- **Supervisé** : apprendre à partir d'exemples étiquetés (régression, classification).
8
- **Non supervisé** : trouver une structure dans des données non étiquetées (clustering, réduction de dimension).
9
- **Par renforcement** : apprendre via des retours en interagissant avec un environnement.
10
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.
11
## 1.2 Le déroulé
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>
12
13
1. Définir le problème et rassembler les données.
14
2. Explorer et préparer les données.
15
3. Entraîner des modèles candidats.
16
4. Les évaluer et les comparer.
17
5. Déployer et surveiller (voir le cours [MLOps](/fr/MLOps)).
18
19
**Objectifs**
20
- Fixer la notation utilisée dans tout le cours.
21
- Définir l'ensemble d'entraînement, l'hypothèse et la matrice de conception.
22
- Adopter la convention d'ordonnée à l'origine $x_0 = 1$.
23
- Classer un problème supervisé selon le type de sa sortie.
24
- Distinguer les modèles discriminatifs des modèles génératifs.
25
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.
26
## 1.3 Notation et mise en place
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>
27
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.
28
### 1.3.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>
29
30
L'ensemble d'entraînement est défini comme une collection de $m$ exemples étiquetés :
31
32
$$\boxed{ \{(x^{(i)}, y^{(i)})\}_{i=1}^{m} }$$
33
34
Symboles :
35
- $x^{(i)}$ est l'entrée (vecteur de caractéristiques) du $i$-ème exemple.
36
- $y^{(i)}$ est sa cible (étiquette).
37
- $m$ est le nombre d'exemples d'entraînement.
38
- $n$ est le nombre de caractéristiques.
39
- $x_j^{(i)}$ est la $j$-ème caractéristique du $i$-ème exemple.
40
41
*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$.
42
43
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 $\theta \in \mathbb{R}^{n+1}$.
44
45
$$\boxed{ x_0 = 1, \quad x \in \mathbb{R}^{n+1}, \quad \theta \in \mathbb{R}^{n+1} }$$
46
47
*Remarque :* l'ordonnée à l'origine permet à un seul produit scalaire $\theta^T x$ de porter le terme de biais, de sorte qu'aucune constante séparée n'a besoin d'être écrite.
48
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.
49
### 1.3.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>
50
51
Une hypothèse est définie comme une fonction choisie dans une famille de modèles qui associe une entrée à une prédiction :
52
53
$$\boxed{ h_\theta : x \mapsto h_\theta(x) }$$
54
55
L'apprentissage est la recherche, sur les paramètres $\theta$, de l'hypothèse qui s'ajuste le mieux à l'ensemble d'entraînement.
56
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.
57
### 1.3.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>
58
59
La matrice de conception empile les $m$ entrées transposées ligne par ligne, et le vecteur cible rassemble les étiquettes :
60
61
$$\boxed{ X = \begin{bmatrix} (x^{(1)})^{T} \\ \vdots \\ (x^{(m)})^{T} \end{bmatrix}, \quad y = \begin{bmatrix} y^{(1)} \\ \vdots \\ y^{(m)} \end{bmatrix} }$$
62
63
Ici $X \in \mathbb{R}^{m \times (n+1)}$ (chaque entrée augmentée est une ligne) et $y \in \mathbb{R}^{m}$.
64
65
*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 $X\theta$.
66
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.
67
## 1.4 Types de problèmes et de modèles
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>
68
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.
69
### 1.4.1 Type de prédiction
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>
70
71
Un problème supervisé est nommé selon la nature de sa cible $y$.
72
73
| Type | Cible | Objectif |
74
| --- | --- | --- |
75
| Régression | $y \in \mathbb{R}$ | prédire une valeur continue |
76
| Classification | $y \in \{1, \dots, k\}$ | prédire l'une des $k$ classes discrètes |
77
78
*Remarque :* la classification binaire est le cas $k = 2$, souvent codé $y \in \{0, 1\}$ ou $y \in \{-1, +1\}$.
79
80
![Régression et classification](/fr/Machine%20Learning/01%20Introduction/a/regression-vs-classification.png)
81
82
*À gauche : la régression ajuste une sortie continue. À droite : la classification sépare l'espace en classes.*
83
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.
84
### 1.4.2 Type de modèle
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>
85
86
Un modèle est discriminatif s'il apprend directement la conditionnelle $p(y \mid x)$, et génératif s'il modélise la façon dont les données sont générées, $p(x \mid y)$ et $p(y)$, puis inverse via la règle de Bayes :
87
88
$$\boxed{ p(y \mid x) = \frac{p(x \mid y)\, p(y)}{p(x)} }$$
89
90
| Aspect | Discriminatif | Génératif |
91
| --- | --- | --- |
92
| Objectif | modéliser la frontière entre classes | modéliser comment chaque classe génère les données |
93
| Ce qui est appris | $p(y \mid x)$ directement | $p(x \mid y)$ et $p(y)$, puis Bayes |
94
| Exemples | régression logistique, SVM | analyse discriminante gaussienne, Bayes naïf |
95
96
*Remarque :* $p(x)$ est identique pour toutes les classes, donc en classification on peut l'ignorer et retenir la classe la plus probable via $\arg\max_y\, p(x \mid y)\, p(y)$.
97
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.
98
### 1.4.3 Mise en relation
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>
99
100
Le type de sortie fixe régression vs classification, et le choix de modélisation fixe discriminatif vs génératif. Ensemble ils sélectionnent une famille de modèles.
101
102
```mermaid
103
graph TD
104
A["probleme supervise"] --> B{"type de sortie ?"}
105
B -->|"continue"| C["regression"]
106
B -->|"discrete"| D["classification"]
107
D --> E{"type de modele ?"}
108
E -->|"discriminatif"| F["regression logistique, SVM"]
109
E -->|"generatif"| G["ADG, Bayes naif"]
110
```
111
112
*Le problème étant posé et la notation fixée, la partie suivante introduit les outils qui servent à ajuster un modèle aux données : fonctions de perte, descente de gradient et maximum de vraisemblance.*
113
114
---
115
Suivant : [Concepts généraux](/fr/Machine%20Learning/02%20General%20concepts) · [Vue d'ensemble du cours](/fr/Machine%20Learning)