Gradient descent for multiple features
This commit is contained in:
parent
3dc8897634
commit
ad9ab582de
1 changed files with 2 additions and 0 deletions
|
@ -17,7 +17,9 @@ for iter = 1:num_iters
|
||||||
% of the cost function (computeCostMulti) and gradient here.
|
% of the cost function (computeCostMulti) and gradient here.
|
||||||
%
|
%
|
||||||
|
|
||||||
|
theta = theta - (alpha/m) * X' * (X*theta - y);
|
||||||
|
|
||||||
|
J = computeCostMulti(X, y, theta)
|
||||||
|
|
||||||
% ============================================================
|
% ============================================================
|
||||||
|
|
||||||
|
|
Reference in a new issue