Ch 4: batch gradient descent demonstration with various learning rates
- Dominant language
- Jupyter Notebook
- Stars
- 25.6k
- Forks
- 12.7k
- PR merge metrics
- No merged PRs in 30d
Description
Hi Aurelien.
May I modestly suggest the attached implementation of the plot_gradient_descent() function?
I think it drives home your point:
>A simple solution is to set a very large number of iterations but to interrupt the algorithm when the gradient vector becomes tiny...
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](https://github.com/ageron/handson-ml/files/3268865/plot_gd.txt)
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.