From df0a762f5ec979cb0953ac13c2c92ebbea66f6d9 Mon Sep 17 00:00:00 2001 From: =?utf8?q?J=C3=A9r=C3=B4me=20Benoit?= Date: Wed, 14 Nov 2018 14:19:11 +0100 Subject: [PATCH] TP3: print perceptron errors. MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: Jérôme Benoit --- TP3/exo1/tp3_exo1.py | 1 + TP3/exo2/tp3_exo2.py | 1 + 2 files changed, 2 insertions(+) diff --git a/TP3/exo1/tp3_exo1.py b/TP3/exo1/tp3_exo1.py index 9efcb98..57312f2 100755 --- a/TP3/exo1/tp3_exo1.py +++ b/TP3/exo1/tp3_exo1.py @@ -56,6 +56,7 @@ def perceptron_nobias(X, Y): if y * np.dot(w, x) <= 0: classification_error += 1 w = w + y * x + print(classification_error) return w diff --git a/TP3/exo2/tp3_exo2.py b/TP3/exo2/tp3_exo2.py index 6317987..b97c6ea 100755 --- a/TP3/exo2/tp3_exo2.py +++ b/TP3/exo2/tp3_exo2.py @@ -78,6 +78,7 @@ def perceptron_nobias(X, Y): if y * np.dot(w, x) <= 0: classification_error += 1 w = w + y * x + print(classification_error) return w -- 2.34.1