|
|
|
@ -11,7 +11,7 @@ for iter = 1:num_iters
|
|
|
|
|
|
|
|
|
|
% ====================== YOUR CODE HERE ======================
|
|
|
|
|
% Instructions: Perform a single gradient step on the parameter vector
|
|
|
|
|
% theta.
|
|
|
|
|
% theta.
|
|
|
|
|
%
|
|
|
|
|
% Hint: While debugging, it can be useful to print out the values
|
|
|
|
|
% of the cost function (computeCostMulti) and gradient here.
|
|
|
|
@ -19,17 +19,9 @@ for iter = 1:num_iters
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
% ============================================================
|
|
|
|
|
|
|
|
|
|
% Save the cost J in every iteration
|
|
|
|
|
% Save the cost J in every iteration
|
|
|
|
|
J_history(iter) = computeCostMulti(X, y, theta);
|
|
|
|
|
|
|
|
|
|
end
|
|
|
|
|