Gradient descent algorithm won't converge

前端 未结 6 1068
轻奢々
轻奢々 2021-02-06 05:42

I\'m trying to write out a bit of code for the gradient descent algorithm explained in the Stanford Machine Learning lecture (lecture 2 at around 25:00). Below is the implementa

6条回答
  •  执念已碎
    2021-02-06 06:10

    If I understand you correctly, your training set only has a non-zero gradient at the edge of a line? Unless you start at the line (actually start exactly at one of your training points) you won't find the line. You are always at a local minimum.

提交回复
热议问题