1
0
Fork 0

Print out the cost function J

master
neingeist 10 years ago
parent 2bf076c2fc
commit 38064db8b3

@ -18,6 +18,8 @@ for iter = 1:num_iters
% %
theta = theta - (alpha/m) * X' * (X*theta - y); theta = theta - (alpha/m) * X' * (X*theta - y);
J = computeCost(X, y, theta)
% ============================================================ % ============================================================
% Save the cost J in every iteration % Save the cost J in every iteration