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,)
This commit is contained in:
Daniel Bauer
2021-12-19 10:57:35 +01:00
committed by GitHub
parent 62fcd5eb86
commit 3fb520f891

View File

@@ -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",