42-AI / bootcamp_machine-learning

Bootcamp to learn basics in Machine Learning
Other
205 stars 41 forks source link

ml02 ex03 wrong shape for theta #225

Open Mazoise opened 2 years ago

Mazoise commented 2 years ago

Theta should have shape (4, 1) not (3, 1) since x has shape (., 3)

theta1 = np.array([3,0.5,-6]).reshape((-1, 1))
...
theta2 = np.array([0,0,0]).reshape((-1, 1))

should be :

theta1 = np.array([0, 3, 0.5, -6]).reshape((-1, 1))
...
theta2 = np.array([0, 0, 0, 0]).reshape((-1, 1))

Fixed on: