Skip to content

Commit 1083e12

Browse files
committed
📝 增加梯度下降最小化代价原因
1 parent 4c440cd commit 1083e12

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

readme.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ def computerCost(X,y,theta):
3636
- 泰勒展开:`f(x+△x)=f(x)+f'(x)*△x+o(△x)`
3737
- 令:`△x=-α*f'(x)` ,即负梯度方向乘以一个很小的步长`α`
3838
-`△x`代入泰勒展开式中:`f(x+x)=f(x)-α*[f'(x)]²+o(△x)`
39-
- 可以看出,`α`是取得很小的正数,`[f'(x)]²`也是整数,所以可以得出:`f(x+△x)<=f(x)`
39+
- 可以看出,`α`是取得很小的正数,`[f'(x)]²`也是正数,所以可以得出:`f(x+△x)<=f(x)`
4040
- 所以沿着**负梯度**放下,函数在减小,多维情况一样。
4141
- 实现代码
4242
```

0 commit comments

Comments
 (0)