Skip to content

Commit

Permalink
fix typo
Browse files Browse the repository at this point in the history
参数theta应该减去正则项,而不是加,目测是因为少了个括号。但是下文逻辑回归部分写的没错。所以直接复制了下文逻辑回归的梯度下降部分公式。合并前请检查下
  • Loading branch information
Chandlercjy committed May 8, 2018
1 parent 26e2762 commit 14c6040
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions markdown/week3.md
Original file line number Diff line number Diff line change
Expand Up @@ -494,13 +494,14 @@ $J\left( \theta \right)=\frac{1}{2m}\sum\limits_{i=1}^{m}{[({{({h_\theta}({{x}^

$Repeat$ $until$ $convergence${

​ ${\theta_0}:={\theta_0}-a\frac{1}{m}\sum\limits_{i=1}^{m}{({h_\theta}({{x}^{(i)}})-{{y}^{(i)}})x_{0}^{(i)}}$
​ ${\theta_0}:={\theta_0}-a\frac{1}{m}\sum\limits_{i=1}^{m}{(({h_\theta}({{x}^{(i)}})-{{y}^{(i)}})x_{0}^{(i)}})$

​ ${\theta_j}:={\theta_j}-a\frac{1}{m}\sum\limits_{i=1}^{m}{({h_\theta}({{x}^{(i)}})-{{y}^{(i)}})x_{j}^{\left( i \right)}}+\frac{\lambda }{m}{\theta_j}$
​ ${\theta_j}:={\theta_j}-a\frac{1}{m}\sum\limits_{i=1}^{m}{(({h_\theta}({{x}^{(i)}})-{{y}^{(i)}})x_{j}^{\left( i \right)}}+\frac{\lambda }{m}{\theta_j})$

​ }
​ $for$ $j=1,2,...n$

​ }

$Repeat$

对上面的算法中$ j=1,2,...,n$ 时的更新式子进行调整可得:

Expand Down

0 comments on commit 14c6040

Please sign in to comment.