|
|
@ -16,12 +16,7 @@ for iter = 1:num_iters
|
|
|
|
% Hint: While debugging, it can be useful to print out the values
|
|
|
|
% Hint: While debugging, it can be useful to print out the values
|
|
|
|
% of the cost function (computeCost) and gradient here.
|
|
|
|
% of the cost function (computeCost) and gradient here.
|
|
|
|
%
|
|
|
|
%
|
|
|
|
|
|
|
|
theta = theta - (alpha/m) * X' * (X*theta - y);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
% ============================================================
|
|
|
|
% ============================================================
|
|
|
|
|
|
|
|
|
|
|
|