Open genemishchenko opened 5 years ago
Wow thanks Gene, that's very kind of you! I'll check it out asap. 👍
Hi, Since this issue is for Chapter 4, I am writing my query here. while using the normal equation, why do we need to convert the "X" to "X_b" using np.c? I mean what is the logic behind it?
@yashGuleria, In X_b there's 1 added at the beggining of each instance's vector to get the bias/intercept term in the result, otherwise it will not appear in the result of the closed form solution (i.e. the Normal Equation). Thanks. Gene.
@genemishchenko, Thank you for helping out. regards yash
Hi Aurelien.
May I modestly suggest the attached implementation of the plot_gradient_descent() function? I think it drives home your point:
It also demonstrates how to actually calculate the magnitude of a vector.
Lastly, I also took the liberty of plotting the final predictions - may be good for the illustrative purposes, since it won't show up on the third plot, which corresponds to the LR that is too high.
Cheers! Gene.
plot_gd.txt