回归方程(regression equation)

image.png

octave 代码表示
h = X * theta

代价函数(Cost Function)

最小均方(LMS,Least Mean Square)
image.png

J = 0.5 * m^-1 * (X*theta-y)' * (X*theta-y);

梯度下降 (Gradient Descent)

image.png

theta = theta - alpha * m ^ -1 * X' * (X * theta - y)

随机梯度下降(Random Gradient Descent)

image.png

正规方程 (Normal Equation)

image.png

theta=pinv(X'*X)*X'*y

ahtlzj
1 声望1 粉丝

人工智能成长ing, 关注我就是关注一个潜力股