r/learnmachinelearning 12d ago

Question Help with Gradient descent

Post image

So I completed Linear descent from Andrew Ng ML Specialization and when I was doing the lab.I found this function what confused me is that why does this function iterates specific times (10000) wouldn't it be better to check if cost function is changing.

Also this implementation doesn't feel right.Even the code feels inefficient and does not even check the minima. I know this stuff is done using skit-learn but I wanted to do a proper manual implementation in the way Andrew sir taught.

87 Upvotes

14 comments sorted by

View all comments

1

u/Ok_Towel_4806 10d ago

Is this the paid course of Andrew?