From 01eeeb2065c1b8bce96932e9d5d75fb64635558b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Aur=C3=A9lien=20Geron?= Date: Mon, 1 Mar 2021 18:50:46 +1300 Subject: [PATCH] Replace C with self.C, fixes #386 --- 05_support_vector_machines.ipynb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/05_support_vector_machines.ipynb b/05_support_vector_machines.ipynb index 208cf18..5f68eab 100644 --- a/05_support_vector_machines.ipynb +++ b/05_support_vector_machines.ipynb @@ -1109,7 +1109,7 @@ " self.Js.append(J)\n", "\n", " w_gradient_vector = w - self.C * np.sum(X_t_sv, axis=0).reshape(-1, 1)\n", - " b_derivative = -C * np.sum(t_sv)\n", + " b_derivative = -self.C * np.sum(t_sv)\n", " \n", " w = w - self.eta(epoch) * w_gradient_vector\n", " b = b - self.eta(epoch) * b_derivative\n",