LxMLS / lxmls-guide

Lisbon Machine Learning Summer School Lab Guide
81 stars 61 forks source link

Exercise 0.12 code typo #101

Closed pedropolvora closed 8 years ago

pedropolvora commented 8 years ago

I believe that on the gradient_descent function on line 13 it should be x_new = x_old - step_size * get_grad(x_new) and not x_new = x_old - step_size * grad(x_new) and also it should be get_y and not func on the lines 14-15

pedropolvora commented 8 years ago

nevermind those are argumentt ....

andre-martins commented 8 years ago

Actually it should probably be x_new = x_old - step_size * get_grad(x_old) and not x_new = x_old - step_size * get_grad(x_new)... Even if x_new = x_old the get_grad(x_old) syntax is clearer.

(Even better: simply x -= step_size * get_grad(x).)

2016-07-21 15:39 GMT+01:00 Pedro notifications@github.com:

nevermind those are argumentt ....

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/LxMLS/lxmls_guide/issues/101#issuecomment-234274282, or mute the thread https://github.com/notifications/unsubscribe-auth/ABU1w_gqbUfNS-NCBrWe82dWhVTu9v4Mks5qX4SGgaJpZM4JR3JR .

ramon-astudillo commented 8 years ago

somebody wants do to a PR for that?

On Thu, Jul 21, 2016 at 3:47 PM, Andre Martins notifications@github.com wrote:

Actually it should probably be x_new = x_old - step_size * get_grad(x_old) and not x_new = x_old - step_size * get_grad(x_new)... Even if x_new = x_old the get_grad(x_old) syntax is clearer.

(Even better: simply x -= step_size * get_grad(x).)

2016-07-21 15:39 GMT+01:00 Pedro notifications@github.com:

nevermind those are argumentt ....

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub <https://github.com/LxMLS/lxmls_guide/issues/101#issuecomment-234274282 , or mute the thread < https://github.com/notifications/unsubscribe-auth/ABU1w_gqbUfNS-NCBrWe82dWhVTu9v4Mks5qX4SGgaJpZM4JR3JR

.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/LxMLS/lxmls_guide/issues/101#issuecomment-234276942, or mute the thread https://github.com/notifications/unsubscribe-auth/ABW3CbWtlzJcP_AxpV3L6ZkEpjlyjTtEks5qX4Z9gaJpZM4JR3JR .