From 1502b950730fd37a9ffe9e1d6d9967778602acea Mon Sep 17 00:00:00 2001 From: Philippe Roy Date: Sun, 18 Jun 2023 10:39:03 +0200 Subject: [PATCH] Fondamentaux : descente de gradient stochastique --- fondamentaux/01-regression_lineaire.py | 2 +- fondamentaux/02-descente_gradient.py | 2 +- fondamentaux/03-descente_gradient_stochastique.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/fondamentaux/01-regression_lineaire.py b/fondamentaux/01-regression_lineaire.py index 5450caa..1119328 100644 --- a/fondamentaux/01-regression_lineaire.py +++ b/fondamentaux/01-regression_lineaire.py @@ -27,7 +27,7 @@ t_debut = time.time() # Observations d'apprentisage m = 1000 # Nombre d'observations -bg = 1 # Bruit gaussien +bg = 1 # Quantité du bruit gaussien x = 2*np.random.rand(m, 1) # Liste des observations x1 y = 4 + 3*x + bg * np.random.rand(m, 1) # Liste des cibles y X = np.c_[np.ones((m, 1)), x] # Matrice des observations, avec x0=1 diff --git a/fondamentaux/02-descente_gradient.py b/fondamentaux/02-descente_gradient.py index 528b835..fc45a47 100644 --- a/fondamentaux/02-descente_gradient.py +++ b/fondamentaux/02-descente_gradient.py @@ -27,7 +27,7 @@ t_debut = time.time() # Observations d'apprentisage m = 1000 # Nombre d'observations -bg = 1 # Bruit gaussien +bg = 1 # Quantité du bruit gaussien x = 2*np.random.rand(m, 1) # Liste des observations x1 y = 4 + 3*x + bg * np.random.rand(m, 1) # Liste des cibles y X = np.c_[np.ones((m, 1)), x] # Matrice des observations, avec x0=1 diff --git a/fondamentaux/03-descente_gradient_stochastique.py b/fondamentaux/03-descente_gradient_stochastique.py index b88fad0..f8b9c39 100644 --- a/fondamentaux/03-descente_gradient_stochastique.py +++ b/fondamentaux/03-descente_gradient_stochastique.py @@ -27,7 +27,7 @@ t_debut = time.time() # Observations d'apprentisage m = 1000 # Nombre d'observations -bg = 1 # Bruit gaussien +bg = 1 # Quantité du bruit gaussien x = 2*np.random.rand(m, 1) # Liste des observations x1 y = 4 + 3*x + bg * np.random.rand(m, 1) # Liste des cibles y X = np.c_[np.ones((m, 1)), x] # Matrice des observations, avec x0=1