flowchart LR
subgraph Data ["Donnees 2D"]
direction TB
C1["Classe 0
(cercles)"]
C2["Classe 1
(carres)"]
end
subgraph SVM ["SVM"]
H["Hyperplan
(frontiere)"]
M["Marge
(maximisee)"]
SV["Support Vectors
(points cles)"]
end
Data --> SVM
style H fill:#F7E64D,color:#1A1A1A
style SV fill:#9B7AC4,color:#FFFFFF
Plusieurs hyperplans possibles, lequel choisir?
flowchart TD
H1["Hyperplan A
Marge: 0.5"]
H2["Hyperplan B
Marge: 1.2"]
H3["Hyperplan C
Marge: 2.0"]
BEST["SVM choisit C
(marge maximale)"]
H1 --> BEST
H2 --> BEST
H3 --> BEST
style H3 fill:#F7E64D,color:#1A1A1A
style BEST fill:#F7E64D,color:#1A1A1A
flowchart LR
L["Donnees
Non Lineaires"]
K["Kernel Trick
(transformation)"]
H["Hyperplan
dans nouvel espace"]
L -->|"Impossible en 2D"| K -->|"Separable en 3D+"| H
style K fill:#C09CF0,color:#1A1A1A
style H fill:#F7E64D,color:#1A1A1A
Nouveau point: $\textcolor{#3498db}{x_1 = 2.5}$, $\textcolor{#e67e22}{x_2 = 1.8}$
Le SVM a appris l'hyperplan: $\textcolor{#9B7AC4}{w_1} \cdot x_1 + \textcolor{#9B7AC4}{w_2} \cdot x_2 + \textcolor{#9B7AC4}{b} = 0$
Avec $\textcolor{#9B7AC4}{w_1 = 0.8}$, $\textcolor{#9B7AC4}{w_2 = 0.6}$, $\textcolor{#9B7AC4}{b = -2.0}$
$$f(x) = \textcolor{#9B7AC4}{0.8} \times \textcolor{#3498db}{2.5} + \textcolor{#9B7AC4}{0.6} \times \textcolor{#e67e22}{1.8} + \textcolor{#9B7AC4}{(-2.0)}$$
$$f(x) = \textcolor{#3498db}{2.0} + \textcolor{#e67e22}{1.08} - 2.0 = \textcolor{#27ae60}{\mathbf{+1.08}}$$
- Si $f(x) > 0$ → $\textcolor{#27ae60}{\text{Classe 1}}$
- Si $f(x) < 0$ → Classe 0
Ici $\textcolor{#27ae60}{+1.08 > 0}$ → Classe 1
- $\textcolor{#3498db}{Bleu}$ : feature 1 et sa contribution ($\textcolor{#3498db}{2.5 \times 0.8 = 2.0}$)
- $\textcolor{#e67e22}{Orange}$ : feature 2 et sa contribution ($\textcolor{#e67e22}{1.8 \times 0.6 = 1.08}$)
- $\textcolor{#9B7AC4}{Violet}$ : poids appris par le SVM
- $\textcolor{#27ae60}{Vert}$ : score final positif → Classe 1