Skip to content

Commit d3d71d8

Browse files
authored
Merge pull request #10 from Alex1996a/patch-1
fix 梯度下降公式
2 parents 7e2fd65 + c50d765 commit d3d71d8

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

readme.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ def computerCost(X,y,theta):
105105
- 假设函数`f(x)`
106106
- 泰勒展开:`f(x+△x)=f(x)+f'(x)*△x+o(△x)`
107107
- 令:`△x=-α*f'(x)` ,即负梯度方向乘以一个很小的步长`α`
108-
-`△x`代入泰勒展开式中:`f(x+x)=f(x)-α*[f'(x)]²+o(△x)`
108+
-`△x`代入泰勒展开式中:`f(x+x)=f(x)-α*[f'(x)]²+o(△x)`
109109
- 可以看出,`α`是取得很小的正数,`[f'(x)]²`也是正数,所以可以得出:`f(x+△x)<=f(x)`
110110
- 所以沿着**负梯度**放下,函数在减小,多维情况一样。
111111
- 实现代码

0 commit comments

Comments
 (0)