1
0
Fork 0

Print out the cost function J

This commit is contained in:
neingeist 2014-10-02 22:08:08 +02:00
parent 2bf076c2fc
commit 38064db8b3

View file

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