From 3fb520f891be16827d28872c4c9c9ae7a43ac14e Mon Sep 17 00:00:00 2001 From: Daniel Bauer Date: Sun, 19 Dec 2021 10:57:35 +0100 Subject: [PATCH] fix wrong shape for theta in Ex.3.2.1 The provided data set has 4 columns (including theta_0), so theta must be of shape (4,) --- Exercise1/exercise1.ipynb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Exercise1/exercise1.ipynb b/Exercise1/exercise1.ipynb index 38a9fae..6386aae 100755 --- a/Exercise1/exercise1.ipynb +++ b/Exercise1/exercise1.ipynb @@ -1123,7 +1123,7 @@ "num_iters = 400\n", "\n", "# init theta and run gradient descent\n", - "theta = np.zeros(3)\n", + "theta = np.zeros(4)\n", "theta, J_history = gradientDescentMulti(X, y, theta, alpha, num_iters)\n", "\n", "# Plot the convergence graph\n",