ageron / ageron/handson-ml

Ch 4: batch gradient descent demonstration with various learning rates

Abierto
#446 4 comentarios 1 reacción 0 asignados Ver en GitHub
Lenguaje dominante
Jupyter Notebook
Estrellas
25.6k
Forks
12.7k
Métricas de merge de PR
Sin PR fusionados en 30 d

Descripción

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)

Guía de contribución

No hay ninguna guía de contribución indexada para este repositorio

Evaluación

Este issue todavía no se ha evaluado.

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.