gradient descent seems to fail

前端 未结 9 1953
忘掉有多难
忘掉有多难 2020-12-12 15:54

I implemented a gradient descent algorithm to minimize a cost function in order to gain a hypothesis for determining whether an image has a good quality. I did that in Octav

9条回答
  •  感动是毒
    2020-12-12 16:11

    its cleaner this way, and vectorized also

    predictions = X * theta;
    errorsVector = predictions - y;
    theta = theta - (alpha/m) * (X' * errorsVector);
    

提交回复
热议问题